]> Dogcows Code - chaz/openbox/commitdiff
change what re-maprequest events do, just convert them to net_active_window messages...
authorDana Jansens <danakj@orodu.net>
Thu, 9 Jan 2003 04:26:32 +0000 (04:26 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 9 Jan 2003 04:26:32 +0000 (04:26 +0000)
src/client.cc
src/screen.cc

index 423316b0ce9af808120bb12eb74060e4b1432a08..07bf6f0b7c4bef5b89cc2e1309efb7ac0ca9ad8c 100644 (file)
@@ -914,6 +914,9 @@ void OBClient::clientMessageHandler(const XClientMessageEvent &e)
 #ifdef DEBUG
     printf("net_active_window for 0x%lx\n", _window);
 #endif
+    if (_shaded)
+      shade(false);
+    // XXX: deiconify
     focus();
     Openbox::instance->screen(_screen)->restack(true, this); // raise
   }
index b16a75ded71e3c52652e21fa61442711ac4f5cfa..c650872eecdeca156cdb8eaabf872c13ad3e3452 100644 (file)
@@ -789,10 +789,22 @@ void OBScreen::mapRequestHandler(const XMapRequestEvent &e)
   OBClient *c = Openbox::instance->findClient(e.window);
 
   if (c) {
-    if (c->shaded())
-      c->shade(false);
-    // XXX: uniconify the window
-    c->focus();
+    // send a net_active_window message
+    XEvent ce;
+    ce.xclient.type = ClientMessage;
+    ce.xclient.message_type =
+      Openbox::instance->property()->atom(otk::OBProperty::net_active_window);
+    ce.xclient.display = otk::OBDisplay::display;
+    ce.xclient.window = c->window();
+    ce.xclient.format = 32;
+    ce.xclient.data.l[0] = 0l;
+    ce.xclient.data.l[1] = 0l;
+    ce.xclient.data.l[2] = 0l;
+    ce.xclient.data.l[3] = 0l;
+    ce.xclient.data.l[4] = 0l;
+    XSendEvent(otk::OBDisplay::display, _info->rootWindow(), false,
+               SubstructureRedirectMask | SubstructureNotifyMask,
+               &ce);
   } else
     manageWindow(e.window);
 }
This page took 0.025754 seconds and 4 git commands to generate.