aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorRonan Pigott <rpigott@berkeley.edu>2020-07-12 19:53:16 -0700
committerSimon Ser <contact@emersion.fr>2020-07-14 15:46:02 +0200
commit4dd46f06acc520449b980a5ea52be544cc5bfb6d (patch)
treeeca9a2a9381de3daccd2871f8fe4bd10177e70a7 /sway
parent9bb70283e967037e6d57bc863ef96d3b5185a989 (diff)
xdg_shell: schedule configure on maximize requests
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/xdg_shell.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index 3437cc07..03f37241 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -369,6 +369,11 @@ static void handle_request_fullscreen(struct wl_listener *listener, void *data)
transaction_commit_dirty();
}
+static void handle_request_maximize(struct wl_listener *listener, void *data) {
+ struct wlr_xdg_surface *surface = data;
+ wlr_xdg_surface_schedule_configure(surface);
+}
+
static void handle_request_move(struct wl_listener *listener, void *data) {
struct sway_xdg_shell_view *xdg_shell_view =
wl_container_of(listener, xdg_shell_view, request_move);
@@ -411,6 +416,7 @@ static void handle_unmap(struct wl_listener *listener, void *data) {
wl_list_remove(&xdg_shell_view->commit.link);
wl_list_remove(&xdg_shell_view->new_popup.link);
wl_list_remove(&xdg_shell_view->request_fullscreen.link);
+ wl_list_remove(&xdg_shell_view->request_maximize.link);
wl_list_remove(&xdg_shell_view->request_move.link);
wl_list_remove(&xdg_shell_view->request_resize.link);
wl_list_remove(&xdg_shell_view->set_title.link);
@@ -459,6 +465,10 @@ static void handle_map(struct wl_listener *listener, void *data) {
wl_signal_add(&xdg_surface->toplevel->events.request_fullscreen,
&xdg_shell_view->request_fullscreen);
+ xdg_shell_view->request_maximize.notify = handle_request_maximize;
+ wl_signal_add(&xdg_surface->toplevel->events.request_maximize,
+ &xdg_shell_view->request_maximize);
+
xdg_shell_view->request_move.notify = handle_request_move;
wl_signal_add(&xdg_surface->toplevel->events.request_move,
&xdg_shell_view->request_move);