mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 06:11:46 +00:00
[client] x11: added request activation support
This commit is contained in:
parent
f24db8d0cd
commit
29698362ed
2 changed files with 19 additions and 1 deletions
|
@ -34,6 +34,7 @@
|
||||||
DEF_ATOM(_NET_WM_STATE_FOCUSED, True) \
|
DEF_ATOM(_NET_WM_STATE_FOCUSED, True) \
|
||||||
DEF_ATOM(_NET_WM_STATE_MAXIMIZED_HORZ, True) \
|
DEF_ATOM(_NET_WM_STATE_MAXIMIZED_HORZ, True) \
|
||||||
DEF_ATOM(_NET_WM_STATE_MAXIMIZED_VERT, 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, True) \
|
||||||
DEF_ATOM(_NET_WM_WINDOW_TYPE_NORMAL, True) \
|
DEF_ATOM(_NET_WM_WINDOW_TYPE_NORMAL, True) \
|
||||||
DEF_ATOM(_NET_WM_WINDOW_TYPE_UTILITY, True) \
|
DEF_ATOM(_NET_WM_WINDOW_TYPE_UTILITY, True) \
|
||||||
|
|
|
@ -1827,7 +1827,24 @@ static bool x11IsValidPointerPos(int x, int y)
|
||||||
|
|
||||||
static void x11RequestActivation(void)
|
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)
|
static void x11InhibitIdle(void)
|
||||||
|
|
Loading…
Reference in a new issue