mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
foreign: fix initial leave/enter event bug
Create foreign-toplevel-handle after initial view positioning to ensure leave/enter events are sent to the correct output. Fixes: #744
This commit is contained in:
parent
1995a33df9
commit
c81ac99d82
2 changed files with 10 additions and 5 deletions
|
|
@ -344,7 +344,6 @@ xdg_toplevel_view_map(struct view *view)
|
|||
if (!view->been_mapped) {
|
||||
struct wlr_xdg_toplevel_requested *requested =
|
||||
&xdg_toplevel_from_view(view)->requested;
|
||||
foreign_toplevel_handle_create(view);
|
||||
view_set_decorations(view, has_ssd(view));
|
||||
|
||||
position_xdg_toplevel_view(view);
|
||||
|
|
@ -357,6 +356,12 @@ xdg_toplevel_view_map(struct view *view)
|
|||
}
|
||||
|
||||
view_moved(view);
|
||||
|
||||
/*
|
||||
* Create toplevel handle after initial positioning to ensure
|
||||
* enter event is sent to the right output
|
||||
*/
|
||||
foreign_toplevel_handle_create(view);
|
||||
view->been_mapped = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -491,10 +491,6 @@ map(struct view *view)
|
|||
view->scene_node = &tree->node;
|
||||
}
|
||||
|
||||
if (!view->toplevel_handle) {
|
||||
foreign_toplevel_handle_create(view);
|
||||
}
|
||||
|
||||
if (!view->been_mapped) {
|
||||
view_set_decorations(view, want_deco(xwayland_surface));
|
||||
|
||||
|
|
@ -506,6 +502,10 @@ map(struct view *view)
|
|||
view->been_mapped = true;
|
||||
}
|
||||
|
||||
if (!view->toplevel_handle) {
|
||||
foreign_toplevel_handle_create(view);
|
||||
}
|
||||
|
||||
if (view->ssd_enabled && !view->fullscreen && !view->maximized) {
|
||||
top_left_edge_boundary_check(view);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue