#include "client.hh"
#include "openbox.hh"
#include "frame.hh"
+#include "bindings.hh"
#include "otk/display.hh"
static bool running;
otk::OBProperty::Atom_Cardinal,
viewport, 2);
+ // create the window which gets focus when no clients get it
+ XSetWindowAttributes attr;
+ attr.override_redirect = true;
+ _focuswindow = XCreateWindow(otk::OBDisplay::display, _info->rootWindow(),
+ -100, -100, 1, 1, 0, 0, InputOnly,
+ _info->visual(), CWOverrideRedirect, &attr);
+ XMapWindow(otk::OBDisplay::display, _focuswindow);
+
// these may be further updated if any pre-existing windows are found in
// the manageExising() function
setClientList(); // initialize the client lists, which will be empty
clients.push_back(client);
// update the root properties
setClientList();
+
+ // grab buttons on the window
+ Openbox::instance->bindings()->grabMouse(true, client);
}
{
OBFrame *frame = client->frame;
+ // ungrab buttons on the window
+ Openbox::instance->bindings()->grabMouse(false, client);
+
// XXX: pass around focus if this window was focused
// remove from the wm's map