request to resize a frame. Otherwise, the window manager will
postpone drawing a frame that was just resized until its contents are
updated, which prevents blank areas of a frame that have not yet been
-painted from being displayed.
+painted from being displayed. If set to @samp{extended}, it will
+enable use of extended frame synchronization, which might be supported
+by some compositing window managers which don't support basic
+synchronization.
@item @code{verticalScrollBars} (class @code{ScrollBars})
Give frames scroll bars on the left if @samp{left}, on the right if
XSyncValue initial_value;
XSyncCounter counters[2];
+ AUTO_STRING (synchronizeResize, "synchronizeResize");
+ AUTO_STRING (SynchronizeResize, "SynchronizeResize");
+
+ Lisp_Object value = gui_display_get_resource (dpyinfo,
+ synchronizeResize,
+ SynchronizeResize,
+ Qnil, Qnil);
+
XSyncIntToValue (&initial_value, 0);
counters[0]
= FRAME_X_BASIC_COUNTER (f)
= XSyncCreateCounter (FRAME_X_DISPLAY (f),
initial_value);
- counters[1]
- = FRAME_X_EXTENDED_COUNTER (f)
- = XSyncCreateCounter (FRAME_X_DISPLAY (f),
- initial_value);
+
+ if (STRINGP (value) && !strcmp (SSDATA (value), "extended"))
+ counters[1]
+ = FRAME_X_EXTENDED_COUNTER (f)
+ = XSyncCreateCounter (FRAME_X_DISPLAY (f),
+ initial_value);
FRAME_X_OUTPUT (f)->current_extended_counter_value
= initial_value;
XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
dpyinfo->Xatom_net_wm_sync_request_counter,
XA_CARDINAL, 32, PropModeReplace,
- (unsigned char *) &counters, 2);
+ (unsigned char *) &counters,
+ ((STRINGP (value)
+ && !strcmp (SSDATA (value), "extended")) ? 2 : 1));
#endif
}
#endif