From 8abd43803bd1069c47bbbf83c8ff6042b29f1b19 Mon Sep 17 00:00:00 2001 From: Consolatis <40171-Consolatis@users.noreply.gitlab.freedesktop.org> Date: Mon, 29 Apr 2024 18:04:11 +0200 Subject: [PATCH] xwayland: remove saved_{width,height} This has been introduced way back in be297d9d144739e39e9264bc91fa95990873ced0 but is never used anywhere. If compositors want to save the old dimensions before reacting to a fullscreen or maximize event they can just grab the sizes within their event handlers instead. --- include/wlr/xwayland/xwayland.h | 1 - xwayland/xwm.c | 15 --------------- 2 files changed, 16 deletions(-) diff --git a/include/wlr/xwayland/xwayland.h b/include/wlr/xwayland/xwayland.h index 8f066a2f..4b476a03 100644 --- a/include/wlr/xwayland/xwayland.h +++ b/include/wlr/xwayland/xwayland.h @@ -118,7 +118,6 @@ struct wlr_xwayland_surface { int16_t x, y; uint16_t width, height; - uint16_t saved_width, saved_height; bool override_redirect; char *title; diff --git a/xwayland/xwm.c b/xwayland/xwm.c index d5b2aed8..c65851bb 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -1394,29 +1394,14 @@ static void xwm_handle_net_wm_state_message(struct wlr_xwm *xwm, // all other values are set to 0 if (fullscreen != xsurface->fullscreen) { - if (xsurface->fullscreen) { - xsurface->saved_width = xsurface->width; - xsurface->saved_height = xsurface->height; - } - wl_signal_emit_mutable(&xsurface->events.request_fullscreen, NULL); } if (maximized != xsurface_is_maximized(xsurface)) { - if (xsurface_is_maximized(xsurface)) { - xsurface->saved_width = xsurface->width; - xsurface->saved_height = xsurface->height; - } - wl_signal_emit_mutable(&xsurface->events.request_maximize, NULL); } if (minimized != xsurface->minimized) { - if (xsurface->minimized) { - xsurface->saved_width = xsurface->width; - xsurface->saved_height = xsurface->height; - } - struct wlr_xwayland_minimize_event minimize_event = { .surface = xsurface, .minimize = xsurface->minimized,