emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 5a290eb7d3: Call XRRUpdateConfiguration when the root window geom


From: Po Lu
Subject: master 5a290eb7d3: Call XRRUpdateConfiguration when the root window geometry changes
Date: Fri, 20 May 2022 23:37:12 -0400 (EDT)

branch: master
commit 5a290eb7d3e9104edf0fe1ff1d4b078a39dec3d2
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Call XRRUpdateConfiguration when the root window geometry changes
    
    * src/xterm.c (handle_one_xevent): Call XRRUpdateConfiguration
    on RRScreenChangeNotify and upon ConfigureNotify events for the
    root window.
---
 src/xterm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/xterm.c b/src/xterm.c
index b321f43da1..add0c848db 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -16613,6 +16613,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
       if (configureEvent.xconfigure.window == dpyinfo->root_window)
        {
+#ifdef HAVE_XRANDR
+         /* This function is OK to call even if the X server doesn't
+            support RandR.  */
+         XRRUpdateConfiguration (&configureEvent);
+#endif
+
          dpyinfo->screen_width = configureEvent.xconfigure.width;
          dpyinfo->screen_height = configureEvent.xconfigure.height;
        }
@@ -20114,6 +20120,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
          union buffered_input_event *ev;
          Time timestamp;
 
+         if (event->type == (dpyinfo->xrandr_event_base
+                             + RRScreenChangeNotify))
+           XRRUpdateConfiguration (event);
+
          if (event->type == (dpyinfo->xrandr_event_base
                              + RRScreenChangeNotify))
            timestamp = ((XRRScreenChangeNotifyEvent *) event)->timestamp;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]