[Xfce4-commits] [xfce/xfwm4] 01/03: compositor: Use default priority for repaint
noreply at xfce.org
noreply at xfce.org
Tue May 28 22:44:14 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 4897eed3087f09ac28a519eb8f9966e8bf532621
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Tue May 28 21:06:00 2019 +0200
compositor: Use default priority for repaint
Just check if TIMEOUT_REPAINT is defined, and use the default priority
as value for timeout.
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/compositor.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index 939ee97..06cbd2d 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -97,8 +97,7 @@
#define WIN_IS_DAMAGED(cw) (cw->damaged)
#define WIN_IS_REDIRECTED(cw) (cw->redirected)
-/* Set TIMEOUT_REPAINT to 0 to disable timeout repaint */
-#define TIMEOUT_REPAINT 1 /* msec */
+#define TIMEOUT_REPAINT
#ifndef MONITOR_ROOT_PIXMAP
#define MONITOR_ROOT_PIXMAP 1
@@ -2360,7 +2359,7 @@ paint_all (ScreenInfo *screen_info, XserverRegion region, gushort buffer)
static void
remove_timeouts (ScreenInfo *screen_info)
{
-#if TIMEOUT_REPAINT
+#ifdef TIMEOUT_REPAINT
if (screen_info->compositor_timeout_id != 0)
{
g_source_remove (screen_info->compositor_timeout_id);
@@ -2433,7 +2432,7 @@ repair_screen (ScreenInfo *screen_info)
return FALSE;
}
-#if TIMEOUT_REPAINT
+#ifdef TIMEOUT_REPAINT
static gboolean
compositor_timeout_cb (gpointer data)
{
@@ -2448,17 +2447,17 @@ compositor_timeout_cb (gpointer data)
static void
add_repair (ScreenInfo *screen_info)
{
-#if TIMEOUT_REPAINT
+#ifdef TIMEOUT_REPAINT
if (screen_info->compositor_timeout_id == 0)
{
screen_info->compositor_timeout_id =
- g_timeout_add (TIMEOUT_REPAINT,
+ g_timeout_add (G_PRIORITY_DEFAULT,
compositor_timeout_cb, screen_info);
}
#endif /* TIMEOUT_REPAINT */
}
-#if TIMEOUT_REPAINT == 0
+#ifndef TIMEOUT_REPAINT
static void
repair_display (DisplayInfo *display_info)
{
@@ -2472,7 +2471,7 @@ repair_display (DisplayInfo *display_info)
repair_screen ((ScreenInfo *) screens->data);
}
}
-#endif /* TIMEOUT_REPAINT == 0 */
+#endif /* TIMEOUT_REPAINT */
static void
add_damage (ScreenInfo *screen_info, XserverRegion damage)
@@ -4182,7 +4181,7 @@ compositorHandleEvent (DisplayInfo *display_info, XEvent *ev)
}
#endif /* HAVE_PRESENT_EXTENSION */
-#if TIMEOUT_REPAINT == 0
+#ifndef TIMEOUT_REPAINT
repair_display (display_info);
#endif /* TIMEOUT_REPAINT */
@@ -4587,7 +4586,7 @@ compositorUnmanageScreen (ScreenInfo *screen_info)
}
screen_info->compositor_active = FALSE;
-#if TIMEOUT_REPAINT
+#ifdef TIMEOUT_REPAINT
remove_timeouts (screen_info);
#endif /* TIMEOUT_REPAINT */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list