]> git.eshelyaron.com Git - emacs.git/commitdiff
Detect iconified under Compiz/Unity
authorJan Djärv <jan.h.d@swipnet.se>
Wed, 10 Sep 2014 17:02:42 +0000 (19:02 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Wed, 10 Sep 2014 17:02:42 +0000 (19:02 +0200)
* xterm.c (handle_one_xevent): Detect iconified by looking at
_NET_WM_STATE_HIDDEN.

src/ChangeLog
src/xterm.c

index ed9c3e71a55ecf726c42132bd35b086acf8a9894..b87498a9d9b949369341d062ab88ea54ee3722ea 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-10  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xterm.c (handle_one_xevent): Detect iconified by looking at
+       _NET_WM_STATE_HIDDEN.
+
 2014-09-10  Paul Eggert  <eggert@cs.ucla.edu>
 
        * lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.
index 6ff33785a38c7c2d96b329fb1092c491e876a3e7..b9988e53cba3b208f9e88312f08f1c8d6d0d390b 100644 (file)
@@ -6860,6 +6860,14 @@ handle_one_xevent (struct x_display_info *dpyinfo,
             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);