1 From 488288f6e35d5d3dc077e87fe2ed83129692f62e Mon Sep 17 00:00:00 2001
2 From: Olivier Fourdan <fourdan@xfce.org>
3 Date: Sun, 14 Nov 2021 11:00:55 +0100
4 Subject: [PATCH] client: Handle removal of GTK_FRAME_EXTENTS
6 Chromium and GOOGLE Chrome have now support for GTK_FRAME_EXTENTS.
8 When maximizing a window, Chromium/Chrome simply removes the property
9 on its toplevel rather than setting all values to 0.
11 xfwm4 would simply ignore the property change because it could not read
12 the values and therefore apply the old, wrong values.
14 Fix xfwm4 to handle the property removal like an actual property change
17 Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
18 Closes: https://gitlab.xfce.org/xfce/xfwm4/-/issues/603
20 src/client.c | 6 ++++++
21 1 file changed, 6 insertions(+)
23 diff --git a/src/client.c b/src/client.c
24 index 4e6affcfd..310cf90aa 100644
27 @@ -4200,6 +4200,7 @@ clientGetGtkFrameExtents (Client * c)
28 DisplayInfo *display_info;
29 gboolean value_changed = FALSE;
31 + unsigned long old_value;
35 @@ -4209,6 +4210,8 @@ clientGetGtkFrameExtents (Client * c)
36 screen_info = c->screen_info;
37 display_info = screen_info->display_info;
40 + old_value = FLAG_TEST (c->flags, CLIENT_FLAG_HAS_FRAME_EXTENTS);
41 FLAG_UNSET (c->flags, CLIENT_FLAG_HAS_FRAME_EXTENTS);
43 if (getCardinalList (display_info, c->window, GTK_FRAME_EXTENTS, &extents, &nitems))
44 @@ -4232,6 +4235,9 @@ clientGetGtkFrameExtents (Client * c)
48 + /* Adding or removing the property also counts as a change */
49 + value_changed |= (old_value ^ FLAG_TEST (c->flags, CLIENT_FLAG_HAS_FRAME_EXTENTS));