X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fscreen.cc;h=e4518fba3b4af1595b0719ba546033c97676d44f;hb=d7a30f93b517ac76816d0acea92e9c56ad5d6594;hp=d61b501d8bf40ce77c96dcd5d6f8657de21be01a;hpb=2ae2b257d39ea62640c2590f794e4275c6db1cd4;p=chaz%2Fopenbox diff --git a/src/screen.cc b/src/screen.cc index d61b501d..e4518fba 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -22,6 +22,7 @@ extern "C" { #include "client.hh" #include "openbox.hh" #include "frame.hh" +#include "bindings.hh" #include "otk/display.hh" static bool running; @@ -400,6 +401,9 @@ void OBScreen::manageWindow(Window window) clients.push_back(client); // update the root properties setClientList(); + + // grab buttons/keys on the window + Openbox::instance->bindings()->grabMouse(true, client); } @@ -407,6 +411,9 @@ void OBScreen::unmanageWindow(OBClient *client) { OBFrame *frame = client->frame; + // ungrab buttons/keys on the window + Openbox::instance->bindings()->grabMouse(false, client); + // XXX: pass around focus if this window was focused // remove from the wm's map