#include "otk/display.hh"
#include <string>
-#include <iostream> // TEMP
namespace ob {
+const long OBFrame::event_mask;
+
OBFrame::OBFrame(OBClient *client, otk::Style *style)
: otk::OtkWidget(Openbox::instance, style),
_client(client),
assert(client);
assert(style);
+ XSelectInput(otk::OBDisplay::display, getWindow(), OBFrame::event_mask);
+
unmanaged();
_titlebar.unmanaged();
_button_close.unmanaged();
_grip_right.unmanaged();
_plate.unmanaged();
+ _grip_left.setCursor(Openbox::instance->cursors().ll_angle);
+ _grip_right.setCursor(Openbox::instance->cursors().lr_angle);
+
_plate.show();
_button_close.setText("X");
void OBFrame::grabClient()
{
- // select the event mask on the frame
- //XSelectInput(otk::OBDisplay::display, _window, SubstructureRedirectMask);
-
// reparent the client to the frame
XReparentWindow(otk::OBDisplay::display, _client->window(),
_plate.getWindow(), 0, 0);
_client->ignore_unmaps++;
- // raise the client above the frame
- //XRaiseWindow(otk::OBDisplay::display, _client->window());
+ // select the event mask on the client's parent
+ //XSelectInput(otk::OBDisplay::display, _plate.getWindow(),
+ // SubstructureRedirectMask);
+
// map the client so it maps when the frame does
XMapWindow(otk::OBDisplay::display, _client->window());