summaryrefslogtreecommitdiff
path: root/src/screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.cc')
-rw-r--r--src/screen.cc7
1 files changed, 7 insertions, 0 deletions
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