summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2013-03-12 09:43:14 +0800
committerRichard Grenville <pyxlcy@gmail.com>2013-03-12 09:43:14 +0800
commit690589bb343f25eec4727748a990b0b60972ed8d (patch)
tree8178e99f9705b203a4ba8f5fee82b36b336c8552
parent07ed9901e7a6ff65a6baa2dcf95e206dc6970ca5 (diff)
downloadtdebase-690589bb343f25eec4727748a990b0b60972ed8d.tar.gz
tdebase-690589bb343f25eec4727748a990b0b60972ed8d.zip
Bug fix: Create OpenGL context only after initializing overlay
- Create OpenGL context only after initializing overlay, which fixes a bug that --paint-on-overlay does not work with OpenGL VSync. Thanks to tsmithe for reporting. (#7)
-rw-r--r--compton.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/compton.c b/compton.c
index 8bd853384..58a716c50 100644
--- a/compton.c
+++ b/compton.c
@@ -5863,6 +5863,14 @@ session_init(session_t *ps_old, int argc, char **argv) {
ps->o.dbe = false;
}
+ // Overlay must be initialized before double buffer, and before creation
+ // of OpenGL context.
+ if (ps->o.paint_on_overlay)
+ init_overlay(ps);
+
+ if (ps->o.dbe && !init_dbe(ps))
+ exit(1);
+
// Initialize software optimization
if (ps->o.sw_opti)
ps->o.sw_opti = swopti_init(ps);
@@ -5871,13 +5879,6 @@ session_init(session_t *ps_old, int argc, char **argv) {
if (!vsync_init(ps))
exit(1);
- // Overlay must be initialized before double buffer
- if (ps->o.paint_on_overlay)
- init_overlay(ps);
-
- if (ps->o.dbe && !init_dbe(ps))
- exit(1);
-
// Create registration window
if (!ps->reg_win && !register_cm(ps))
exit(1);