aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2022-01-21 15:32:45 +0800
committerPo Lu2022-01-21 15:32:45 +0800
commit6e8bafc99698714846de29afc8fe329dd5bc92c2 (patch)
tree5b3f6e4f1bed52922dc08f62442e02d41c5b8bef
parent03f4a2ff640d50af11a0131498f15ebf6ed16d30 (diff)
downloademacs-6e8bafc99698714846de29afc8fe329dd5bc92c2.tar.gz
emacs-6e8bafc99698714846de29afc8fe329dd5bc92c2.zip
Synchronize XI2 code with Core Input code
* src/xterm.c (handle_one_xevent): Apply recent changes for XI2 events as well.
-rw-r--r--src/xterm.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 244b11e0f75..c7d2dadff18 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10285,26 +10285,33 @@ handle_one_xevent (struct x_display_info *dpyinfo,
10285 { 10285 {
10286 case XI_FocusIn: 10286 case XI_FocusIn:
10287 any = x_any_window_to_frame (dpyinfo, focusin->event); 10287 any = x_any_window_to_frame (dpyinfo, focusin->event);
10288#ifndef USE_GTK 10288#ifdef USE_GTK
10289 /* Some WMs (e.g. Mutter in Gnome Shell), don't unmap 10289 /* Some WMs (e.g. Mutter in Gnome Shell), don't unmap
10290 minimized/iconified windows; thus, for those WMs we won't get 10290 minimized/iconified windows; thus, for those WMs we won't get
10291 a MapNotify when unminimizing/deconifying. Check here if we 10291 a MapNotify when unminimizing/deiconifying. Check here if we
10292 are deiconizing a window (Bug42655). 10292 are deiconizing a window (Bug42655).
10293 10293
10294 But don't do that on GTK since it may cause a plain invisible 10294 But don't do that by default on GTK since it may cause a plain
10295 frame get reported as iconified, compare 10295 invisible frame get reported as iconified, compare
10296 https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html. 10296 https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html.
10297 That is fixed above but bites us here again. */ 10297 That is fixed above but bites us here again.
10298 f = any; 10298
10299 if (f && FRAME_ICONIFIED_P (f)) 10299 The option x_set_frame_visibility_more_laxly allows to override
10300 the default behavior (Bug#49955, Bug#53298). */
10301 if (EQ (x_set_frame_visibility_more_laxly, Qfocus_in)
10302 || EQ (x_set_frame_visibility_more_laxly, Qt))
10303#endif /* USE_GTK */
10300 { 10304 {
10301 SET_FRAME_VISIBLE (f, 1); 10305 f = any;
10302 SET_FRAME_ICONIFIED (f, false); 10306 if (f && FRAME_ICONIFIED_P (f))
10303 f->output_data.x->has_been_visible = true; 10307 {
10304 inev.ie.kind = DEICONIFY_EVENT; 10308 SET_FRAME_VISIBLE (f, 1);
10305 XSETFRAME (inev.ie.frame_or_window, f); 10309 SET_FRAME_ICONIFIED (f, false);
10310 f->output_data.x->has_been_visible = true;
10311 inev.ie.kind = DEICONIFY_EVENT;
10312 XSETFRAME (inev.ie.frame_or_window, f);
10313 }
10306 } 10314 }
10307#endif /* USE_GTK */
10308 x_detect_focus_change (dpyinfo, any, event, &inev.ie); 10315 x_detect_focus_change (dpyinfo, any, event, &inev.ie);
10309 goto XI_OTHER; 10316 goto XI_OTHER;
10310 case XI_FocusOut: 10317 case XI_FocusOut: