diff options
author | Olivier Fourdan <fourdan@xfce.org> | 2021-01-23 09:54:36 +0100 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2021-01-23 09:54:36 +0100 |
commit | 88c735c94ff881254d3477fe77d30aed7b5edf75 (patch) | |
tree | 38a1c3b63450850022e01ea28b3db53e7ff51598 /src | |
parent | 6ac33659960f750177d5d959e74371d3eda67132 (diff) | |
download | xfwm4-88c735c94ff881254d3477fe77d30aed7b5edf75.tar.gz |
compositor: Fix repaint timeout
Commit 2fa246ca ("Add define for compositor_timeout_cb interval")
replaced g_timeout_add() with g_timeout_add_full() to separate the
timeout and priority.
Unfortunately, in doing so, it confused the timeout and priority and
decreased the priority slightly, causing the repaint timeout to occur
less often, causing delays in repaint.
Fix the priority and timeout as intended.
Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
Fixes: 2fa246ca - Add define for compositor_timeout_cb interval
Closes: https://gitlab.xfce.org/xfce/xfwm4/-/issues/503
Diffstat (limited to 'src')
-rw-r--r-- | src/compositor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor.c b/src/compositor.c index fce517832..b292e9907 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -103,7 +103,7 @@ #define WIN_IS_SHADED(cw) (WIN_HAS_CLIENT(cw) && FLAG_TEST (cw->c->flags, CLIENT_FLAG_SHADED)) #ifndef TIMEOUT_REPAINT_PRIORITY -#define TIMEOUT_REPAINT_PRIORITY 1 +#define TIMEOUT_REPAINT_PRIORITY G_PRIORITY_DEFAULT #endif /* TIMEOUT_REPAINT_PRIORITY */ #ifndef TIMEOUT_REPAINT_MS @@ -2753,7 +2753,7 @@ add_repair (ScreenInfo *screen_info) if (screen_info->compositor_timeout_id == 0) { screen_info->compositor_timeout_id = - g_timeout_add_full (G_PRIORITY_DEFAULT + TIMEOUT_REPAINT_PRIORITY, + g_timeout_add_full (TIMEOUT_REPAINT_PRIORITY, TIMEOUT_REPAINT_MS, compositor_timeout_cb, screen_info, NULL); } |