emacs-diffs
[Top][All Lists]
Advanced

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

master 672af0a5da: Set display size upon RRScreenChangeNotify


From: Po Lu
Subject: master 672af0a5da: Set display size upon RRScreenChangeNotify
Date: Sat, 21 May 2022 21:39:08 -0400 (EDT)

branch: master
commit 672af0a5da6d13edc221f32c36a0b89bea9e799e
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Set display size upon RRScreenChangeNotify
    
    * src/xterm.c (handle_one_xevent): Handle RRScreenChangeNotify
    correctly.
---
 src/xterm.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/xterm.c b/src/xterm.c
index 05ede2e580..5c2deb62e0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -20120,6 +20120,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
          union buffered_input_event *ev;
          Time timestamp;
          Lisp_Object current_monitors;
+         XRRScreenChangeNotifyEvent *notify;
 
          if (event->type == (dpyinfo->xrandr_event_base
                              + RRScreenChangeNotify))
@@ -20127,7 +20128,13 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
          if (event->type == (dpyinfo->xrandr_event_base
                              + RRScreenChangeNotify))
-           timestamp = ((XRRScreenChangeNotifyEvent *) event)->timestamp;
+           {
+             notify = ((XRRScreenChangeNotifyEvent *) event);
+             timestamp = notify->timestamp;
+
+             dpyinfo->screen_width = notify->width;
+             dpyinfo->screen_height = notify->height;
+           }
          else
            timestamp = 0;
 



reply via email to

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