Commit 36f6120d authored by Paul Eggert's avatar Paul Eggert

* xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.

parent 8c2dd4db
2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
* xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
2014-09-10 Jan Djärv <jan.h.d@swipnet.se>
* xterm.c (handle_one_xevent): Detect iconified by looking at
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment