aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2011-11-29 19:08:53 +0100
committerJan Djärv2011-11-29 19:08:53 +0100
commit2b56b87e029eaa04f243718c1690eca5545c5102 (patch)
tree868135688c6ac26bdecfe19a4726f4756cd5ae8a /src
parente70b5064d77602ba43cd31216ca8f3eb9a4c2c42 (diff)
downloademacs-2b56b87e029eaa04f243718c1690eca5545c5102.tar.gz
emacs-2b56b87e029eaa04f243718c1690eca5545c5102.zip
* xterm.c (handle_one_xevent): Only set async_visible and friends
if net_wm_state_hidden_seen is non-zero (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if _NET_WM_STATE_HIDDEN is in NET_WM_STATE. * xterm.h (struct x_output): net_wm_state_hidden_seen is new. Fixes: debbugs:10002
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/xterm.c9
-rw-r--r--src/xterm.h3
3 files changed, 19 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 915e0659a0e..3b1fd5e6a51 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12011-11-29 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
4
5 * xterm.c (handle_one_xevent): Only set async_visible and friends
6 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
8 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
9
12011-11-28 Paul Eggert <eggert@cs.ucla.edu> 102011-11-28 Paul Eggert <eggert@cs.ucla.edu>
2 11
3 Remove GCPRO-related macros that exist only to avoid shadowing locals. 12 Remove GCPRO-related macros that exist only to avoid shadowing locals.
diff --git a/src/xterm.c b/src/xterm.c
index 063794bae65..e41af2b2870 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6114,7 +6114,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6114 last_user_time = event.xproperty.time; 6114 last_user_time = event.xproperty.time;
6115 f = x_top_window_to_frame (dpyinfo, event.xproperty.window); 6115 f = x_top_window_to_frame (dpyinfo, event.xproperty.window);
6116 if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) 6116 if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state)
6117 if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified) 6117 if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified
6118 && f->output_data.x->net_wm_state_hidden_seen)
6118 { 6119 {
6119 /* Gnome shell does not iconify us when C-z is pressed. It hides 6120 /* Gnome shell does not iconify us when C-z is pressed. It hides
6120 the frame. So if our state says we aren't hidden anymore, 6121 the frame. So if our state says we aren't hidden anymore,
@@ -6124,6 +6125,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr,
6124 f->async_visible = 1; 6125 f->async_visible = 1;
6125 f->async_iconified = 0; 6126 f->async_iconified = 0;
6126 f->output_data.x->has_been_visible = 1; 6127 f->output_data.x->has_been_visible = 1;
6128 f->output_data.x->net_wm_state_hidden_seen = 0;
6127 inev.ie.kind = DEICONIFY_EVENT; 6129 inev.ie.kind = DEICONIFY_EVENT;
6128 XSETFRAME (inev.ie.frame_or_window, f); 6130 XSETFRAME (inev.ie.frame_or_window, f);
6129 } 6131 }
@@ -8480,7 +8482,10 @@ get_current_wm_state (struct frame *f,
8480 { 8482 {
8481 Atom a = ((Atom*)tmp_data)[i]; 8483 Atom a = ((Atom*)tmp_data)[i];
8482 if (a == dpyinfo->Xatom_net_wm_state_hidden) 8484 if (a == dpyinfo->Xatom_net_wm_state_hidden)
8483 is_hidden = 1; 8485 {
8486 is_hidden = 1;
8487 f->output_data.x->net_wm_state_hidden_seen = 1;
8488 }
8484 else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) 8489 else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
8485 { 8490 {
8486 if (*size_state == FULLSCREEN_HEIGHT) 8491 if (*size_state == FULLSCREEN_HEIGHT)
diff --git a/src/xterm.h b/src/xterm.h
index 1d2ce9a2d3c..4385b1a467d 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -632,6 +632,9 @@ struct x_output
632 x_check_expected_move. */ 632 x_check_expected_move. */
633 int left_before_move; 633 int left_before_move;
634 int top_before_move; 634 int top_before_move;
635
636 /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame. */
637 int net_wm_state_hidden_seen;
635}; 638};
636 639
637#define No_Cursor (None) 640#define No_Cursor (None)