emacs-diffs
[Top][All Lists]
Advanced

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

master 32dd769ca4: Clean up some event handling code


From: Po Lu
Subject: master 32dd769ca4: Clean up some event handling code
Date: Wed, 26 Oct 2022 08:38:15 -0400 (EDT)

branch: master
commit 32dd769ca441a1bd9bf72494472d0a20e195f9af
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Clean up some event handling code
    
    * src/xterm.c (handle_one_xevent): Use dpyinfo where
    FRAME_DISPLAY_INFO could be substituted for it.
---
 src/xterm.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index b061383a2e..9f6112745e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -18917,8 +18917,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
              x_real_positions (f, &f->left_pos, &f->top_pos);
 
              /* Perhaps reparented due to a WM restart.  Reset this.  */
-             FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN;
-             FRAME_DISPLAY_INFO (f)->net_supported_window = 0;
+             dpyinfo->wm_type = X_WMTYPE_UNKNOWN;
+             dpyinfo->net_supported_window = 0;
 
 #ifndef USE_GTK
              /* The window manager could have restarted and the new
@@ -19387,7 +19387,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
           *finish = X_EVENT_DROP;
 #endif
 
-          xkey.state |= x_emacs_to_x_modifiers (FRAME_DISPLAY_INFO (f),
+          xkey.state |= x_emacs_to_x_modifiers (dpyinfo,
                                                extra_keyboard_modifiers);
           modifiers = xkey.state;
 
@@ -19504,7 +19504,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
          /* Common for all keysym input events.  */
          XSETFRAME (inev.ie.frame_or_window, f);
          inev.ie.modifiers
-           = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers);
+           = x_x_to_emacs_modifiers (dpyinfo, modifiers);
          inev.ie.timestamp = xkey.time;
 
          /* First deal with keysyms which have defined
@@ -23832,8 +23832,9 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                    xi_compute_root_window_offset_pinch (any, pev);
 
                  inev.ie.kind = PINCH_EVENT;
-                 inev.ie.modifiers = x_x_to_emacs_modifiers 
(FRAME_DISPLAY_INFO (any),
-                                                             
pev->mods.effective);
+                 inev.ie.modifiers
+                   = x_x_to_emacs_modifiers (dpyinfo, pev->mods.effective);
+
                  XSETINT (inev.ie.x, lrint (pev->event_x));
                  XSETINT (inev.ie.y, lrint (pev->event_y));
                  XSETFRAME (inev.ie.frame_or_window, any);



reply via email to

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