summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/compiz-core.h2
-rw-r--r--src/display.c9
-rw-r--r--src/main.c14
3 files changed, 22 insertions, 3 deletions
diff --git a/include/compiz-core.h b/include/compiz-core.h
index 05409f5d..d9c7ca5a 100644
--- a/include/compiz-core.h
+++ b/include/compiz-core.h
@@ -219,6 +219,8 @@ extern Bool useCow;
extern Bool noDetection;
extern Bool useDesktopHints;
extern Bool onlyCurrentScreen;
+extern Bool noWait;
+extern Bool alwaysSwap;
extern int defaultRefreshRate;
extern char *defaultTextureFilter;
diff --git a/src/display.c b/src/display.c
index caf63d46..dcb05cb9 100644
--- a/src/display.c
+++ b/src/display.c
@@ -1450,6 +1450,9 @@ eventLoop (void)
s->idle ? s->redrawTime :
timeDiff);
+ if (alwaysSwap == TRUE)
+ damageScreen (s);
+
/* substract top most overlay window region */
if (s->overlayWindowCount)
{
@@ -1509,9 +1512,11 @@ eventLoop (void)
targetScreen = NULL;
targetOutput = &s->outputDev[0];
- waitForVideoSync (s);
+ if (!noWait)
+ waitForVideoSync (s);
- if (mask & COMP_SCREEN_DAMAGE_ALL_MASK)
+ if ((mask & COMP_SCREEN_DAMAGE_ALL_MASK) ||
+ (alwaysSwap == TRUE))
{
glXSwapBuffers (d->display, s->output);
}
diff --git a/src/main.c b/src/main.c
index e089bbb0..8f20a1c0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -63,6 +63,8 @@ Bool strictBinding = TRUE;
Bool noDetection = FALSE;
Bool useDesktopHints = FALSE;
Bool onlyCurrentScreen = FALSE;
+Bool noWait = FALSE;
+Bool alwaysSwap = FALSE;
#ifdef USE_COW
Bool useCow = TRUE;
@@ -85,7 +87,9 @@ usage (void)
"[--replace]\n "
"[--sm-disable] "
"[--sm-client-id ID] "
- "[--only-current-screen]\n "
+ "[--only-current-screen] "
+ "[--no-wait]\n "
+ "[--always-swap]"
#ifdef USE_COW
" [--use-root-window] "
@@ -364,6 +368,14 @@ main (int argc, char **argv)
if (i + 1 < argc)
backgroundImage = argv[++i];
}
+ else if (!strcmp (argv[i], "--no-wait"))
+ {
+ noWait = TRUE;
+ }
+ else if (!strcmp (argv[i], "--always-swap"))
+ {
+ alwaysSwap = TRUE;
+ }
else if (*argv[i] == '-')
{
compLogMessage ("core", CompLogLevelWarn,