]> git.eshelyaron.com Git - emacs.git/commitdiff
* xterm.c (x_raise_frame): Send _NET_ACTIVE_WINDOW when raising the
authorJan Djärv <jan.h.d@swipnet.se>
Fri, 3 Nov 2006 08:58:39 +0000 (08:58 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Fri, 3 Nov 2006 08:58:39 +0000 (08:58 +0000)
 window.

src/ChangeLog
src/xterm.c

index 01d3a9430d19d56f8944b454c377ccff151ae828..73b654b920b4c803d65ff5aa88fbb7e5add9928e 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-03  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * xterm.c (x_raise_frame): Send _NET_ACTIVE_WINDOW when raising the
+       window.
+
 2006-11-02  Juanma Barranquero  <lekktu@gmail.com>
 
        * emacs.c (Fkill_emacs): Fix typo in docstring.
index 574e8eb4f1504083edd6752eee187941a296bc0e..564da0d876c4079da31b235289bf2003acf5ee78 100644 (file)
@@ -8607,13 +8607,25 @@ void
 x_raise_frame (f)
      struct frame *f;
 {
+  Lisp_Object frame;
+  const char *atom = "_NET_ACTIVE_WINDOW";
+
+  BLOCK_INPUT;
   if (f->async_visible)
-    {
-      BLOCK_INPUT;
-      XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
-      XFlush (FRAME_X_DISPLAY (f));
-      UNBLOCK_INPUT;
-    }
+    XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
+
+  XSETFRAME (frame, f);
+  /* See Window Manager Specification/Extended Window Manager Hints at
+     http://freedesktop.org/wiki/Standards_2fwm_2dspec */
+
+  Fx_send_client_event (frame, make_number (0), frame,
+                        make_unibyte_string (atom, strlen (atom)),
+                        make_number (32),
+                        Fcons (make_number (1),
+                               Fcons (make_number (time (NULL) * 1000),
+                                      Qnil)));
+  XFlush (FRAME_X_DISPLAY (f));
+  UNBLOCK_INPUT;
 }
 
 /* Lower frame F.  */