add the MANAGER atom.
allow prop_message to be used with a user-defined mask instead of only with the NetWM mask
This commit is contained in:
parent
221415e97c
commit
6a7d4de789
2 changed files with 10 additions and 4 deletions
|
@ -17,6 +17,8 @@ void prop_startup()
|
||||||
CREATE(string, "STRING");
|
CREATE(string, "STRING");
|
||||||
CREATE(utf8, "UTF8_STRING");
|
CREATE(utf8, "UTF8_STRING");
|
||||||
|
|
||||||
|
CREATE(manager, "MANAGER");
|
||||||
|
|
||||||
CREATE(wm_colormap_windows, "WM_COLORMAP_WINDOWS");
|
CREATE(wm_colormap_windows, "WM_COLORMAP_WINDOWS");
|
||||||
CREATE(wm_protocols, "WM_PROTOCOLS");
|
CREATE(wm_protocols, "WM_PROTOCOLS");
|
||||||
CREATE(wm_state, "WM_STATE");
|
CREATE(wm_state, "WM_STATE");
|
||||||
|
@ -395,7 +397,7 @@ void prop_erase(Window win, Atom prop)
|
||||||
}
|
}
|
||||||
|
|
||||||
void prop_message(Window about, Atom messagetype, long data0, long data1,
|
void prop_message(Window about, Atom messagetype, long data0, long data1,
|
||||||
long data2, long data3)
|
long data2, long data3, long mask)
|
||||||
{
|
{
|
||||||
XEvent ce;
|
XEvent ce;
|
||||||
ce.xclient.type = ClientMessage;
|
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[2] = data2;
|
||||||
ce.xclient.data.l[3] = data3;
|
ce.xclient.data.l[3] = data3;
|
||||||
XSendEvent(ob_display, RootWindow(ob_display, ob_screen), FALSE,
|
XSendEvent(ob_display, RootWindow(ob_display, ob_screen), FALSE,
|
||||||
SubstructureNotifyMask | SubstructureRedirectMask, &ce);
|
mask, &ce);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,9 @@ typedef struct Atoms {
|
||||||
Atom string; /*!< The atom which represents ascii strings */
|
Atom string; /*!< The atom which represents ascii strings */
|
||||||
Atom utf8; /*!< The atom which represents utf8-encoded strings */
|
Atom utf8; /*!< The atom which represents utf8-encoded strings */
|
||||||
|
|
||||||
|
/* selection stuff */
|
||||||
|
Atom manager;
|
||||||
|
|
||||||
/* window hints */
|
/* window hints */
|
||||||
Atom wm_colormap_windows;
|
Atom wm_colormap_windows;
|
||||||
Atom wm_protocols;
|
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_erase(Window win, Atom prop);
|
||||||
|
|
||||||
void prop_message(Window about, Atom messagetype, long data0, long data1,
|
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) \
|
#define PROP_GET32(win, prop, type, ret) \
|
||||||
(prop_get32(win, prop_atoms.prop, prop_atoms.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_ERASE(win, prop) prop_erase(win, prop_atoms.prop)
|
||||||
|
|
||||||
#define PROP_MSG(about, msgtype, data0, data1, data2, data3) \
|
#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
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue