diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-12-31 19:15:24 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-12-31 19:15:24 +0000 |
| commit | 745e840547b5443ecfb9b6f0a4f14b0d035d59c2 (patch) | |
| tree | e20da017ab6d93775136f0cd2267a25f7c83f8d6 /src/frame.cc | |
| parent | 1161a90a70b21d3064a9dee62c72dd4be3025ada (diff) | |
load config options from the python environment
Diffstat (limited to 'src/frame.cc')
| -rw-r--r-- | src/frame.cc | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/frame.cc b/src/frame.cc index 4f466b46..072edc70 100644 --- a/src/frame.cc +++ b/src/frame.cc @@ -56,15 +56,51 @@ 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); |
