diff --git a/client/displayservers/X11/atoms.h b/client/displayservers/X11/atoms.h index 2718fa8d..c1446bf9 100644 --- a/client/displayservers/X11/atoms.h +++ b/client/displayservers/X11/atoms.h @@ -34,6 +34,7 @@ DEF_ATOM(_NET_WM_STATE_FOCUSED, True) \ DEF_ATOM(_NET_WM_STATE_MAXIMIZED_HORZ, True) \ DEF_ATOM(_NET_WM_STATE_MAXIMIZED_VERT, True) \ + DEF_ATOM(_NET_WM_STATE_DEMANDS_ATTENTION, True) \ DEF_ATOM(_NET_WM_WINDOW_TYPE, True) \ DEF_ATOM(_NET_WM_WINDOW_TYPE_NORMAL, True) \ DEF_ATOM(_NET_WM_WINDOW_TYPE_UTILITY, True) \ diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index f88d6782..52173a4d 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -1827,7 +1827,24 @@ static bool x11IsValidPointerPos(int x, int y) static void x11RequestActivation(void) { - // TODO + XEvent e = + { + .xclient = { + .type = ClientMessage, + .send_event = true, + .message_type = x11atoms._NET_WM_STATE, + .format = 32, + .window = x11.window, + .data.l = { + _NET_WM_STATE_ADD, + x11atoms._NET_WM_STATE_DEMANDS_ATTENTION, + 0 + } + } + }; + + XSendEvent(x11.display, DefaultRootWindow(x11.display), False, + SubstructureNotifyMask | SubstructureRedirectMask, &e); } static void x11InhibitIdle(void)