diff options
author | emersion <contact@emersion.fr> | 2018-04-29 13:10:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-29 13:10:59 +0100 |
commit | 976e6b99b62891a72e48fca21b93708e060c134a (patch) | |
tree | 472f59488b8ae77b5f296de8d17e5ba68d4407fb /sway/desktop | |
parent | 167c2e1aa99aa8011e169b0fb61c47953cc9a5f6 (diff) | |
parent | 24ab66d123ab493feb3c2343cbc9d93625b668d7 (diff) |
Merge branch 'master' into refactor-arrange-windows
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 9 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index fdfb9346..2aaedd6c 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c @@ -228,13 +228,15 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data) struct sway_xdg_shell_v6_view *xdg_shell_v6_view = wl_container_of(listener, xdg_shell_v6_view, request_fullscreen); struct wlr_xdg_toplevel_v6_set_fullscreen_event *e = data; + struct wlr_xdg_surface_v6 *xdg_surface = + xdg_shell_v6_view->view.wlr_xdg_surface_v6; - if (!sway_assert(xdg_shell_v6_view->view.wlr_xdg_surface_v6->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL, + if (!sway_assert(xdg_surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL, "xdg_shell_v6 requested fullscreen of surface with role %i", - xdg_shell_v6_view->view.wlr_xdg_surface_v6->role)) { + xdg_surface->role)) { return; } - if (!xdg_shell_v6_view->view.wlr_xdg_surface_v6->mapped) { + if (!xdg_surface->mapped) { return; } @@ -267,7 +269,6 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { // TODO: // - Look up pid and open on appropriate workspace - // - Criteria xdg_shell_v6_view->map.notify = handle_map; wl_signal_add(&xdg_surface->events.map, &xdg_shell_v6_view->map); diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 63d9c66e..aa9e1797 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -280,6 +280,9 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data) wl_container_of(listener, xwayland_view, request_fullscreen); struct sway_view *view = &xwayland_view->view; struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; + if (!xsurface->mapped) { + return; + } view_set_fullscreen(view, xsurface->fullscreen); } @@ -309,7 +312,6 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) { // TODO: // - Look up pid and open on appropriate workspace - // - Criteria wl_signal_add(&xsurface->events.destroy, &xwayland_view->destroy); xwayland_view->destroy.notify = handle_destroy; |