aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-01-11 16:10:51 (GMT)
committerfluxgen <fluxgen>2004-01-11 16:10:51 (GMT)
commit7197a4951fc88409b49c567da650db63d1a1266c (patch)
tree9dd87eeef35c20f6a9bccce2bf326a8f770477fa /src
parent6cf28915fb519a78d24ee4fc820c814bec5662b2 (diff)
downloadfluxbox_paul-7197a4951fc88409b49c567da650db63d1a1266c.zip
fluxbox_paul-7197a4951fc88409b49c567da650db63d1a1266c.tar.bz2
hide extra menus
Diffstat (limited to 'src')
-rw-r--r--src/fluxbox.cc32
-rw-r--r--src/fluxbox.hh8
2 files changed, 23 insertions, 17 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 40d987c..b08c38b 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.cc
@@ -1,5 +1,5 @@
1// fluxbox.cc for Fluxbox Window Manager 1// fluxbox.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// blackbox.cc for blackbox - an X11 Window manager 4// blackbox.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: fluxbox.cc,v 1.219 2004/01/11 13:10:39 fluxgen Exp $ 25// $Id: fluxbox.cc,v 1.220 2004/01/11 16:10:51 fluxgen Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -606,6 +606,7 @@ Fluxbox::~Fluxbox() {
606 delete m_atomhandler.back(); 606 delete m_atomhandler.back();
607 m_atomhandler.pop_back(); 607 m_atomhandler.pop_back();
608 } 608 }
609
609 while (!m_screen_list.empty()) { 610 while (!m_screen_list.empty()) {
610 delete m_screen_list.back(); 611 delete m_screen_list.back();
611 m_screen_list.pop_back(); 612 m_screen_list.pop_back();
@@ -951,19 +952,8 @@ void Fluxbox::handleButtonEvent(XButtonEvent &be) {
951 BScreen *screen = searchScreen(be.window); 952 BScreen *screen = searchScreen(be.window);
952 if (screen == 0) 953 if (screen == 0)
953 break; // end case 954 break; // end case
954#ifdef SLIT
955 // hide slit menu
956 if (screen->slit())
957 screen->slit()->menu().hide();
958#endif // SLIT
959 955
960#ifdef USE_TOOLBAR 956 screen->hideMenus();
961 // hide toolbar that matches screen
962 for (size_t toolbar = 0; toolbar < m_toolbars.size(); ++toolbar) {
963 if (&(m_toolbars[toolbar]->screen()) == screen)
964 m_toolbars[toolbar]->menu().hide();
965 }
966#endif // USE_TOOLBAR
967 957
968 // strip num/caps/scroll-lock and 958 // strip num/caps/scroll-lock and
969 // see if we're using any other modifier, 959 // see if we're using any other modifier,
@@ -1094,7 +1084,7 @@ void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) {
1094 */ 1084 */
1095void Fluxbox::handleClientMessage(XClientMessageEvent &ce) { 1085void Fluxbox::handleClientMessage(XClientMessageEvent &ce) {
1096#ifdef DEBUG 1086#ifdef DEBUG
1097 const char * atom = "nothing"; 1087 char * atom = 0;
1098 if (ce.message_type) 1088 if (ce.message_type)
1099 atom = XGetAtomName(FbTk::App::instance()->display(), ce.message_type); 1089 atom = XGetAtomName(FbTk::App::instance()->display(), ce.message_type);
1100 1090
@@ -1759,6 +1749,18 @@ void Fluxbox::checkMenu() {
1759 rereadMenu(); 1749 rereadMenu();
1760} 1750}
1761 1751
1752void Fluxbox::hideExtraMenus(BScreen &screen) {
1753
1754#ifdef USE_TOOLBAR
1755 // hide toolbar that matches screen
1756 for (size_t toolbar = 0; toolbar < m_toolbars.size(); ++toolbar) {
1757 if (&(m_toolbars[toolbar]->screen()) == &screen)
1758 m_toolbars[toolbar]->menu().hide();
1759 }
1760
1761#endif // USE_TOOLBAR
1762
1763}
1762 1764
1763void Fluxbox::rereadMenu() { 1765void Fluxbox::rereadMenu() {
1764 m_reread_menu_wait = true; 1766 m_reread_menu_wait = true;
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index cf61e25..53b8bd9 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.hh
@@ -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.hh,v 1.81 2003/12/31 00:35:21 fluxgen Exp $ 25// $Id: fluxbox.hh,v 1.82 2004/01/11 16:10:23 fluxgen Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -180,6 +180,8 @@ public:
180 void rereadMenu(); 180 void rereadMenu();
181 /// reloads the menus if the timestamps changed 181 /// reloads the menus if the timestamps changed
182 void checkMenu(); 182 void checkMenu();
183
184 void hideExtraMenus(BScreen &screen);
183 185
184 /// handle any system signal sent to the application 186 /// handle any system signal sent to the application
185 void handleSignal(int signum); 187 void handleSignal(int signum);
@@ -191,7 +193,9 @@ public:
191 void timed_reconfigure(); 193 void timed_reconfigure();
192 194
193 bool isStartup() const { return m_starting; } 195 bool isStartup() const { return m_starting; }
194 196
197
198
195 typedef std::vector<Fluxbox::Titlebar> TitlebarList; 199 typedef std::vector<Fluxbox::Titlebar> TitlebarList;
196 /// @return whether the timestamps on the menu changed 200 /// @return whether the timestamps on the menu changed
197 bool menuTimestampsChanged() const; 201 bool menuTimestampsChanged() const;