temp xwayland fix

This commit is contained in:
2026-04-19 19:45:45 +07:00
parent df3e188b1d
commit 31ae30c38f
2 changed files with 11 additions and 5 deletions
+9 -3
View File
@@ -12,7 +12,13 @@ void focus_toplevel(struct absinthe_toplevel *toplevel)
struct absinthe_server *server = toplevel->server;
struct wlr_seat *seat = server->seat;
struct wlr_surface *prev_surface = seat->keyboard_state.focused_surface;
struct wlr_surface *surface = toplevel->toplevel.xdg->base->surface;
struct wlr_surface *surface;
#ifdef XWAYLAND
if (absinthe_toplevel_is_x11(toplevel))
surface = toplevel->toplevel.x11->surface;
else
#endif
surface = toplevel->toplevel.xdg->base->surface;
if (surface == prev_surface)
return;
@@ -20,7 +26,7 @@ void focus_toplevel(struct absinthe_toplevel *toplevel)
if (prev_surface) {
struct wlr_xdg_toplevel *prev_toplevel = wlr_xdg_toplevel_try_from_wlr_surface(prev_surface);
if (prev_toplevel) {
wlr_xdg_toplevel_set_activated(prev_toplevel, false);
// wlr_xdg_toplevel_set_activated(prev_toplevel, false);
absinthe_toplevel_set_border_color(prev_toplevel->base->data, unfocused_border_color);
}
}
@@ -31,7 +37,7 @@ void focus_toplevel(struct absinthe_toplevel *toplevel)
wlr_scene_node_raise_to_top(&toplevel->scene_tree->node);
wl_list_remove(&toplevel->flink);
wl_list_insert(&server->focus_stack, &toplevel->flink);
wlr_xdg_toplevel_set_activated(toplevel->toplevel.xdg, true);
// wlr_xdg_toplevel_set_activated(toplevel->toplevel.xdg, true);
absinthe_toplevel_set_border_color(toplevel, focused_border_color);
if (keyboard)
+2 -2
View File
@@ -26,8 +26,8 @@ void xwayland_dissociate(struct wl_listener *listener, void *data)
{
struct absinthe_toplevel *toplevel = wl_container_of(listener, toplevel, xwayland_dissociate);
// wl_list_remove(&toplevel->map.link);
// wl_list_remove(&toplevel->unmap.link);
wl_list_remove(&toplevel->map.link);
wl_list_remove(&toplevel->unmap.link);
}
void xwayland_configure(struct wl_listener *listener, void *data)