From 45a26c427907f9f055b94ceebae8ae8f6d0646a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Fri, 3 Nov 2006 08:58:39 +0000 Subject: [PATCH] * xterm.c (x_raise_frame): Send _NET_ACTIVE_WINDOW when raising the window. --- src/ChangeLog | 5 +++++ src/xterm.c | 24 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 01d3a9430d1..73b654b920b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-11-03 Jan Dj,Ad(Brv + + * xterm.c (x_raise_frame): Send _NET_ACTIVE_WINDOW when raising the + window. + 2006-11-02 Juanma Barranquero * emacs.c (Fkill_emacs): Fix typo in docstring. diff --git a/src/xterm.c b/src/xterm.c index 574e8eb4f15..564da0d876c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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. */ -- 2.39.2