[Xfce4-commits] [xfce/xfwm4] 02/02: compositor: Base zoom update or refresh rate
noreply at xfce.org
noreply at xfce.org
Sun May 12 19:18:25 CEST 2019
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 9bba554180e230a928422e682aa840ad0c8db793
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sun May 12 19:12:27 2019 +0200
compositor: Base zoom update or refresh rate
Bug: 15391
Previously, the zoom update was based on XRandr refresh rate รท 2, or
30 by default if not available.
But that XRandr code was removed along with the removal of the fake
vblank sync code in favor of XPresent or GLX.
Base the zoom update on half the refresh rate of the primary monitor (if
available from GDK), so we would get the same results as with 4.12.
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/compositor.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/compositor.c b/src/compositor.c
index a2c7557..ab4f4db 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -56,6 +56,8 @@
#include "compositor.h"
#ifdef HAVE_COMPOSITOR
+#include "common/xfwm-common.h"
+
#include <X11/extensions/Xcomposite.h>
#include <X11/extensions/Xdamage.h>
#include <X11/extensions/Xrender.h>
@@ -4179,7 +4181,10 @@ compositorZoomIn (ScreenInfo *screen_info, XfwmEventButton *event)
screen_info->zoomed = TRUE;
if (!screen_info->zoom_timeout_id)
{
- screen_info->zoom_timeout_id = g_timeout_add ((1000 / 30 /* per second */),
+ gint timeout_rate;
+
+ timeout_rate = xfwm_get_primary_refresh_rate (screen_info->gscr) / 2;
+ screen_info->zoom_timeout_id = g_timeout_add ((1000 / timeout_rate /* per second */),
zoom_timeout_cb, screen_info);
}
recenter_zoomed_area (screen_info, event->x_root, event->y_root);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list