This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgpkg: xfwm4 4.16.1-3: handle removal of GTK_FRAME_EXTENTS
Fixes Chrome/Chromium issue when maximized: https://crbug.com/1260821 git-svn-id: file:///srv/repos/svn-packages/svn@428509 eb2447ed-0c53-47e4-bac8-5bc4a241df78
- Loading branch information
foutrelis
authored and
svntogit
committed
Nov 14, 2021
1 parent
6835d40
commit 78ae433
Showing
2 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From 488288f6e35d5d3dc077e87fe2ed83129692f62e Mon Sep 17 00:00:00 2001 | ||
From: Olivier Fourdan <fourdan@xfce.org> | ||
Date: Sun, 14 Nov 2021 11:00:55 +0100 | ||
Subject: [PATCH] client: Handle removal of GTK_FRAME_EXTENTS | ||
|
||
Chromium and GOOGLE Chrome have now support for GTK_FRAME_EXTENTS. | ||
|
||
When maximizing a window, Chromium/Chrome simply removes the property | ||
on its toplevel rather than setting all values to 0. | ||
|
||
xfwm4 would simply ignore the property change because it could not read | ||
the values and therefore apply the old, wrong values. | ||
|
||
Fix xfwm4 to handle the property removal like an actual property change | ||
to 0. | ||
|
||
Signed-off-by: Olivier Fourdan <fourdan@xfce.org> | ||
Closes: https://gitlab.xfce.org/xfce/xfwm4/-/issues/603 | ||
--- | ||
src/client.c | 6 ++++++ | ||
1 file changed, 6 insertions(+) | ||
|
||
diff --git a/src/client.c b/src/client.c | ||
index 4e6affcfd..310cf90aa 100644 | ||
--- a/src/client.c | ||
+++ b/src/client.c | ||
@@ -4200,6 +4200,7 @@ clientGetGtkFrameExtents (Client * c) | ||
DisplayInfo *display_info; | ||
gboolean value_changed = FALSE; | ||
gulong *extents; | ||
+ unsigned long old_value; | ||
int nitems; | ||
int i; | ||
|
||
@@ -4209,6 +4210,8 @@ clientGetGtkFrameExtents (Client * c) | ||
screen_info = c->screen_info; | ||
display_info = screen_info->display_info; | ||
extents = NULL; | ||
+ | ||
+ old_value = FLAG_TEST (c->flags, CLIENT_FLAG_HAS_FRAME_EXTENTS); | ||
FLAG_UNSET (c->flags, CLIENT_FLAG_HAS_FRAME_EXTENTS); | ||
|
||
if (getCardinalList (display_info, c->window, GTK_FRAME_EXTENTS, &extents, &nitems)) | ||
@@ -4232,6 +4235,9 @@ clientGetGtkFrameExtents (Client * c) | ||
XFree (extents); | ||
} | ||
|
||
+ /* Adding or removing the property also counts as a change */ | ||
+ value_changed |= (old_value ^ FLAG_TEST (c->flags, CLIENT_FLAG_HAS_FRAME_EXTENTS)); | ||
+ | ||
return value_changed; | ||
} | ||
|