diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-24 21:16:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-24 21:16:10 +0200 |
commit | 317b8cbd9374dafa0c8649e9db45cdee7b748fd2 (patch) | |
tree | d1de6034752d7cec56cdc1cdb598e87f6de68c7f /sway/desktop/xwayland.c | |
parent | 4568e6c7835da29c9010ecb18ba6c430da5b2770 (diff) | |
parent | 4779d8ca41fac7ef91888fc3477f16d24ff49cad (diff) |
Merge pull request #1858 from emersion/master
Fix segfault when switching back to workspace with osu!
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index cad9156d..63d9c66e 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -266,10 +266,13 @@ static void handle_request_configure(struct wl_listener *listener, void *data) { struct wlr_xwayland_surface_configure_event *ev = data; struct sway_view *view = &xwayland_view->view; struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; - // TODO: floating windows are allowed to move around like this, but make - // sure tiling windows always stay in place. - wlr_xwayland_surface_configure(xsurface, ev->x, ev->y, - ev->width, ev->height); + if (!xsurface->mapped) { + wlr_xwayland_surface_configure(xsurface, ev->x, ev->y, + ev->width, ev->height); + return; + } + // TODO: Let floating views do whatever + configure(view, view->swayc->x, view->swayc->y, view->width, view->height); } static void handle_request_fullscreen(struct wl_listener *listener, void *data) { |