aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authormarkt <markt>2007-10-15 18:05:28 (GMT)
committermarkt <markt>2007-10-15 18:05:28 (GMT)
commit72130f350ef08c6200d18e544b861940cbcb7526 (patch)
treee2f789548a7e675ecb12cb2f5cda62e22552cde2 /src/Window.cc
parent7e4f8a38531642cc9cb6cba31499d549f4c5f8a0 (diff)
downloadfluxbox-72130f350ef08c6200d18e544b861940cbcb7526.zip
fluxbox-72130f350ef08c6200d18e544b861940cbcb7526.tar.bz2
add OnWindow modifier to keys file
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 27bc7ec..5e9aec5 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -28,6 +28,7 @@
28 28
29#include "WinClient.hh" 29#include "WinClient.hh"
30#include "fluxbox.hh" 30#include "fluxbox.hh"
31#include "Keys.hh"
31#include "Screen.hh" 32#include "Screen.hh"
32#include "FbWinFrameTheme.hh" 33#include "FbWinFrameTheme.hh"
33#include "FbAtoms.hh" 34#include "FbAtoms.hh"
@@ -285,6 +286,9 @@ FluxboxWindow::FluxboxWindow(WinClient &client, FbWinFrameTheme &tm,
285 else 286 else
286 screen().focusControl().addFocusWinBack(*this); 287 screen().focusControl().addFocusWinBack(*this);
287 288
289 Fluxbox::instance()->keys()->registerWindow(frame().window().window(),
290 Keys::ON_WINDOW);
291
288} 292}
289 293
290 294
@@ -292,6 +296,8 @@ FluxboxWindow::~FluxboxWindow() {
292 if (WindowCmd<void>::window() == this) 296 if (WindowCmd<void>::window() == this)
293 WindowCmd<void>::setWindow(0); 297 WindowCmd<void>::setWindow(0);
294 298
299 Fluxbox::instance()->keys()->unregisterWindow(frame().window().window());
300
295#ifdef DEBUG 301#ifdef DEBUG
296 const char* title = m_client ? m_client->title().c_str() : "" ; 302 const char* title = m_client ? m_client->title().c_str() : "" ;
297 cerr<<__FILE__<<"("<<__LINE__<<"): starting ~FluxboxWindow("<<this<<","<<title<<")"<<endl; 303 cerr<<__FILE__<<"("<<__LINE__<<"): starting ~FluxboxWindow("<<this<<","<<title<<")"<<endl;
@@ -2576,6 +2582,13 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) {
2576 m_last_button_x = be.x_root; 2582 m_last_button_x = be.x_root;
2577 m_last_button_y = be.y_root; 2583 m_last_button_y = be.y_root;
2578 2584
2585 // check keys file first
2586 WindowCmd<void>::setWindow(this);
2587 if (Fluxbox::instance()->keys()->doAction(be.type, be.state, be.button,
2588 Keys::ON_WINDOW)) {
2589 return;
2590 }
2591
2579 // check frame events first 2592 // check frame events first
2580 frame().buttonPressEvent(be); 2593 frame().buttonPressEvent(be);
2581 2594