]> Dogcows Code - chaz/openbox/blobdiff - src/screen.cc
handle unmaps better. all thanks to acroread sending wacky unmap events
[chaz/openbox] / src / screen.cc
index 2dcc110f5b668381ec791716af77f2dbf0833a31..3c364b4c25827528beede789704b8ba7ae5cd943 100644 (file)
@@ -459,19 +459,21 @@ void OBScreen::manageWindow(Window window)
   XWMHints *wmhint;
   XSetWindowAttributes attrib_set;
 
+  otk::OBDisplay::grab();
+
   // is the window a docking app
   if ((wmhint = XGetWMHints(otk::OBDisplay::display, window))) {
     if ((wmhint->flags & StateHint) &&
         wmhint->initial_state == WithdrawnState) {
       //slit->addClient(w); // XXX: make dock apps work!
+      otk::OBDisplay::ungrab();
+
       XFree(wmhint);
       return;
     }
     XFree(wmhint);
   }
 
-  otk::OBDisplay::grab();
-
   // choose the events we want to receive on the CLIENT window
   attrib_set.event_mask = OBClient::event_mask;
   attrib_set.do_not_propagate_mask = OBClient::no_propagate_mask;
@@ -517,12 +519,9 @@ void OBScreen::manageWindow(Window window)
   Openbox::instance->addClient(client->frame->grip_left(), client);
   Openbox::instance->addClient(client->frame->grip_right(), client);
 
-  bool shown = false;
-  
   // if on the current desktop.. (or all desktops)
   if (client->desktop() == _desktop ||
       client->desktop() == (signed)0xffffffff) {
-    shown = true;
     client->frame->show();
   }
  
This page took 0.025696 seconds and 4 git commands to generate.