diff options
| author | Po Lu | 2022-01-21 15:27:35 +0800 |
|---|---|---|
| committer | Po Lu | 2022-01-21 15:27:35 +0800 |
| commit | 03f4a2ff640d50af11a0131498f15ebf6ed16d30 (patch) | |
| tree | c529aff0851a951019a946cd67f2b265814f9e00 /src | |
| parent | 2b4f0b5f3b2e9b231b391207656df1328b13652a (diff) | |
| parent | 11ea45c9e47d13e13e3e539551e2df300f995c11 (diff) | |
| download | emacs-03f4a2ff640d50af11a0131498f15ebf6ed16d30.tar.gz emacs-03f4a2ff640d50af11a0131498f15ebf6ed16d30.zip | |
Merge from origin/emacs-28
11ea45c9e4 Fix UB in ebrowse
ba57b78064 Fix execute-extended-command-for-buffer in fundamental-mode
ef0c1d4c2c Add workaround to handle a problem with Enlightenment WM (...
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 68 |
1 files changed, 48 insertions, 20 deletions
diff --git a/src/xterm.c b/src/xterm.c index 1cbea12b3db..244b11e0f75 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -9026,12 +9026,17 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 9026 | if (!FRAME_VISIBLE_P (f)) | 9026 | if (!FRAME_VISIBLE_P (f)) |
| 9027 | { | 9027 | { |
| 9028 | block_input (); | 9028 | block_input (); |
| 9029 | /* The following two are commented out to avoid that a | 9029 | /* By default, do not set the frame's visibility here, see |
| 9030 | plain invisible frame gets reported as iconified. That | 9030 | https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html. |
| 9031 | problem occurred first for Emacs 26 and is described in | 9031 | The default behavior can be overridden by setting |
| 9032 | https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html. */ | 9032 | 'x-set-frame-visibility-more-laxly' (Bug#49955, |
| 9033 | /** SET_FRAME_VISIBLE (f, 1); **/ | 9033 | Bug#53298). */ |
| 9034 | /** SET_FRAME_ICONIFIED (f, false); **/ | 9034 | if (EQ (x_set_frame_visibility_more_laxly, Qexpose) |
| 9035 | || EQ (x_set_frame_visibility_more_laxly, Qt)) | ||
| 9036 | { | ||
| 9037 | SET_FRAME_VISIBLE (f, 1); | ||
| 9038 | SET_FRAME_ICONIFIED (f, false); | ||
| 9039 | } | ||
| 9035 | 9040 | ||
| 9036 | if (FRAME_X_DOUBLE_BUFFERED_P (f)) | 9041 | if (FRAME_X_DOUBLE_BUFFERED_P (f)) |
| 9037 | font_drop_xrender_surfaces (f); | 9042 | font_drop_xrender_surfaces (f); |
| @@ -9650,26 +9655,33 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 9650 | goto OTHER; | 9655 | goto OTHER; |
| 9651 | 9656 | ||
| 9652 | case FocusIn: | 9657 | case FocusIn: |
| 9653 | #ifndef USE_GTK | 9658 | #ifdef USE_GTK |
| 9654 | /* Some WMs (e.g. Mutter in Gnome Shell), don't unmap | 9659 | /* Some WMs (e.g. Mutter in Gnome Shell), don't unmap |
| 9655 | minimized/iconified windows; thus, for those WMs we won't get | 9660 | minimized/iconified windows; thus, for those WMs we won't get |
| 9656 | a MapNotify when unminimizing/deconifying. Check here if we | 9661 | a MapNotify when unminimizing/deiconifying. Check here if we |
| 9657 | are deiconizing a window (Bug42655). | 9662 | are deiconizing a window (Bug42655). |
| 9658 | 9663 | ||
| 9659 | But don't do that on GTK since it may cause a plain invisible | 9664 | But don't do that by default on GTK since it may cause a plain |
| 9660 | frame get reported as iconified, compare | 9665 | invisible frame get reported as iconified, compare |
| 9661 | https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html. | 9666 | https://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00133.html. |
| 9662 | That is fixed above but bites us here again. */ | 9667 | That is fixed above but bites us here again. |
| 9663 | f = any; | 9668 | |
| 9664 | if (f && FRAME_ICONIFIED_P (f)) | 9669 | The option x_set_frame_visibility_more_laxly allows to override |
| 9665 | { | 9670 | the default behavior (Bug#49955, Bug#53298). */ |
| 9666 | SET_FRAME_VISIBLE (f, 1); | 9671 | if (EQ (x_set_frame_visibility_more_laxly, Qfocus_in) |
| 9667 | SET_FRAME_ICONIFIED (f, false); | 9672 | || EQ (x_set_frame_visibility_more_laxly, Qt)) |
| 9668 | f->output_data.x->has_been_visible = true; | ||
| 9669 | inev.ie.kind = DEICONIFY_EVENT; | ||
| 9670 | XSETFRAME (inev.ie.frame_or_window, f); | ||
| 9671 | } | ||
| 9672 | #endif /* USE_GTK */ | 9673 | #endif /* USE_GTK */ |
| 9674 | { | ||
| 9675 | f = any; | ||
| 9676 | if (f && FRAME_ICONIFIED_P (f)) | ||
| 9677 | { | ||
| 9678 | SET_FRAME_VISIBLE (f, 1); | ||
| 9679 | SET_FRAME_ICONIFIED (f, false); | ||
| 9680 | f->output_data.x->has_been_visible = true; | ||
| 9681 | inev.ie.kind = DEICONIFY_EVENT; | ||
| 9682 | XSETFRAME (inev.ie.frame_or_window, f); | ||
| 9683 | } | ||
| 9684 | } | ||
| 9673 | 9685 | ||
| 9674 | x_detect_focus_change (dpyinfo, any, event, &inev.ie); | 9686 | x_detect_focus_change (dpyinfo, any, event, &inev.ie); |
| 9675 | goto OTHER; | 9687 | goto OTHER; |
| @@ -16258,6 +16270,7 @@ always uses gtk_window_move and ignores the value of this variable. */); | |||
| 16258 | This option is only effective when Emacs is built with XInput 2 | 16270 | This option is only effective when Emacs is built with XInput 2 |
| 16259 | support. */); | 16271 | support. */); |
| 16260 | Vx_scroll_event_delta_factor = make_float (1.0); | 16272 | Vx_scroll_event_delta_factor = make_float (1.0); |
| 16273 | DEFSYM (Qexpose, "expose"); | ||
| 16261 | 16274 | ||
| 16262 | DEFVAR_BOOL ("x-gtk-use-native-input", x_gtk_use_native_input, | 16275 | DEFVAR_BOOL ("x-gtk-use-native-input", x_gtk_use_native_input, |
| 16263 | doc: /* Non-nil means to use GTK for input method support. | 16276 | doc: /* Non-nil means to use GTK for input method support. |
| @@ -16265,6 +16278,21 @@ This provides better support for some modern input methods, and is | |||
| 16265 | only effective when Emacs is built with GTK. */); | 16278 | only effective when Emacs is built with GTK. */); |
| 16266 | x_gtk_use_native_input = false; | 16279 | x_gtk_use_native_input = false; |
| 16267 | 16280 | ||
| 16281 | DEFVAR_LISP ("x-set-frame-visibility-more-laxly", | ||
| 16282 | x_set_frame_visibility_more_laxly, | ||
| 16283 | doc: /* Non-nil means set frame visibility more laxly. | ||
| 16284 | If this is nil, Emacs is more strict when marking a frame as visible. | ||
| 16285 | Since this may cause problems on some window managers, this variable can | ||
| 16286 | be also set as follows: The value `focus-in' means to mark a frame as | ||
| 16287 | visible also when a FocusIn event is received for it on GTK builds. The | ||
| 16288 | value `expose' means to mark a frame as visible also when an Expose | ||
| 16289 | event is received for it on any X build. The value `t' means to mark a | ||
| 16290 | frame as visible in either of these two cases. | ||
| 16291 | |||
| 16292 | Note that any non-nil setting may cause invisible frames get erroneously | ||
| 16293 | reported as iconified. */); | ||
| 16294 | x_set_frame_visibility_more_laxly = Qnil; | ||
| 16295 | |||
| 16268 | DEFVAR_BOOL ("x-input-grab-touch-events", x_input_grab_touch_events, | 16296 | DEFVAR_BOOL ("x-input-grab-touch-events", x_input_grab_touch_events, |
| 16269 | doc: /* Non-nil means to actively grab touch events. | 16297 | doc: /* Non-nil means to actively grab touch events. |
| 16270 | This means touch sequences that started on an Emacs frame will | 16298 | This means touch sequences that started on an Emacs frame will |