diff options
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index 6340700cb89..2e0407aff40 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8760,6 +8760,20 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 8760 | goto OTHER; | 8760 | goto OTHER; |
| 8761 | 8761 | ||
| 8762 | case FocusIn: | 8762 | case FocusIn: |
| 8763 | /* Some WMs (e.g. Mutter in Gnome Shell), don't unmap | ||
| 8764 | minimized/iconified windows; thus, for those WMs we won't get | ||
| 8765 | a MapNotify when unminimizing/deconifying. Check here if we | ||
| 8766 | are deconizing a window (Bug42655). */ | ||
| 8767 | f = any; | ||
| 8768 | if (f && FRAME_ICONIFIED_P (f)) | ||
| 8769 | { | ||
| 8770 | SET_FRAME_VISIBLE (f, 1); | ||
| 8771 | SET_FRAME_ICONIFIED (f, false); | ||
| 8772 | f->output_data.x->has_been_visible = true; | ||
| 8773 | inev.ie.kind = DEICONIFY_EVENT; | ||
| 8774 | XSETFRAME (inev.ie.frame_or_window, f); | ||
| 8775 | } | ||
| 8776 | |||
| 8763 | x_detect_focus_change (dpyinfo, any, event, &inev.ie); | 8777 | x_detect_focus_change (dpyinfo, any, event, &inev.ie); |
| 8764 | goto OTHER; | 8778 | goto OTHER; |
| 8765 | 8779 | ||
| @@ -9907,6 +9921,13 @@ x_uncatch_errors (void) | |||
| 9907 | { | 9921 | { |
| 9908 | struct x_error_message_stack *tmp; | 9922 | struct x_error_message_stack *tmp; |
| 9909 | 9923 | ||
| 9924 | /* In rare situations when running Emacs run in daemon mode, | ||
| 9925 | shutting down an emacsclient via delete-frame can cause | ||
| 9926 | x_uncatch_errors to be called when x_error_message is set to | ||
| 9927 | NULL. */ | ||
| 9928 | if (x_error_message == NULL) | ||
| 9929 | return; | ||
| 9930 | |||
| 9910 | block_input (); | 9931 | block_input (); |
| 9911 | 9932 | ||
| 9912 | /* The display may have been closed before this function is called. | 9933 | /* The display may have been closed before this function is called. |