aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-09-08 19:31:27 (GMT)
committerfluxgen <fluxgen>2002-09-08 19:31:27 (GMT)
commit65ce3a88e63dba1fbbc179759ba80ef55c502d4a (patch)
tree2b957d1febf0b3505da26eff14e82a3dad7f037c /src/fluxbox.cc
parent9d5f454cc69f62b2afc91b04e0c5b1c8f4df777c (diff)
downloadfluxbox_pavel-65ce3a88e63dba1fbbc179759ba80ef55c502d4a.zip
fluxbox_pavel-65ce3a88e63dba1fbbc179759ba80ef55c502d4a.tar.bz2
update workspace and check for tab in next/prev window keyevent
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 345cde8..10ddc09 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: fluxbox.cc,v 1.74 2002/09/07 20:25:39 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.75 2002/09/08 19:31:27 fluxgen Exp $
26 26
27 27
28#include "fluxbox.hh" 28#include "fluxbox.hh"
@@ -344,7 +344,7 @@ key(0)
344 344
345 // setup atom handlers 345 // setup atom handlers
346 m_atomhandler.push_back(new Gnome()); 346 m_atomhandler.push_back(new Gnome());
347// m_atomhandler.push_back(new Ewmh()); // TODO 347// m_atomhandler.push_back(new Ewmh());
348 348
349 //singleton pointer 349 //singleton pointer
350 singleton = this; 350 singleton = this;
@@ -1264,12 +1264,12 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) {
1264 break; 1264 break;
1265 case Keys::NEXTWINDOW: //activate next window 1265 case Keys::NEXTWINDOW: //activate next window
1266 screen->nextFocus(key->getParam()); 1266 screen->nextFocus(key->getParam());
1267 if (focused_window) 1267 if (focused_window && focused_window->getTab())
1268 focused_window->getTab()->raise(); 1268 focused_window->getTab()->raise();
1269 break; 1269 break;
1270 case Keys::PREVWINDOW: //activate prev window 1270 case Keys::PREVWINDOW: //activate prev window
1271 screen->prevFocus(key->getParam()); 1271 screen->prevFocus(key->getParam());
1272 if (focused_window) 1272 if (focused_window && focused_window->getTab())
1273 focused_window->getTab()->raise(); 1273 focused_window->getTab()->raise();
1274 break; 1274 break;
1275 case Keys::NEXTTAB: 1275 case Keys::NEXTTAB:
@@ -1613,25 +1613,32 @@ void Fluxbox::update(FbTk::Subject *changedsub) {
1613 FluxboxWindow &win = winsub->win(); 1613 FluxboxWindow &win = winsub->win();
1614 if ((&(win.hintSig())) == changedsub) { // hint signal 1614 if ((&(win.hintSig())) == changedsub) { // hint signal
1615#ifdef DEBUG 1615#ifdef DEBUG
1616 cerr<<__FILE__<<"("<<__LINE__<<") hint signal from "<<&win<<endl; 1616 cerr<<__FILE__<<"("<<__LINE__<<") WINDOW hint signal from "<<&win<<endl;
1617#endif // DEBUG 1617#endif // DEBUG
1618 for (size_t i=0; i<m_atomhandler.size(); ++i) { 1618 for (size_t i=0; i<m_atomhandler.size(); ++i) {
1619 if (m_atomhandler[i]->update()) 1619 if (m_atomhandler[i]->update())
1620 m_atomhandler[i]->updateHints(&win); 1620 m_atomhandler[i]->updateHints(win);
1621 } 1621 }
1622 } else if ((&(win.stateSig())) == changedsub) { // state signal 1622 } else if ((&(win.stateSig())) == changedsub) { // state signal
1623#ifdef DEBUG 1623#ifdef DEBUG
1624 cerr<<__FILE__<<"("<<__LINE__<<") state signal from "<<&win<<endl; 1624 cerr<<__FILE__<<"("<<__LINE__<<") WINDOW state signal from "<<&win<<endl;
1625#endif // DEBUG 1625#endif // DEBUG
1626 for (size_t i=0; i<m_atomhandler.size(); ++i) { 1626 for (size_t i=0; i<m_atomhandler.size(); ++i) {
1627 if (m_atomhandler[i]->update()) 1627 if (m_atomhandler[i]->update())
1628 m_atomhandler[i]->updateState(&win); 1628 m_atomhandler[i]->updateState(win);
1629 } 1629 }
1630 } else if ((&(win.workspaceSig())) == changedsub) { // workspace signal 1630 } else if ((&(win.workspaceSig())) == changedsub) { // workspace signal
1631#ifdef DEBUG 1631#ifdef DEBUG
1632 cerr<<__FILE__<<"("<<__LINE__<<") workspace signal from "<<&win<<endl; 1632 cerr<<__FILE__<<"("<<__LINE__<<") WINDOW workspace signal from "<<&win<<endl;
1633#endif // DEBUG
1634 for (size_t i=0; i<m_atomhandler.size(); ++i) {
1635 if (m_atomhandler[i]->update())
1636 m_atomhandler[i]->updateWorkspace(win);
1637 }
1638 } else {
1639#ifdef DEBUG
1640 cerr<<__FILE__<<"("<<__LINE__<<"): WINDOW uncought signal from "<<&win<<endl;
1633#endif // DEBUG 1641#endif // DEBUG
1634
1635 } 1642 }
1636 1643
1637 } else if (typeid(*changedsub) == typeid(BScreen::ScreenSubject)) { 1644 } else if (typeid(*changedsub) == typeid(BScreen::ScreenSubject)) {
@@ -1677,9 +1684,11 @@ void Fluxbox::attachSignals(FluxboxWindow &win) {
1677 win.hintSig().attach(this); 1684 win.hintSig().attach(this);
1678 win.stateSig().attach(this); 1685 win.stateSig().attach(this);
1679 win.workspaceSig().attach(this); 1686 win.workspaceSig().attach(this);
1687 for (size_t i=0; i<m_atomhandler.size(); ++i) {
1688 m_atomhandler[i]->setupWindow(win);
1689 }
1680} 1690}
1681 1691
1682
1683BScreen *Fluxbox::searchScreen(Window window) { 1692BScreen *Fluxbox::searchScreen(Window window) {
1684 BScreen *screen = (BScreen *) 0; 1693 BScreen *screen = (BScreen *) 0;
1685 ScreenList::iterator it = screenList.begin(); 1694 ScreenList::iterator it = screenList.begin();
@@ -1775,12 +1784,10 @@ void Fluxbox::removeGroupSearch(Window window) {
1775 groupSearch.erase(window); 1784 groupSearch.erase(window);
1776} 1785}
1777 1786
1778
1779void Fluxbox::removeMenuSearch(Window window) { 1787void Fluxbox::removeMenuSearch(Window window) {
1780 menuSearch.erase(window); 1788 menuSearch.erase(window);
1781} 1789}
1782 1790
1783
1784void Fluxbox::removeToolbarSearch(Window window) { 1791void Fluxbox::removeToolbarSearch(Window window) {
1785 toolbarSearch.erase(window); 1792 toolbarSearch.erase(window);
1786} 1793}