x11 borders fix
This commit is contained in:
@@ -109,10 +109,10 @@ void absinthe_toplevel_unmap(struct wl_listener *listener, void *data)
|
||||
wl_list_remove(&toplevel->link);
|
||||
wl_list_remove(&toplevel->flink);
|
||||
|
||||
wlr_scene_node_destroy(&toplevel->scene_tree->node);
|
||||
if (toplevel->output == toplevel->server->focused_output)
|
||||
layout_arrange(toplevel->output);
|
||||
|
||||
layout_arrange(toplevel->output);
|
||||
focus_next(toplevel->server);
|
||||
wlr_scene_node_destroy(&toplevel->scene_tree->node);
|
||||
}
|
||||
|
||||
void absinthe_toplevel_destroy(struct wl_listener *listener, void *data)
|
||||
@@ -240,6 +240,8 @@ void absinthe_toplevel_set_size(struct absinthe_toplevel *toplevel, int32_t widt
|
||||
absinthe_toplevel_set_position(toplevel, toplevel->geometry.x + toplevel->border_width, toplevel->geometry.y + toplevel->border_width);
|
||||
}
|
||||
#endif
|
||||
|
||||
absinthe_toplevel_update_borders_geometry(toplevel);
|
||||
}
|
||||
|
||||
void absinthe_toplevel_set_fullscreen(struct absinthe_toplevel *toplevel, bool fullscreen)
|
||||
@@ -263,6 +265,8 @@ void absinthe_toplevel_set_fullscreen(struct absinthe_toplevel *toplevel, bool f
|
||||
absinthe_toplevel_set_size(toplevel, toplevel->prev_geometry.width, toplevel->prev_geometry.height);
|
||||
absinthe_toplevel_set_position(toplevel, toplevel->prev_geometry.x, toplevel->prev_geometry.y);
|
||||
}
|
||||
|
||||
absinthe_toplevel_update_borders_geometry(toplevel);
|
||||
}
|
||||
|
||||
void absinthe_toplevel_set_border_color(struct absinthe_toplevel *toplevel, const float color[4])
|
||||
|
||||
+20
@@ -59,6 +59,26 @@ struct absinthe_toplevel *focus_get_topmost(struct absinthe_server *server)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct absinthe_toplevel *focus_get_first_tiled(struct absinthe_output *output)
|
||||
{
|
||||
struct absinthe_toplevel *toplevel;
|
||||
wl_list_for_each(toplevel, &output->server->focus_stack, flink) {
|
||||
if (toplevel->tiled && toplevel->output == output)
|
||||
return toplevel;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct absinthe_toplevel *focus_get_last_tiled(struct absinthe_output *output)
|
||||
{
|
||||
struct absinthe_toplevel *toplevel;
|
||||
wl_list_for_each_reverse(toplevel, &output->server->focus_stack, flink) {
|
||||
if (toplevel->tiled && toplevel->output == output)
|
||||
return toplevel;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void focus_next(struct absinthe_server *server)
|
||||
{
|
||||
struct absinthe_toplevel *toplevel = focus_get_topmost(server);
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ static bool keyboard_handle_keybind(struct absinthe_server *server, xkb_keysym_t
|
||||
break;
|
||||
case XKB_KEY_Return:
|
||||
if (fork() == 0)
|
||||
execl("/bin/sh", "sh", "-c", "foot", NULL);
|
||||
execl("/bin/sh", "sh", "-c", "alacritty", NULL);
|
||||
break;
|
||||
case XKB_KEY_r:
|
||||
if (fork() == 0)
|
||||
|
||||
@@ -25,9 +25,6 @@ void xdg_toplevel_commit(struct wl_listener *listener, void *data)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Update borders and position only after client prepared new buffer */
|
||||
absinthe_toplevel_set_position(toplevel, toplevel->geometry.x, toplevel->geometry.y);
|
||||
absinthe_toplevel_update_borders_geometry(toplevel);
|
||||
if (toplevel->resizing && toplevel->resizing <= toplevel->toplevel.xdg->base->current.configure_serial)
|
||||
toplevel->resizing = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user