diff options
Diffstat (limited to 'sway/handlers.c')
-rw-r--r-- | sway/handlers.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/handlers.c b/sway/handlers.c index 77e8f237..b166b7a6 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -104,6 +104,7 @@ static bool handle_view_created(wlc_handle handle) { | |||
104 | // Float popups | 104 | // Float popups |
105 | if (type & WLC_BIT_POPUP) { | 105 | if (type & WLC_BIT_POPUP) { |
106 | swayc_t *view = new_floating_view(handle); | 106 | swayc_t *view = new_floating_view(handle); |
107 | wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, false); | ||
107 | focus_view(view); | 108 | focus_view(view); |
108 | arrange_windows(active_workspace, -1, -1); | 109 | arrange_windows(active_workspace, -1, -1); |
109 | } | 110 | } |
@@ -136,13 +137,17 @@ static void handle_view_destroyed(wlc_handle handle) { | |||
136 | focus_view(focus_pointer()); | 137 | focus_view(focus_pointer()); |
137 | arrange_windows(active_workspace, -1, -1); | 138 | arrange_windows(active_workspace, -1, -1); |
138 | return; | 139 | return; |
139 | } | 140 | } |
140 | 141 | ||
141 | if (type & WLC_BIT_OVERRIDE_REDIRECT) { | 142 | if (type & WLC_BIT_OVERRIDE_REDIRECT) { |
142 | focus_view(focus_pointer()); | 143 | focus_view(focus_pointer()); |
143 | arrange_windows(active_workspace, -1, -1); | 144 | arrange_windows(active_workspace, -1, -1); |
144 | return; | 145 | return; |
145 | } | 146 | } |
147 | if (type & WLC_BIT_POPUP) { | ||
148 | swayc_t *view = get_swayc_for_handle(handle, &root_container); | ||
149 | destroy_view(view); | ||
150 | } | ||
146 | } | 151 | } |
147 | swayc_t *view = get_swayc_for_handle(handle, &root_container); | 152 | swayc_t *view = get_swayc_for_handle(handle, &root_container); |
148 | swayc_t *parent; | 153 | swayc_t *parent; |