aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-09-02 13:27:32 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-09-02 17:14:12 +1000
commit69cd1dfacaab9172fecfe0da8dce23e503483622 (patch)
treef20bf096414777d151a3405ba96fbe00356e5d8d /sway/desktop
parentca3be93757badc5bfdea82dc4abdc7e68ddf21c8 (diff)
Check modal state when determining whether an xwayland view should float
Depends on https://github.com/swaywm/wlroots/pull/1222. I don't know of a program that sets the state to modal without setting the window type, but I know the modal property works because logging the property shows it's true for the Firefox Open File dialog.
Diffstat (limited to 'sway/desktop')
-rw-r--r--sway/desktop/xwayland.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 2adc28c5..68d70b64 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -218,7 +218,9 @@ static bool wants_floating(struct sway_view *view) {
struct wlr_xwayland_surface *surface = view->wlr_xwayland_surface;
struct sway_xwayland *xwayland = &server.xwayland;
- // TODO: return true if the NET_WM_STATE is MODAL
+ if (surface->modal) {
+ return true;
+ }
for (size_t i = 0; i < surface->window_type_len; ++i) {
xcb_atom_t type = surface->window_type[i];