diff options
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c index f750c00cea0..8171fe7738e 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -6123,7 +6123,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6123 | last_user_time = event.xproperty.time; | 6123 | last_user_time = event.xproperty.time; |
| 6124 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); | 6124 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); |
| 6125 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) | 6125 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) |
| 6126 | if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified) | 6126 | if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified |
| 6127 | && f->output_data.x->net_wm_state_hidden_seen) | ||
| 6127 | { | 6128 | { |
| 6128 | /* Gnome shell does not iconify us when C-z is pressed. It hides | 6129 | /* Gnome shell does not iconify us when C-z is pressed. It hides |
| 6129 | the frame. So if our state says we aren't hidden anymore, | 6130 | the frame. So if our state says we aren't hidden anymore, |
| @@ -6133,6 +6134,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6133 | f->async_visible = 1; | 6134 | f->async_visible = 1; |
| 6134 | f->async_iconified = 0; | 6135 | f->async_iconified = 0; |
| 6135 | f->output_data.x->has_been_visible = 1; | 6136 | f->output_data.x->has_been_visible = 1; |
| 6137 | f->output_data.x->net_wm_state_hidden_seen = 0; | ||
| 6136 | inev.ie.kind = DEICONIFY_EVENT; | 6138 | inev.ie.kind = DEICONIFY_EVENT; |
| 6137 | XSETFRAME (inev.ie.frame_or_window, f); | 6139 | XSETFRAME (inev.ie.frame_or_window, f); |
| 6138 | } | 6140 | } |
| @@ -8494,7 +8496,10 @@ get_current_wm_state (struct frame *f, | |||
| 8494 | { | 8496 | { |
| 8495 | Atom a = ((Atom*)tmp_data)[i]; | 8497 | Atom a = ((Atom*)tmp_data)[i]; |
| 8496 | if (a == dpyinfo->Xatom_net_wm_state_hidden) | 8498 | if (a == dpyinfo->Xatom_net_wm_state_hidden) |
| 8497 | is_hidden = 1; | 8499 | { |
| 8500 | is_hidden = 1; | ||
| 8501 | f->output_data.x->net_wm_state_hidden_seen = 1; | ||
| 8502 | } | ||
| 8498 | else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) | 8503 | else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) |
| 8499 | { | 8504 | { |
| 8500 | if (*size_state == FULLSCREEN_HEIGHT) | 8505 | if (*size_state == FULLSCREEN_HEIGHT) |
| @@ -9570,6 +9575,14 @@ x_wm_set_size_hint (struct frame *f, long flags, int user_position) | |||
| 9570 | XSizeHints size_hints; | 9575 | XSizeHints size_hints; |
| 9571 | Window window = FRAME_OUTER_WINDOW (f); | 9576 | Window window = FRAME_OUTER_WINDOW (f); |
| 9572 | 9577 | ||
| 9578 | #ifdef USE_X_TOOLKIT | ||
| 9579 | if (f->output_data.x->widget) | ||
| 9580 | { | ||
| 9581 | widget_update_wm_size_hints (f->output_data.x->widget); | ||
| 9582 | return; | ||
| 9583 | } | ||
| 9584 | #endif | ||
| 9585 | |||
| 9573 | /* Setting PMaxSize caused various problems. */ | 9586 | /* Setting PMaxSize caused various problems. */ |
| 9574 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; | 9587 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; |
| 9575 | 9588 | ||