[Xfce4-commits] [xfce/xfwm4] 01/03: screen: Use computed screen size instead of xlib
noreply at xfce.org
noreply at xfce.org
Fri Jan 19 19:15:55 CET 2018
This is an automated email from the git hooks/post-receive script.
o l i v i e r p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfwm4.
commit 480517d49d3e4cf48357fbe47d193f62542ab94b
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Thu Jan 18 21:18:04 2018 +0100
screen: Use computed screen size instead of xlib
When the xrandr layout is changed, we recompute the screen size on the
actual monitors size and layout.
Use this computed value instead of the size reported by Xlib as it's not
yet updated by the time we reconfigure our display. This is particularly
bad when the compositor is enabled as the overlay window end up being of
the wrong size.
---
src/screen.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/screen.c b/src/screen.c
index 3352f1d..7edb83e 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -664,15 +664,13 @@ myScreenComputeSize (ScreenInfo *screen_info)
width, height, screen_info->logical_width, screen_info->logical_height);
}
- /* Keep the smallest size between what we computed and the
- * reported size for the screen.
- */
- if (width == 0 || width > screen_info->logical_width)
+ /* If we failed to compute the size, use whatever xlib reports */
+ if (width == 0)
{
width = screen_info->logical_width;
}
- if (height == 0 || height > screen_info->logical_height)
+ if (height == 0)
{
height = screen_info->logical_height;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list