aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-11 16:06:22 (GMT)
committerfluxgen <fluxgen>2004-01-11 16:06:22 (GMT)
commit3af441d3ef082111b5718a3ea76de7b6ab102225 (patch)
treeab90a178ff9ee738c426eb7bc1509b31eb42d9a5 /src
parentfabfc410029cfd606729dfd118e50dc336abf010 (diff)
downloadfluxbox_pavel-3af441d3ef082111b5718a3ea76de7b6ab102225.zip
fluxbox_pavel-3af441d3ef082111b5718a3ea76de7b6ab102225.tar.bz2
hideMenus function, hides all menus on current screen
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc37
-rw-r--r--src/Screen.hh5
2 files changed, 38 insertions, 4 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index c6ec4e7..dfe92fb 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1,5 +1,5 @@
1// Screen.cc for Fluxbox Window Manager 1// Screen.cc for Fluxbox Window Manager
2// Copyright (c) 2001 - 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) 2// Copyright (c) 2001 - 2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// 3//
4// Screen.cc for Blackbox - an X11 Window manager 4// Screen.cc for Blackbox - an X11 Window manager
5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net) 5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net)
@@ -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: Screen.cc,v 1.259 2004/01/10 02:58:01 fluxgen Exp $ 25// $Id: Screen.cc,v 1.260 2004/01/11 16:06:22 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -743,6 +743,39 @@ FbTk::Menu *BScreen::createMenu(const std::string &label) {
743 return menu; 743 return menu;
744} 744}
745 745
746void BScreen::hideMenus() {
747 // hide extra menus
748 Fluxbox::instance()->hideExtraMenus(*this);
749
750#ifdef SLIT
751 // hide slit menu
752 if (slit())
753 slit()->menu().hide();
754#endif // SLIT
755
756 // hide icon menus
757 if (getIconList().size()) {
758 Icons::iterator it = getIconList().begin();
759 const Icons::iterator it_end = getIconList().end();
760 for (; it != it_end; ++it)
761 (*it)->menu().hide();
762 }
763 // hide all client menus
764 Workspaces::iterator w_it = getWorkspacesList().begin();
765 const Workspaces::iterator w_it_end = getWorkspacesList().end();
766 for (; w_it != w_it_end; ++w_it) {
767 if ((*w_it)->windowList().size()) {
768 Workspace::Windows::iterator win_it = (*w_it)->windowList().begin();
769 const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end();
770 for (; win_it != win_it_end; ++win_it) {
771 (*win_it)->menu().hide();
772 }
773 }
774 }
775
776
777}
778
746void BScreen::reconfigure() { 779void BScreen::reconfigure() {
747 m_menutheme->setAlpha(*resource.menu_alpha); 780 m_menutheme->setAlpha(*resource.menu_alpha);
748 m_menutheme->setMenuMode(*resource.menu_mode); 781 m_menutheme->setMenuMode(*resource.menu_mode);
diff --git a/src/Screen.hh b/src/Screen.hh
index 114957e..0b606a8 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -1,5 +1,5 @@
1// Screen.hh for Fluxbox Window Manager 1// Screen.hh for Fluxbox Window Manager
2// Copyright (c) 2001 - 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) 2// Copyright (c) 2001 - 2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// 3//
4// Screen.hh for Blackbox - an X11 Window manager 4// Screen.hh for Blackbox - an X11 Window manager
5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net) 5// Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net)
@@ -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: Screen.hh,v 1.131 2003/12/30 17:57:12 fluxgen Exp $ 25// $Id: Screen.hh,v 1.132 2004/01/11 16:05:55 fluxgen Exp $
26 26
27#ifndef SCREEN_HH 27#ifndef SCREEN_HH
28#define SCREEN_HH 28#define SCREEN_HH
@@ -172,6 +172,7 @@ public:
172 void update(FbTk::Subject *subj); 172 void update(FbTk::Subject *subj);
173 173
174 FbTk::Menu *createMenu(const std::string &label); 174 FbTk::Menu *createMenu(const std::string &label);
175 void hideMenus();
175 176
176 /// @return the resource value of number of workspace 177 /// @return the resource value of number of workspace
177 inline int getNumberOfWorkspaces() const { return *resource.workspaces; } 178 inline int getNumberOfWorkspaces() const { return *resource.workspaces; }