Disable extended frame synchronization by default
* doc/emacs/xresources.texi (Table of Resources): Document new possible value of `synchronizeResize'. * src/xfns.c (Fx_create_frame): Set synchronization protocol according to `synchronizeResize'.
This commit is contained in:
parent
30c6074d5a
commit
3775156990
2 changed files with 21 additions and 6 deletions
|
@ -379,7 +379,10 @@ manager when it has finished redrawing the display in response to a
|
|||
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
|
||||
|
|
22
src/xfns.c
22
src/xfns.c
|
@ -4815,15 +4815,25 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
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;
|
||||
|
@ -4831,7 +4841,9 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue