diff options
| author | Paul Eggert | 2014-09-10 10:18:38 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-09-10 10:18:38 -0700 |
| commit | 36f6120d8be13b074c21eb845ad1280d170e722e (patch) | |
| tree | a44cc8b92c67de2f4107531c1ced62ce1c58b667 /src | |
| parent | 8c2dd4db877092815908396b1ce9043260de776f (diff) | |
| download | emacs-36f6120d8be13b074c21eb845ad1280d170e722e.tar.gz emacs-36f6120d8be13b074c21eb845ad1280d170e722e.zip | |
* xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/xterm.c | 46 |
2 files changed, 28 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b87498a9d9b..311e10765ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-09-10 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall. | ||
| 4 | |||
| 1 | 2014-09-10 Jan Djärv <jan.h.d@swipnet.se> | 5 | 2014-09-10 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 6 | ||
| 3 | * xterm.c (handle_one_xevent): Detect iconified by looking at | 7 | * xterm.c (handle_one_xevent): Detect iconified by looking at |
diff --git a/src/xterm.c b/src/xterm.c index b9988e53cba..8b34167b5ad 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -6846,28 +6846,30 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 6846 | dpyinfo->last_user_time = event->xproperty.time; | 6846 | dpyinfo->last_user_time = event->xproperty.time; |
| 6847 | f = x_top_window_to_frame (dpyinfo, event->xproperty.window); | 6847 | f = x_top_window_to_frame (dpyinfo, event->xproperty.window); |
| 6848 | if (f && event->xproperty.atom == dpyinfo->Xatom_net_wm_state) | 6848 | if (f && event->xproperty.atom == dpyinfo->Xatom_net_wm_state) |
| 6849 | if (x_handle_net_wm_state (f, &event->xproperty) | 6849 | { |
| 6850 | && FRAME_ICONIFIED_P (f) | 6850 | if (x_handle_net_wm_state (f, &event->xproperty) |
| 6851 | && f->output_data.x->net_wm_state_hidden_seen) | 6851 | && FRAME_ICONIFIED_P (f) |
| 6852 | { | 6852 | && f->output_data.x->net_wm_state_hidden_seen) |
| 6853 | /* Gnome shell does not iconify us when C-z is pressed. | 6853 | { |
| 6854 | It hides the frame. So if our state says we aren't | 6854 | /* Gnome shell does not iconify us when C-z is pressed. |
| 6855 | hidden anymore, treat it as deiconified. */ | 6855 | It hides the frame. So if our state says we aren't |
| 6856 | SET_FRAME_VISIBLE (f, 1); | 6856 | hidden anymore, treat it as deiconified. */ |
| 6857 | SET_FRAME_ICONIFIED (f, 0); | 6857 | SET_FRAME_VISIBLE (f, 1); |
| 6858 | f->output_data.x->has_been_visible = 1; | 6858 | SET_FRAME_ICONIFIED (f, 0); |
| 6859 | f->output_data.x->net_wm_state_hidden_seen = 0; | 6859 | f->output_data.x->has_been_visible = 1; |
| 6860 | inev.ie.kind = DEICONIFY_EVENT; | 6860 | f->output_data.x->net_wm_state_hidden_seen = 0; |
| 6861 | XSETFRAME (inev.ie.frame_or_window, f); | 6861 | inev.ie.kind = DEICONIFY_EVENT; |
| 6862 | } | 6862 | XSETFRAME (inev.ie.frame_or_window, f); |
| 6863 | else if (! FRAME_ICONIFIED_P (f) | 6863 | } |
| 6864 | && f->output_data.x->net_wm_state_hidden_seen) | 6864 | else if (! FRAME_ICONIFIED_P (f) |
| 6865 | { | 6865 | && f->output_data.x->net_wm_state_hidden_seen) |
| 6866 | SET_FRAME_VISIBLE (f, 0); | 6866 | { |
| 6867 | SET_FRAME_ICONIFIED (f, 1); | 6867 | SET_FRAME_VISIBLE (f, 0); |
| 6868 | inev.ie.kind = ICONIFY_EVENT; | 6868 | SET_FRAME_ICONIFIED (f, 1); |
| 6869 | XSETFRAME (inev.ie.frame_or_window, f); | 6869 | inev.ie.kind = ICONIFY_EVENT; |
| 6870 | } | 6870 | XSETFRAME (inev.ie.frame_or_window, f); |
| 6871 | } | ||
| 6872 | } | ||
| 6871 | 6873 | ||
| 6872 | x_handle_property_notify (&event->xproperty); | 6874 | x_handle_property_notify (&event->xproperty); |
| 6873 | xft_settings_event (dpyinfo, event); | 6875 | xft_settings_event (dpyinfo, event); |