[gtk/matthiasc/surface-state-rework: 76/80] wayland/toplevel: Don't alwyas skip changing xdg_toplevel state
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/surface-state-rework: 76/80] wayland/toplevel: Don't alwyas skip changing xdg_toplevel state
- Date: Sat, 5 Dec 2020 17:42:41 +0000 (UTC)
commit 6bb7783e68a92ae2eaa65e2ac6a2f850eed7ce96
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Sat Dec 5 15:57:45 2020 +0100
wayland/toplevel: Don't alwyas skip changing xdg_toplevel state
We only called xdg_toplevel.(un)set_maximize() if the toplevel layout
changed, but this misses the case when the compositor had changed the
maximized state. Change it to call the xdg_toplevel request if either
the local layout changed, or if the layout differs from the current
state.
This fixes an issue where one couldn't unmaximize a window by double
clicking the titlebar that, had previously been maximized e.g. using a
keyboard binding.
Do the same for fullscreen.
gdk/wayland/gdksurface-wayland.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index c152acf3e5..9ce5669bac 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -4876,6 +4876,8 @@ did_maximize_layout_change (GdkToplevel *toplevel,
return TRUE;
if (gdk_toplevel_layout_get_maximized (impl->toplevel.layout) !=
+ gdk_toplevel_layout_get_maximized (layout) ||
+ !!(surface->state & GDK_TOPLEVEL_STATE_MAXIMIZED) !=
gdk_toplevel_layout_get_maximized (layout))
return TRUE;
@@ -4893,6 +4895,8 @@ did_fullscreen_layout_change (GdkToplevel *toplevel,
return TRUE;
if (gdk_toplevel_layout_get_fullscreen (impl->toplevel.layout) !=
+ gdk_toplevel_layout_get_fullscreen (layout) ||
+ !!(surface->state & GDK_TOPLEVEL_STATE_FULLSCREEN) !=
gdk_toplevel_layout_get_fullscreen (layout))
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]