From 36f6120d8be13b074c21eb845ad1280d170e722e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 10 Sep 2014 10:18:38 -0700 Subject: [PATCH] * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall. --- src/ChangeLog | 4 ++++ 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 @@ +2014-09-10 Paul Eggert + + * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall. + 2014-09-10 Jan Djärv * 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, dpyinfo->last_user_time = event->xproperty.time; f = x_top_window_to_frame (dpyinfo, event->xproperty.window); if (f && event->xproperty.atom == dpyinfo->Xatom_net_wm_state) - if (x_handle_net_wm_state (f, &event->xproperty) - && FRAME_ICONIFIED_P (f) - && f->output_data.x->net_wm_state_hidden_seen) - { - /* Gnome shell does not iconify us when C-z is pressed. - It hides the frame. So if our state says we aren't - hidden anymore, treat it as deiconified. */ - SET_FRAME_VISIBLE (f, 1); - SET_FRAME_ICONIFIED (f, 0); - f->output_data.x->has_been_visible = 1; - f->output_data.x->net_wm_state_hidden_seen = 0; - inev.ie.kind = DEICONIFY_EVENT; - XSETFRAME (inev.ie.frame_or_window, f); - } - else if (! FRAME_ICONIFIED_P (f) - && f->output_data.x->net_wm_state_hidden_seen) - { - SET_FRAME_VISIBLE (f, 0); - SET_FRAME_ICONIFIED (f, 1); - inev.ie.kind = ICONIFY_EVENT; - XSETFRAME (inev.ie.frame_or_window, f); - } + { + if (x_handle_net_wm_state (f, &event->xproperty) + && FRAME_ICONIFIED_P (f) + && f->output_data.x->net_wm_state_hidden_seen) + { + /* Gnome shell does not iconify us when C-z is pressed. + It hides the frame. So if our state says we aren't + hidden anymore, treat it as deiconified. */ + SET_FRAME_VISIBLE (f, 1); + SET_FRAME_ICONIFIED (f, 0); + f->output_data.x->has_been_visible = 1; + f->output_data.x->net_wm_state_hidden_seen = 0; + inev.ie.kind = DEICONIFY_EVENT; + XSETFRAME (inev.ie.frame_or_window, f); + } + else if (! FRAME_ICONIFIED_P (f) + && f->output_data.x->net_wm_state_hidden_seen) + { + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, 1); + inev.ie.kind = ICONIFY_EVENT; + XSETFRAME (inev.ie.frame_or_window, f); + } + } x_handle_property_notify (&event->xproperty); xft_settings_event (dpyinfo, event); -- 2.11.4.GIT