update workspace and check for tab in next/prev window keyevent
fluxgen fluxgen
1 files changed,
20 insertions(+),
13 deletions(-)
jump to
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -22,7 +22,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: fluxbox.cc,v 1.74 2002/09/07 20:25:39 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.75 2002/09/08 19:31:27 fluxgen Exp $ #include "fluxbox.hh"@@ -344,7 +344,7 @@ cursor.lr_angle = XCreateFontCursor(getXDisplay(), XC_lr_angle);
// setup atom handlers m_atomhandler.push_back(new Gnome()); -// m_atomhandler.push_back(new Ewmh()); // TODO +// m_atomhandler.push_back(new Ewmh()); //singleton pointer singleton = this;@@ -1264,12 +1264,12 @@ }
break; case Keys::NEXTWINDOW: //activate next window screen->nextFocus(key->getParam()); - if (focused_window) + if (focused_window && focused_window->getTab()) focused_window->getTab()->raise(); break; case Keys::PREVWINDOW: //activate prev window screen->prevFocus(key->getParam()); - if (focused_window) + if (focused_window && focused_window->getTab()) focused_window->getTab()->raise(); break; case Keys::NEXTTAB:@@ -1613,25 +1613,32 @@ FluxboxWindow::WinSubject *winsub = dynamic_cast<FluxboxWindow::WinSubject *>(changedsub);
FluxboxWindow &win = winsub->win(); if ((&(win.hintSig())) == changedsub) { // hint signal #ifdef DEBUG - cerr<<__FILE__<<"("<<__LINE__<<") hint signal from "<<&win<<endl; + cerr<<__FILE__<<"("<<__LINE__<<") WINDOW hint signal from "<<&win<<endl; #endif // DEBUG for (size_t i=0; i<m_atomhandler.size(); ++i) { if (m_atomhandler[i]->update()) - m_atomhandler[i]->updateHints(&win); + m_atomhandler[i]->updateHints(win); } } else if ((&(win.stateSig())) == changedsub) { // state signal #ifdef DEBUG - cerr<<__FILE__<<"("<<__LINE__<<") state signal from "<<&win<<endl; + cerr<<__FILE__<<"("<<__LINE__<<") WINDOW state signal from "<<&win<<endl; #endif // DEBUG for (size_t i=0; i<m_atomhandler.size(); ++i) { if (m_atomhandler[i]->update()) - m_atomhandler[i]->updateState(&win); + m_atomhandler[i]->updateState(win); } } else if ((&(win.workspaceSig())) == changedsub) { // workspace signal #ifdef DEBUG - cerr<<__FILE__<<"("<<__LINE__<<") workspace signal from "<<&win<<endl; + cerr<<__FILE__<<"("<<__LINE__<<") WINDOW workspace signal from "<<&win<<endl; +#endif // DEBUG + for (size_t i=0; i<m_atomhandler.size(); ++i) { + if (m_atomhandler[i]->update()) + m_atomhandler[i]->updateWorkspace(win); + } + } else { +#ifdef DEBUG + cerr<<__FILE__<<"("<<__LINE__<<"): WINDOW uncought signal from "<<&win<<endl; #endif // DEBUG - } } else if (typeid(*changedsub) == typeid(BScreen::ScreenSubject)) {@@ -1677,8 +1684,10 @@ void Fluxbox::attachSignals(FluxboxWindow &win) {
win.hintSig().attach(this); win.stateSig().attach(this); win.workspaceSig().attach(this); + for (size_t i=0; i<m_atomhandler.size(); ++i) { + m_atomhandler[i]->setupWindow(win); + } } - BScreen *Fluxbox::searchScreen(Window window) { BScreen *screen = (BScreen *) 0;@@ -1775,11 +1784,9 @@ void Fluxbox::removeGroupSearch(Window window) {
groupSearch.erase(window); } - void Fluxbox::removeMenuSearch(Window window) { menuSearch.erase(window); } - void Fluxbox::removeToolbarSearch(Window window) { toolbarSearch.erase(window);