aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/NativeWindowSystem.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-03-03 15:11:08 -0500
committerKen Moore <ken@ixsystems.com>2017-03-03 15:11:08 -0500
commit0b7d16106988235da513cc931bf637de52a71c20 (patch)
tree63362a6546b97259e61accdc2fdb9a0216ea01a4 /src-qt5/core/libLumina/NativeWindowSystem.cpp
parentAnother large batch of updates to the Native Window "plumbing": (diff)
downloadlumina-0b7d16106988235da513cc931bf637de52a71c20.tar.gz
lumina-0b7d16106988235da513cc931bf637de52a71c20.tar.bz2
lumina-0b7d16106988235da513cc931bf637de52a71c20.zip
Start filling in the non-property slots for the NativeWindowSystem now (close, kill, ping).
Diffstat (limited to 'src-qt5/core/libLumina/NativeWindowSystem.cpp')
-rw-r--r--src-qt5/core/libLumina/NativeWindowSystem.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp
index c2af0560..117be542 100644
--- a/src-qt5/core/libLumina/NativeWindowSystem.cpp
+++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp
@@ -218,20 +218,27 @@ void NativeWindowSystem::RequestPropertiesChange(WId win, QList<NativeWindow::Pr
}
-void NativeWindowSystem::RequestActivate(WId){
+void NativeWindowSystem::RequestClose(WId win){
+ //Send the window a WM_DELETE_WINDOW message
+ xcb_client_message_event_t event;
+ event.response_type = XCB_CLIENT_MESSAGE;
+ event.format = 32;
+ event.window = win;
+ event.type = obj->ATOMS.value("WM_PROTOCOLS");
+ event.data.data32[0] = obj->ATOMS.value("WM_DELETE_WINDOW");
+ event.data.data32[1] = XCB_TIME_CURRENT_TIME; //CurrentTime;
+ event.data.data32[2] = 0;
+ event.data.data32[3] = 0;
+ event.data.data32[4] = 0;
+ xcb_send_event(QX11Info::connection(), 0, win, XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *) &event);
+ xcb_flush(QX11Info::connection());
}
-void NativeWindowSystem::RequestClose(WId){
+void NativeWindowSystem::RequestKill(WId win){
+ xcb_kill_client(QX11Info::connection(), win);
}
-void NativeWindowSystem::RequestSetVisible(WId, bool){
-
-}
-void NativeWindowSystem::RequestSetGeometry(WId, QRect){
-
-}
-void NativeWindowSystem::RequestSetFrameExtents(WId, QList<int>){
- //[Left,Top,Right,Bottom] in pixels
-
+void NativeWindowSystem::RequestPing(WId){
+ xcb_ewmh_send_wm_ping(QX11Info::connection(), win, XCB_CURRENT_TIME);
}
bgstack15