all repos — fluxbox @ 9a9f87d1ca698811134adcf2804c89c343cdba58

custom fork of the fluxbox windowmanager

find eventhandler
fluxgen fluxgen
commit

9a9f87d1ca698811134adcf2804c89c343cdba58

parent

94100534be4d09a999ff6d7065e5fcf5364b8e99

2 files changed, 9 insertions(+), 2 deletions(-)

jump to
M src/FbTk/EventManager.ccsrc/FbTk/EventManager.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: EventManager.cc,v 1.10 2003/10/14 16:23:16 rathnor Exp $ +// $Id: EventManager.cc,v 1.11 2004/04/19 22:46:46 fluxgen Exp $ #include "EventManager.hh" #include "FbWindow.hh"

@@ -56,6 +56,11 @@

void EventManager::remove(const FbWindow &win) { unregisterEventHandler(win.window()); } + +EventHandler *EventManager::find(Window win) { + return m_eventhandlers[win]; +} + Window EventManager::getEventWindow(XEvent &ev) { // we only have cases for events that differ from xany
M src/FbTk/EventManager.hhsrc/FbTk/EventManager.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: EventManager.hh,v 1.7 2003/12/16 17:06:49 fluxgen Exp $ +// $Id: EventManager.hh,v 1.8 2004/04/19 22:46:46 fluxgen Exp $ #include "EventHandler.hh" #include <map>

@@ -42,6 +42,8 @@ void add(EventHandler &ev, const FbWindow &win);

void remove(const FbWindow &win); void add(EventHandler &ev, Window win) { registerEventHandler(ev, win); } void remove(Window win) { unregisterEventHandler(win); } + + EventHandler *find(Window win); // Some events have the parent window as the xany.window // This function always returns the actual window member of the event structure