[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 50e51beabb: Allow disabling frame resize synchronization
From: |
Po Lu |
Subject: |
master 50e51beabb: Allow disabling frame resize synchronization |
Date: |
Sat, 5 Feb 2022 21:45:29 -0500 (EST) |
branch: master
commit 50e51beabb2420ba3f844742352a98c7987c4932
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Allow disabling frame resize synchronization
* doc/emacs/xresources.texi (Table of Resources): Document new
parameter `synchronizeResize'.
* etc/NEWS: Announce frame resize synchronization.
* src/xterm.c (x_term_init): Don't enable XSync if the
X resource `synchronizeResize' is off or false.
---
doc/emacs/xresources.texi | 8 ++++++++
etc/NEWS | 8 ++++++++
src/xterm.c | 16 +++++++++++++++-
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index bb362ca3ea..5e01c955d1 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -373,6 +373,14 @@ Use some location on display specific to the input method
for
displaying the preview text.
@end table
+@item @code{synchronizeResize} (class @code{SynchronizeResize})
+If @samp{off} or @samp{false}, Emacs will not try to tell the window
+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.
+
@item @code{verticalScrollBars} (class @code{ScrollBars})
Give frames scroll bars on the left if @samp{left}, on the right if
@samp{right}; don't have scroll bars if @samp{off} (@pxref{Scroll Bars}).
diff --git a/etc/NEWS b/etc/NEWS
index b432da5d48..6c5aeacb7b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -182,6 +182,14 @@ and pop-up menus.
This controls the style of the pre-edit and status areas of X input
methods.
++++
+** On X11, Emacs now tries to synchronize window resize with the window
manager.
+This leads to less flicker and empty areas of a frame being displayed
+when a frame is being resized. Unfortunately, it does not work on
+some ancient buggy window managers, so if Emacs appears to freeze, but
+is still responive to input, you can turn it off by setting the X
+resource "synchronizeResize" to "off".
+
+++
** New frame parameter 'alpha-background' and X resource "alphaBackground".
This controls the opacity of the text background when running on a
diff --git a/src/xterm.c b/src/xterm.c
index 0d0a08d078..67b9f5b38c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -15681,8 +15681,22 @@ x_term_init (Lisp_Object display_name, char
*xrm_option, char *resource_name)
dpyinfo->xsync_supported_p = XSyncInitialize (dpyinfo->display,
&dpyinfo->xsync_major,
&dpyinfo->xsync_minor);
-#endif
+ {
+ AUTO_STRING (synchronizeResize, "synchronizeResize");
+ AUTO_STRING (SynchronizeResize, "SynchronizeResize");
+
+ Lisp_Object value = gui_display_get_resource (dpyinfo,
+ synchronizeResize,
+ SynchronizeResize,
+ Qnil, Qnil);
+
+ if (STRINGP (value) &&
+ (!strcmp (SSDATA (value), "false")
+ || !strcmp (SSDATA (value), "off")))
+ dpyinfo->xsync_supported_p = false;
+ }
+#endif
/* See if a private colormap is requested. */
if (dpyinfo->visual == DefaultVisualOfScreen (dpyinfo->screen))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 50e51beabb: Allow disabling frame resize synchronization,
Po Lu <=