diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/window/window.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/window/window.c b/src/window/window.c index be8aa14..6ed409a 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -76,6 +76,8 @@ typedef struct { Atom net_wm_window_type_atom; Atom net_wm_window_type_normal_atom; Atom net_wm_window_type_dialog_atom; + Atom net_wm_window_type_notification_atom; + Atom net_wm_window_type_utility; Atom motif_wm_hints_atom; Cursor default_cursor; Cursor invisible_cursor; @@ -175,6 +177,8 @@ static int x11_context_init(x11_context *self, bool alpha) { self->net_wm_window_type_atom = XInternAtom(context->connection, "_NET_WM_WINDOW_TYPE", False); self->net_wm_window_type_normal_atom = XInternAtom(context->connection, "_NET_WM_WINDOW_TYPE_NORMAL", False); self->net_wm_window_type_dialog_atom = XInternAtom(context->connection, "_NET_WM_WINDOW_TYPE_DIALOG", False); + self->net_wm_window_type_notification_atom = XInternAtom(context->connection, "_NET_WM_WINDOW_TYPE_NOTIFICATION", False); + self->net_wm_window_type_utility = XInternAtom(context->connection, "_NET_WM_WINDOW_TYPE_UTILITY", False); self->motif_wm_hints_atom = XInternAtom(context->connection, "_MOTIF_WM_HINTS", False); self->default_cursor = None; self->invisible_cursor = None; @@ -507,6 +511,15 @@ static void mgl_set_window_type(mgl_window *self, mgl_window_type window_type) { XChangeProperty(context->connection, self->window, x11_context->net_wm_state_atom, XA_ATOM, 32, PropModeReplace, (unsigned char*)&x11_context->net_wm_state_above_atom, 1L); break; } + case MGL_WINDOW_TYPE_NOTIFICATION: { + const Atom data[2] = { + self->net_wm_window_type_notification_atom; + self->net_wm_window_type_utility; + }; + XChangeProperty(context->connection, self->window, x11_context->net_wm_window_type_atom, XA_ATOM, 32, PropModeReplace, (const unsigned char*)data, 2L); + XChangeProperty(context->connection, self->window, x11_context->net_wm_state_atom, XA_ATOM, 32, PropModeReplace, (unsigned char*)&x11_context->net_wm_state_above_atom, 1L); + break; + } } } |