diff options
author | Ken Moore <ken@ixsystems.com> | 2017-03-03 15:11:08 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-03-03 15:11:08 -0500 |
commit | 0b7d16106988235da513cc931bf637de52a71c20 (patch) | |
tree | 63362a6546b97259e61accdc2fdb9a0216ea01a4 /src-qt5 | |
parent | Another large batch of updates to the Native Window "plumbing": (diff) | |
download | lumina-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')
-rw-r--r-- | src-qt5/core/libLumina/NativeWindowSystem.cpp | 29 | ||||
-rw-r--r-- | src-qt5/core/libLumina/NativeWindowSystem.h | 2 |
2 files changed, 20 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); } diff --git a/src-qt5/core/libLumina/NativeWindowSystem.h b/src-qt5/core/libLumina/NativeWindowSystem.h index b26400a6..23a66263 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.h +++ b/src-qt5/core/libLumina/NativeWindowSystem.h @@ -42,6 +42,8 @@ private: void UpdateWindowProperties(NativeWindow* win, QList< NativeWindow::Property > props); public: + enum Property{ None, CurrentWorkspace, Workspaces, VirtualRoots, WorkAreas }; + NativeWindowSystem(); ~NativeWindowSystem(); |