diff options
author | fluxgen <fluxgen> | 2004-01-11 16:06:22 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-01-11 16:06:22 (GMT) |
commit | 3af441d3ef082111b5718a3ea76de7b6ab102225 (patch) | |
tree | ab90a178ff9ee738c426eb7bc1509b31eb42d9a5 /src/Screen.cc | |
parent | fabfc410029cfd606729dfd118e50dc336abf010 (diff) | |
download | fluxbox-3af441d3ef082111b5718a3ea76de7b6ab102225.zip fluxbox-3af441d3ef082111b5718a3ea76de7b6ab102225.tar.bz2 |
hideMenus function, hides all menus on current screen
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 37 |
1 files changed, 35 insertions, 2 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 | ||
746 | void 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 | |||
746 | void BScreen::reconfigure() { | 779 | void 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); |