diff options
author | Ilia Bozhinov <ammen99@gmail.com> | 2017-06-28 00:08:40 +0300 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-07-21 17:38:01 +0200 |
commit | 3e5303daf4212334f1859a025a3de7449efa2b49 (patch) | |
tree | 0b55d53349390a60d4045838afeb81777ad70016 /xwayland | |
parent | 749637a8a306588964885fe6b25fda6087a84ccd (diff) | |
download | weston-3e5303daf4212334f1859a025a3de7449efa2b49.tar.gz |
xwm: update override-redirect surface's position upon configure_notify
When we receive configure_notify we should update the surface's
position by calling xwayland_api->set_xwayland(). Otherwise some surfaces
like dnd surfaces from xwayland views are "stuck" at one place. When
setting XWAYLAND state though we should always call view_set_position(),
not just the first time we set this state.
Signed-off-by: Ilia Bozhinov <ammen99@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/window-manager.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index 25008539..3e8c4c7c 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -739,6 +739,8 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve { xcb_configure_notify_event_t *configure_notify = (xcb_configure_notify_event_t *) event; + const struct weston_desktop_xwayland_interface *xwayland_api = + wm->server->compositor->xwayland_interface; struct weston_wm_window *window; wm_log("XCB_CONFIGURE_NOTIFY (window %d) %d,%d @ %dx%d%s\n", @@ -760,6 +762,13 @@ weston_wm_handle_configure_notify(struct weston_wm *wm, xcb_generic_event_t *eve if (window->frame) frame_resize_inside(window->frame, window->width, window->height); + + /* We should check if shsurf has been created because sometimes + * there are races + * (configure_notify is sent before xserver_map_surface) */ + if (window->shsurf) + xwayland_api->set_xwayland(window->shsurf, + window->x, window->y); } } |