]> Dogcows Code - chaz/openbox/commitdiff
add support for net_active_window and net_close_window messages
authorDana Jansens <danakj@orodu.net>
Sat, 4 Jan 2003 00:54:19 +0000 (00:54 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 4 Jan 2003 00:54:19 +0000 (00:54 +0000)
src/client.cc

index 3ac9002c8fe860d650b0d11cab98fc406f59e7a3..a12ec941f2e2dbf8264a949de505191489a0dab1 100644 (file)
@@ -541,8 +541,8 @@ void OBClient::setDesktop(long target)
 {
   assert(target >= 0);
   //assert(target == 0xffffffff || target < MAX);
-  
-  // XXX: move the window to the new desktop
+
+  // XXX: move the window to the new desktop (and set root property)
   _desktop = target;
 }
 
@@ -768,10 +768,16 @@ void OBClient::clientMessageHandler(const XClientMessageEvent &e)
       setDesktop(e.data.l[0]); // use the found event
     else
       setDesktop(e.data.l[0]); // use the original event
-  }
-  else if (e.message_type == property->atom(otk::OBProperty::net_wm_state))
+  } else if (e.message_type == property->atom(otk::OBProperty::net_wm_state)) {
     // can't compress these
     setState((StateAction)e.data.l[0], e.data.l[1], e.data.l[2]);
+  } else if (e.message_type ==
+             property->atom(otk::OBProperty::net_close_window)) {
+    close();
+  } else if (e.message_type ==
+             property->atom(otk::OBProperty::net_active_window)) {
+    focus();
+  }
 }
 
 
This page took 0.023476 seconds and 4 git commands to generate.