hideMenus function, hides all menus on current screen
fluxgen fluxgen
2 files changed,
38 insertions(+),
4 deletions(-)
M
src/Screen.cc
→
src/Screen.cc
@@ -1,5 +1,5 @@
// Screen.cc for Fluxbox Window Manager -// Copyright (c) 2001 - 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) +// Copyright (c) 2001 - 2004 Henrik Kinnunen (fluxgen at users.sourceforge.net) // // Screen.cc for Blackbox - an X11 Window manager // Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net)@@ -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: Screen.cc,v 1.259 2004/01/10 02:58:01 fluxgen Exp $ +// $Id: Screen.cc,v 1.260 2004/01/11 16:06:22 fluxgen Exp $ #include "Screen.hh"@@ -741,6 +741,39 @@ if (!label.empty())
menu->setLabel(label.c_str()); return menu; +} + +void BScreen::hideMenus() { + // hide extra menus + Fluxbox::instance()->hideExtraMenus(*this); + +#ifdef SLIT + // hide slit menu + if (slit()) + slit()->menu().hide(); +#endif // SLIT + + // hide icon menus + if (getIconList().size()) { + Icons::iterator it = getIconList().begin(); + const Icons::iterator it_end = getIconList().end(); + for (; it != it_end; ++it) + (*it)->menu().hide(); + } + // hide all client menus + Workspaces::iterator w_it = getWorkspacesList().begin(); + const Workspaces::iterator w_it_end = getWorkspacesList().end(); + for (; w_it != w_it_end; ++w_it) { + if ((*w_it)->windowList().size()) { + Workspace::Windows::iterator win_it = (*w_it)->windowList().begin(); + const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end(); + for (; win_it != win_it_end; ++win_it) { + (*win_it)->menu().hide(); + } + } + } + + } void BScreen::reconfigure() {
M
src/Screen.hh
→
src/Screen.hh
@@ -1,5 +1,5 @@
// Screen.hh for Fluxbox Window Manager -// Copyright (c) 2001 - 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net) +// Copyright (c) 2001 - 2004 Henrik Kinnunen (fluxgen at users.sourceforge.net) // // Screen.hh for Blackbox - an X11 Window manager // Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net)@@ -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: Screen.hh,v 1.131 2003/12/30 17:57:12 fluxgen Exp $ +// $Id: Screen.hh,v 1.132 2004/01/11 16:05:55 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH@@ -172,6 +172,7 @@
void update(FbTk::Subject *subj); FbTk::Menu *createMenu(const std::string &label); + void hideMenus(); /// @return the resource value of number of workspace inline int getNumberOfWorkspaces() const { return *resource.workspaces; }