diff --git a/COMPLIANCE b/COMPLIANCE index da3448dc..3f0bcaea 100644 --- a/COMPLIANCE +++ b/COMPLIANCE @@ -103,6 +103,7 @@ Application Window Properties Window Manager Protocols ~~~~~~~~~~~~~~~~~~~~~~~~ [ ] _NET_WM_PING +[+] _NET_WM_SYNC_REQUEST GNOME Compliance (_WIN_... hints) diff --git a/configure.in b/configure.in index e378426a..c05d8381 100644 --- a/configure.in +++ b/configure.in @@ -195,8 +195,8 @@ if test "x$enable_zoom" = "xyes"; then fi AC_ARG_ENABLE(xsync, - [ --enable-xsync compile with SYNC support (experimental!) @<:@default=no@:>@],, - enable_xsync=no) + [ --enable-xsync compile with SYNC support @<:@default=yes@:>@],, + enable_xsync=yes) if test "x$enable_xsync" = "xyes"; then AC_CHECK_LIB(Xext, XSyncQueryExtension, AC_DEFINE(HAS_XSYNC, 1, [SYNC support]), @@ -318,12 +318,12 @@ echo " Zoom ......................... $enable_zoom" echo " Xft .......................... $enable_xft" echo " Xinerama ..................... $enable_xinerama" echo " RandR ........................ $enable_xrandr" +echo " Sync ......................... $enable_xsync" echo " Composite .................... $enable_composite" echo " Window mode helper library ... $enable_roothacklib" echo echo "Experimental options - DO NOT USE unless you know what you are doing" echo " Compile with ecore/ecore_x ... $enable_ecore" -echo " Sync ......................... $enable_xsync" echo " ScreenSaver .................. $enable_xscrnsaver" echo echo "Installation Path .............. $prefix" diff --git a/src/ewin-ops.c b/src/ewin-ops.c index 94ea6664..f5691147 100644 --- a/src/ewin-ops.c +++ b/src/ewin-ops.c @@ -298,7 +298,7 @@ doEwinMoveResize(EWin * ewin, Desk * dsk, int x, int y, int w, int h, int flags) { static int call_depth = 0; int dx, dy, sw, sh, xo, yo; - char move, resize, reparent, raise, floating; + char move, resize, reparent, raise, floating, configure; EWin **lst; int i, num; Desk *pdesk; @@ -461,6 +461,16 @@ doEwinMoveResize(EWin * ewin, Desk * dsk, int x, int y, int w, int h, int flags) else EoMoveResize(ewin, x, y, w, h); + configure = 0; + if (Mode.mode == MODE_NONE || resize || Conf.movres.update_while_moving) + { + configure = 1; +#if USE_XSYNC + if (Conf.testing.use_sync) + EwinSyncRequestSend(ewin); +#endif + } + if (flags & MRF_RESIZE) { if (!ewin->state.shaded) @@ -490,6 +500,7 @@ doEwinMoveResize(EWin * ewin, Desk * dsk, int x, int y, int w, int h, int flags) if (resize && ewin->state.shaped) ewin->update.shape = 1; } + EwinPropagateShapes(ewin); if (raise) @@ -498,8 +509,15 @@ doEwinMoveResize(EWin * ewin, Desk * dsk, int x, int y, int w, int h, int flags) EwinRaise(ewin); } - if (Mode.mode == MODE_NONE || Conf.movres.update_while_moving) - ICCCM_Configure(ewin); + if (configure) + { + if (!resize) + ICCCM_Configure(ewin); +#if USE_XSYNC + if (Conf.testing.use_sync) + EwinSyncRequestWait(ewin); +#endif + } if (flags & (MRF_DESK | MRF_MOVE | MRF_FLOAT | MRF_UNFLOAT)) { diff --git a/src/icccm.c b/src/icccm.c index 4c6b76c6..0e284b3f 100644 --- a/src/icccm.c +++ b/src/icccm.c @@ -777,8 +777,7 @@ EwinSyncRequestSend(EWin * ewin) { long long count; - if (!Conf.testing.use_sync || !ewin->ewmh.sync_request_enable || - EServerIsGrabbed()) + if (!ewin->ewmh.sync_request_enable || EServerIsGrabbed()) return 0; count = ++ewin->ewmh.sync_request_count; @@ -801,8 +800,7 @@ EwinSyncRequestWait(EWin * ewin) XSyncWaitCondition xswc[2]; double t; - if (!Conf.testing.use_sync || !ewin->ewmh.sync_request_enable || - EServerIsGrabbed()) + if (!ewin->ewmh.sync_request_enable || EServerIsGrabbed()) return; xswc[0].trigger.counter = ewin->ewmh.sync_request_counter; @@ -815,7 +813,7 @@ EwinSyncRequestWait(EWin * ewin) xswc[1].trigger.counter = Mode.display.server_time; xswc[1].trigger.value_type = XSyncRelative; - XSyncIntsToValue(&xswc[1].trigger.wait_value, 1000, 0); /* 1 sec */ + XSyncIntsToValue(&xswc[1].trigger.wait_value, 200, 0); /* 200 ms */ xswc[1].trigger.test_type = XSyncPositiveComparison; XSyncIntsToValue(&xswc[1].event_threshold, 0, 0);