aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaX11.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-12-19 10:37:52 -0500
committerKen Moore <ken@pcbsd.org>2014-12-19 10:37:52 -0500
commit6e0f72ab9e0535309942711d98a611a1e1025305 (patch)
tree45c41ef9d6bdc7f6c776347221b6c9f019f38cc6 /libLumina/LuminaX11.cpp
parentMerge branch 'master' of github.com:pcbsd/lumina (diff)
downloadlumina-6e0f72ab9e0535309942711d98a611a1e1025305.tar.gz
lumina-6e0f72ab9e0535309942711d98a611a1e1025305.tar.bz2
lumina-6e0f72ab9e0535309942711d98a611a1e1025305.zip
Fix up the sticky status-setting routine for the Lumina Panel. Now the WM will be aware of the new status change (send an event instead of changing the property directly).
Also add a quick fix for system tray icons: if the icon size does not match the tray size, send a resize event and redraw a few moments later.
Diffstat (limited to 'libLumina/LuminaX11.cpp')
-rw-r--r--libLumina/LuminaX11.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp
index 699d7b99..6555a842 100644
--- a/libLumina/LuminaX11.cpp
+++ b/libLumina/LuminaX11.cpp
@@ -945,8 +945,24 @@ LXCB::WINDOWSTATE LXCB::WindowState(WId win){
// === SetAsSticky() ===
void LXCB::SetAsSticky(WId win){
- xcb_change_property( QX11Info::connection(), XCB_PROP_MODE_APPEND, win, EWMH._NET_WM_STATE, XCB_ATOM_ATOM, 32, 1, &(EWMH._NET_WM_STATE_STICKY) );
- xcb_flush(QX11Info::connection()); //apply it right away
+ //Need to send a client message event for the window so the WM picks it up
+ xcb_client_message_event_t event;
+ event.response_type = XCB_CLIENT_MESSAGE;
+ event.format = 32;
+ event.window = win;
+ event.type = EWMH._NET_WM_STATE;
+ event.data.data32[0] = 1; //set to enabled
+ event.data.data32[1] = EWMH._NET_WM_STATE_STICKY;
+ event.data.data32[2] = 0;
+ event.data.data32[3] = 0;
+ event.data.data32[4] = 0;
+
+ xcb_send_event(QX11Info::connection(), 0, QX11Info::appRootWindow(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event);
+ //xcb_ewmh_set_wm_state(&EWMH, win, 1, &EWMH._NET_WM_STATE_STICKY);
+
+ //This method changes the property on the window directly - the WM is not aware of it
+ /*xcb_change_property( QX11Info::connection(), XCB_PROP_MODE_APPEND, win, EWMH._NET_WM_STATE, XCB_ATOM_ATOM, 32, 1, &(EWMH._NET_WM_STATE_STICKY) );
+ xcb_flush(QX11Info::connection()); //apply it right away*/
}
// === SetScreenWorkArea() ===
bgstack15