aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaX11.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-28 17:10:16 -0400
committerKen Moore <moorekou@gmail.com>2015-10-28 17:10:16 -0400
commita703c142e0bcabf7dfc376df2d15892cd3694fb5 (patch)
tree693e69eba20da244192637c2aeda41f17d39c0d0 /libLumina/LuminaX11.cpp
parentAdd new X11 functions for about 1/2 of the ICCCM standards (diff)
downloadlumina-a703c142e0bcabf7dfc376df2d15892cd3694fb5.tar.gz
lumina-a703c142e0bcabf7dfc376df2d15892cd3694fb5.tar.bz2
lumina-a703c142e0bcabf7dfc376df2d15892cd3694fb5.zip
Add some more ICCCM functions to LuminaX11.
Diffstat (limited to 'libLumina/LuminaX11.cpp')
-rw-r--r--libLumina/LuminaX11.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp
index 57455f16..f5aab49f 100644
--- a/libLumina/LuminaX11.cpp
+++ b/libLumina/LuminaX11.cpp
@@ -50,6 +50,36 @@ LXCB::~LXCB(){
xcb_ewmh_connection_wipe(&EWMH);
}
+// private function
+void LXCB::createWMAtoms(){
+ ATOMS.clear();
+ atoms.clear();
+ //List the atoms needed by some WM functions
+ atoms << "WM_TAKE_FOCUS" << "WM_DELETE_WINDOW"; //WM_PROTOCOLS
+
+ //Create all the requests for the atoms
+ QList<xcb_intern_atom_reply_t*> reply;
+ for(int i=0; i<atoms.length(); i++){
+ reply << xcb_intern_atom_reply(QX11Info::connection(), \
+ xcb_intern_atom(QX11Info::connection(), 0, atoms[i].length(), atoms[i].toLocal8Bit()), NULL);
+ }
+ //Now evaluate all the requests and save the atoms
+ for(int i=0; i<reply.length(); i++){
+ if(reply[i]!=0){
+ ATOMS << reply[i]->atom;
+ free(reply[i]); //done with this reply
+ }else{
+ //Invalid atom - could not be created
+ atoms.removeAt(i);
+ reply.removeAt(i);
+ i--;
+ }
+ }
+
+
+
+}
+
// === WindowList() ===
QList<WId> LXCB::WindowList(bool rawlist){
if(DEBUG){ qDebug() << "XCB: WindowList()" << rawlist; }
@@ -1145,6 +1175,29 @@ void LXCB::WM_ICCCM_SetClass(WId win, QString name){
xcb_icccm_set_wm_class(QX11Info::connection(), win, name.length(), name.toLocal8Bit());
}
+// -- WM_TRANSIENT_FOR
+WId WM_ICCCM_GetTransientFor(WId win){
+ xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_transient_for_unchecked(QX11Info::connection(), win);
+ xcb_window_t trans;
+ if(1!= xcb_icccm_get_wm_transient_for_reply(QX11Info::connection(), cookie, &trans, NULL) ){
+ return win; //error in fetching transient window ID (or none found)
+ }else{
+ return trans;
+ }
+}
+
+void WM_ICCCM_SetTransientFor(WId win, WId transient){
+ xcb_icccm_set_wm_transient_for(QX11Info::connection(), win, transient);
+}
+
+// -- WM_SIZE_HINTS
+
+// -- WM_NORMAL_HINTS
+
+// -- WM_HINTS
+
+// -- WM_PROTOCOLS
+
// --------------------------------------------------------
// NET_WM Standards (newer standards)
// --------------------------------------------------------
bgstack15