}
#include "frame.hh"
+#include "config.hh"
#include "openbox.hh"
#include "otk/display.hh"
#include "otk/surface.hh"
applyStyle(*otk::RenderStyle::style(_client->screen()));
- _layout = openbox->screen(_client->screen())->config().titlebar_layout;
+ _layout = "ITMC";
+ python_get_string("titlebar_layout", &_layout);
// register all of the windows with the event dispatcher
Window *w = allWindows();
otk::pixel32 *dest = s->pixelData(), *src;
int w = _title_sur->size().width();
- src = _title_sur->pixelData() + w * (geom.bevel + 1) + geom.title_x;
+ src = _title_sur->pixelData() + w * geom.bevel + geom.title_x;
// get the background under the label
- int xd = s->width();
- int yd = s->height();
+ int xd = s->size().width();
+ int yd = s->size().height();
for (int y = 0; y < yd; ++y, src += w - xd)
for (int x = 0; x < xd; ++x, ++dest, ++src)
*dest = *src;
_client->ignore_unmaps += 2;
// select the event mask on the client's parent (to receive config/map req's)
- XSelectInput(**otk::display, _plate, SubstructureRedirectMask);
+ // the ButtonPress is to catch clicks on the client border
+ XSelectInput(**otk::display, _plate, (SubstructureRedirectMask |
+ ButtonPressMask));
// map the client so it maps when the frame does
XMapWindow(**otk::display, _client->window());