X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fframe.cc;h=6f4bba0061db8d5bb25dece4e6066a0c8f8e1219;hb=7db3ffecc980821ada3e805e2471716896e2410a;hp=072edc70bf695aff52b9335186257ab807162922;hpb=745e840547b5443ecfb9b6f0a4f14b0d035d59c2;p=chaz%2Fopenbox diff --git a/src/frame.cc b/src/frame.cc index 072edc70..6f4bba00 100644 --- a/src/frame.cc +++ b/src/frame.cc @@ -13,6 +13,8 @@ extern "C" { #include "openbox.hh" #include "frame.hh" #include "client.hh" +#include "python.hh" +#include "bindings.hh" #include "otk/display.hh" #include @@ -56,51 +58,15 @@ OBFrame::OBFrame(OBClient *client, otk::Style *style) _plate.show(); // the other stuff is shown based on decor settings grabClient(); - - grabButtons(true); } OBFrame::~OBFrame() { - grabButtons(false); releaseClient(false); } -void OBFrame::grabButtons(bool grab) -{ - if (grab) { - // grab simple button clicks on the client, but pass them through too - otk::OBDisplay::grabButton(Button1, 0, _plate.window(), true, - ButtonPressMask, GrabModeSync, GrabModeSync, - _plate.window(), None, false); - otk::OBDisplay::grabButton(Button2, 0, _plate.window(), true, - ButtonPressMask, GrabModeSync, GrabModeSync, - _plate.window(), None, false); - otk::OBDisplay::grabButton(Button3, 0, _plate.window(), true, - ButtonPressMask, GrabModeSync, GrabModeSync, - _plate.window(), None, false); - otk::OBDisplay::grabButton(Button4, 0, _plate.window(), true, - ButtonPressMask, GrabModeSync, GrabModeSync, - _plate.window(), None, false); - otk::OBDisplay::grabButton(Button5, 0, _plate.window(), true, - ButtonPressMask, GrabModeSync, GrabModeSync, - _plate.window(), None, false); - } else { - } - - // grab any requested buttons on the entire frame - if (grab) { - - otk::OBDisplay::grabButton(Button1, 0, _plate.window(), true, - ButtonPressMask, GrabModeSync, GrabModeSync, - _plate.window(), None, false); - } else { - } -} - - void OBFrame::setTitle(const std::string &text) { _label.setText(text);