mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
xwayland: sync foreign-toplevel and associated outputs on re-map
Fixes a bug that `zwlr_foreign_toplevel_handle_v1::output_enter` is not sent when a xwayland surface is re-mapped (e.g. opening Slack desktop app when it's running in background).
This commit is contained in:
parent
98c876d796
commit
f31457392b
1 changed files with 10 additions and 10 deletions
|
|
@ -738,15 +738,6 @@ xwayland_view_map(struct view *view)
|
||||||
view->scene_node = &tree->node;
|
view->scene_node = &tree->node;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Exclude unfocusable views from wlr-foreign-toplevel. These
|
|
||||||
* views (notifications, floating toolbars, etc.) should not be
|
|
||||||
* shown in taskbars/docks/etc.
|
|
||||||
*/
|
|
||||||
if (!view->toplevel.handle && view_is_focusable(view)) {
|
|
||||||
init_foreign_toplevel(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!view->been_mapped) {
|
if (!view->been_mapped) {
|
||||||
check_natural_geometry(view);
|
check_natural_geometry(view);
|
||||||
set_initial_position(view, xwayland_surface);
|
set_initial_position(view, xwayland_surface);
|
||||||
|
|
@ -760,6 +751,16 @@ xwayland_view_map(struct view *view)
|
||||||
view_moved(view);
|
view_moved(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Exclude unfocusable views from wlr-foreign-toplevel. These
|
||||||
|
* views (notifications, floating toolbars, etc.) should not be
|
||||||
|
* shown in taskbars/docks/etc.
|
||||||
|
*/
|
||||||
|
if (!view->toplevel.handle && view_is_focusable(view)) {
|
||||||
|
init_foreign_toplevel(view);
|
||||||
|
foreign_toplevel_update_outputs(view);
|
||||||
|
}
|
||||||
|
|
||||||
/* Add commit here, as xwayland map/unmap can change the wlr_surface */
|
/* Add commit here, as xwayland map/unmap can change the wlr_surface */
|
||||||
wl_signal_add(&xwayland_surface->surface->events.commit, &view->commit);
|
wl_signal_add(&xwayland_surface->surface->events.commit, &view->commit);
|
||||||
view->commit.notify = handle_commit;
|
view->commit.notify = handle_commit;
|
||||||
|
|
@ -797,7 +798,6 @@ xwayland_view_unmap(struct view *view, bool client_request)
|
||||||
out:
|
out:
|
||||||
if (client_request && view->toplevel.handle) {
|
if (client_request && view->toplevel.handle) {
|
||||||
wlr_foreign_toplevel_handle_v1_destroy(view->toplevel.handle);
|
wlr_foreign_toplevel_handle_v1_destroy(view->toplevel.handle);
|
||||||
view->toplevel.handle = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue