diff options
| author | Po Lu | 2022-10-26 20:37:53 +0800 |
|---|---|---|
| committer | Po Lu | 2022-10-26 20:38:05 +0800 |
| commit | 32dd769ca441a1bd9bf72494472d0a20e195f9af (patch) | |
| tree | b1901cbc7b604381dc09ccdcc89b082b9336b2e3 /src | |
| parent | 0fbafe6511619466f9fd8325c80ea71d202f4722 (diff) | |
| download | emacs-32dd769ca441a1bd9bf72494472d0a20e195f9af.tar.gz emacs-32dd769ca441a1bd9bf72494472d0a20e195f9af.zip | |
Clean up some event handling code
* src/xterm.c (handle_one_xevent): Use dpyinfo where
FRAME_DISPLAY_INFO could be substituted for it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c index b061383a2ea..9f6112745e2 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -18917,8 +18917,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 18917 | x_real_positions (f, &f->left_pos, &f->top_pos); | 18917 | x_real_positions (f, &f->left_pos, &f->top_pos); |
| 18918 | 18918 | ||
| 18919 | /* Perhaps reparented due to a WM restart. Reset this. */ | 18919 | /* Perhaps reparented due to a WM restart. Reset this. */ |
| 18920 | FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN; | 18920 | dpyinfo->wm_type = X_WMTYPE_UNKNOWN; |
| 18921 | FRAME_DISPLAY_INFO (f)->net_supported_window = 0; | 18921 | dpyinfo->net_supported_window = 0; |
| 18922 | 18922 | ||
| 18923 | #ifndef USE_GTK | 18923 | #ifndef USE_GTK |
| 18924 | /* The window manager could have restarted and the new | 18924 | /* The window manager could have restarted and the new |
| @@ -19387,7 +19387,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 19387 | *finish = X_EVENT_DROP; | 19387 | *finish = X_EVENT_DROP; |
| 19388 | #endif | 19388 | #endif |
| 19389 | 19389 | ||
| 19390 | xkey.state |= x_emacs_to_x_modifiers (FRAME_DISPLAY_INFO (f), | 19390 | xkey.state |= x_emacs_to_x_modifiers (dpyinfo, |
| 19391 | extra_keyboard_modifiers); | 19391 | extra_keyboard_modifiers); |
| 19392 | modifiers = xkey.state; | 19392 | modifiers = xkey.state; |
| 19393 | 19393 | ||
| @@ -19504,7 +19504,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 19504 | /* Common for all keysym input events. */ | 19504 | /* Common for all keysym input events. */ |
| 19505 | XSETFRAME (inev.ie.frame_or_window, f); | 19505 | XSETFRAME (inev.ie.frame_or_window, f); |
| 19506 | inev.ie.modifiers | 19506 | inev.ie.modifiers |
| 19507 | = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers); | 19507 | = x_x_to_emacs_modifiers (dpyinfo, modifiers); |
| 19508 | inev.ie.timestamp = xkey.time; | 19508 | inev.ie.timestamp = xkey.time; |
| 19509 | 19509 | ||
| 19510 | /* First deal with keysyms which have defined | 19510 | /* First deal with keysyms which have defined |
| @@ -23832,8 +23832,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 23832 | xi_compute_root_window_offset_pinch (any, pev); | 23832 | xi_compute_root_window_offset_pinch (any, pev); |
| 23833 | 23833 | ||
| 23834 | inev.ie.kind = PINCH_EVENT; | 23834 | inev.ie.kind = PINCH_EVENT; |
| 23835 | inev.ie.modifiers = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (any), | 23835 | inev.ie.modifiers |
| 23836 | pev->mods.effective); | 23836 | = x_x_to_emacs_modifiers (dpyinfo, pev->mods.effective); |
| 23837 | |||
| 23837 | XSETINT (inev.ie.x, lrint (pev->event_x)); | 23838 | XSETINT (inev.ie.x, lrint (pev->event_x)); |
| 23838 | XSETINT (inev.ie.y, lrint (pev->event_y)); | 23839 | XSETINT (inev.ie.y, lrint (pev->event_y)); |
| 23839 | XSETFRAME (inev.ie.frame_or_window, any); | 23840 | XSETFRAME (inev.ie.frame_or_window, any); |