From 6a7d4de7899fb90f8b93cb8c7facfc8273b0d1b4 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 22 Jul 2003 18:06:45 +0000 Subject: [PATCH] add the MANAGER atom. allow prop_message to be used with a user-defined mask instead of only with the NetWM mask --- openbox/prop.c | 6 ++++-- openbox/prop.h | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/openbox/prop.c b/openbox/prop.c index 5cc10109..3724f1a7 100644 --- a/openbox/prop.c +++ b/openbox/prop.c @@ -16,6 +16,8 @@ void prop_startup() CREATE(atom, "ATOM"); CREATE(string, "STRING"); CREATE(utf8, "UTF8_STRING"); + + CREATE(manager, "MANAGER"); CREATE(wm_colormap_windows, "WM_COLORMAP_WINDOWS"); CREATE(wm_protocols, "WM_PROTOCOLS"); @@ -395,7 +397,7 @@ void prop_erase(Window win, Atom prop) } void prop_message(Window about, Atom messagetype, long data0, long data1, - long data2, long data3) + long data2, long data3, long mask) { XEvent ce; ce.xclient.type = ClientMessage; @@ -408,5 +410,5 @@ void prop_message(Window about, Atom messagetype, long data0, long data1, ce.xclient.data.l[2] = data2; ce.xclient.data.l[3] = data3; XSendEvent(ob_display, RootWindow(ob_display, ob_screen), FALSE, - SubstructureNotifyMask | SubstructureRedirectMask, &ce); + mask, &ce); } diff --git a/openbox/prop.h b/openbox/prop.h index 06ad1437..58ff570a 100644 --- a/openbox/prop.h +++ b/openbox/prop.h @@ -17,6 +17,9 @@ typedef struct Atoms { Atom string; /*!< The atom which represents ascii strings */ Atom utf8; /*!< The atom which represents utf8-encoded strings */ + /* selection stuff */ + Atom manager; + /* window hints */ Atom wm_colormap_windows; Atom wm_protocols; @@ -157,7 +160,7 @@ void prop_set_strings_utf8(Window win, Atom prop, char **strs); void prop_erase(Window win, Atom prop); void prop_message(Window about, Atom messagetype, long data0, long data1, - long data2, long data3); + long data2, long data3, long mask); #define PROP_GET32(win, prop, type, ret) \ (prop_get32(win, prop_atoms.prop, prop_atoms.type, ret)) @@ -181,6 +184,7 @@ void prop_message(Window about, Atom messagetype, long data0, long data1, #define PROP_ERASE(win, prop) prop_erase(win, prop_atoms.prop) #define PROP_MSG(about, msgtype, data0, data1, data2, data3) \ - (prop_message(about, prop_atoms.msgtype, data0, data1, data2, data3)) + (prop_message(about, prop_atoms.msgtype, data0, data1, data2, data3, \ + SubstructureNotifyMask | SubstructureRedirectMask)) #endif -- 2.45.2