From 15d3efa69c40c93ae609a791e4b57c3d793e646f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 4 Jan 2003 01:37:47 +0000 Subject: [PATCH] epist alt-tab works now! i.e. NET_ACTIVE_WINDOW is working --- src/openbox.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/openbox.cc b/src/openbox.cc index 6ed00a2c..6b5251b5 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -347,6 +347,15 @@ void Openbox::setFocusedClient(OBClient *c) XSetInputFocus(otk::OBDisplay::display, _focused_screen->focuswindow(), RevertToNone, CurrentTime); } + // set the NET_ACTIVE_WINDOW hint for all screens + ScreenList::iterator it, end = _screens.end(); + for (it = _screens.begin(); it != end; ++it) { + int num = (*it)->number(); + Window root = otk::OBDisplay::screenInfo(num)->rootWindow(); + _property->set(root, otk::OBProperty::net_active_window, + otk::OBProperty::Atom_Window, + (c && _focused_screen == *it) ? c->window() : None); + } } void Openbox::execute(int screen, const std::string &bin) -- 2.39.2