summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc10
-rw-r--r--src/Screen.hh5
-rw-r--r--src/Window.cc15
3 files changed, 20 insertions, 10 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 5941c1d..d026f12 100644
--- a/src/Screen.cc
+++ b/src/Screen.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: Screen.cc,v 1.273 2004/03/30 13:46:34 fluxgen Exp $ 25// $Id: Screen.cc,v 1.274 2004/04/12 23:05:10 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -901,6 +901,11 @@ void BScreen::hideMenus() {
901 (*it)->menu().hide(); 901 (*it)->menu().hide();
902 } 902 }
903 // hide all client menus 903 // hide all client menus
904 hideWindowMenus();
905
906}
907
908void BScreen::hideWindowMenus(const FluxboxWindow* except) {
904 Workspaces::iterator w_it = getWorkspacesList().begin(); 909 Workspaces::iterator w_it = getWorkspacesList().begin();
905 const Workspaces::iterator w_it_end = getWorkspacesList().end(); 910 const Workspaces::iterator w_it_end = getWorkspacesList().end();
906 for (; w_it != w_it_end; ++w_it) { 911 for (; w_it != w_it_end; ++w_it) {
@@ -908,13 +913,14 @@ void BScreen::hideMenus() {
908 Workspace::Windows::iterator win_it = (*w_it)->windowList().begin(); 913 Workspace::Windows::iterator win_it = (*w_it)->windowList().begin();
909 const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end(); 914 const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end();
910 for (; win_it != win_it_end; ++win_it) { 915 for (; win_it != win_it_end; ++win_it) {
916 if (*win_it != except)
911 (*win_it)->menu().hide(); 917 (*win_it)->menu().hide();
912 } 918 }
913 } 919 }
914 } 920 }
921}
915 922
916 923
917}
918 924
919void BScreen::reconfigure() { 925void BScreen::reconfigure() {
920 m_menutheme->setAlpha(*resource.menu_alpha); 926 m_menutheme->setAlpha(*resource.menu_alpha);
diff --git a/src/Screen.hh b/src/Screen.hh
index b84b950..6731d14 100644
--- a/src/Screen.hh
+++ b/src/Screen.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: Screen.hh,v 1.137 2004/03/30 13:45:20 fluxgen Exp $ 25// $Id: Screen.hh,v 1.138 2004/04/12 23:05:10 fluxgen Exp $
26 26
27#ifndef SCREEN_HH 27#ifndef SCREEN_HH
28#define SCREEN_HH 28#define SCREEN_HH
@@ -178,6 +178,9 @@ public:
178 FbTk::Menu *createMenu(const std::string &label); 178 FbTk::Menu *createMenu(const std::string &label);
179 void hideMenus(); 179 void hideMenus();
180 180
181 /// hide all windowmenus except the given one (if given)
182 void hideWindowMenus(const FluxboxWindow* except= 0);
183
181 /// @return the resource value of number of workspace 184 /// @return the resource value of number of workspace
182 inline int getNumberOfWorkspaces() const { return *resource.workspaces; } 185 inline int getNumberOfWorkspaces() const { return *resource.workspaces; }
183 186
diff --git a/src/Window.cc b/src/Window.cc
index f77d79e..faeec93 100644
--- a/src/Window.cc
+++ b/src/Window.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: Window.cc,v 1.276 2004/04/12 18:19:10 fluxgen Exp $ 25// $Id: Window.cc,v 1.277 2004/04/12 23:03:34 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -393,8 +393,8 @@ void FluxboxWindow::init() {
393 393
394 394
395 FbTk::TextButton *btn = new FbTk::TextButton(frame().label(), 395 FbTk::TextButton *btn = new FbTk::TextButton(frame().label(),
396 frame().theme().font(), 396 frame().theme().font(),
397 m_client->title()); 397 m_client->title());
398 btn->setJustify(frame().theme().justify()); 398 btn->setJustify(frame().theme().justify());
399 m_labelbuttons[m_client] = btn; 399 m_labelbuttons[m_client] = btn;
400 frame().addLabelButton(*btn); 400 frame().addLabelButton(*btn);
@@ -2354,8 +2354,8 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) {
2354 m_button_grab_y = be.y_root - frame().y() - frame().window().borderWidth(); 2354 m_button_grab_y = be.y_root - frame().y() - frame().window().borderWidth();
2355 } 2355 }
2356 2356
2357 if (m_windowmenu.isVisible()) 2357 Fluxbox::instance()->hideExtraMenus(screen());
2358 m_windowmenu.hide(); 2358 screen().hideWindowMenus(this);
2359 } 2359 }
2360} 2360}
2361 2361
@@ -3523,7 +3523,8 @@ void FluxboxWindow::setupWindow() {
3523 */ 3523 */
3524void FluxboxWindow::reconfigTheme() { 3524void FluxboxWindow::reconfigTheme() {
3525 3525
3526 m_frame.setBorderWidth(decorations.border?frame().theme().border().width():0); 3526 m_frame.setBorderWidth(decorations.border ?
3527 frame().theme().border().width() : 0);
3527 if (decorations.handle && frame().theme().handleWidth() != 0) 3528 if (decorations.handle && frame().theme().handleWidth() != 0)
3528 frame().showHandle(); 3529 frame().showHandle();
3529 else 3530 else
@@ -3545,7 +3546,7 @@ void FluxboxWindow::reconfigTheme() {
3545 sendConfigureNotify(); 3546 sendConfigureNotify();
3546} 3547}
3547 3548
3548// grab pointer an increase counter. 3549// grab pointer and increase counter.
3549// we need this to count grab pointers, 3550// we need this to count grab pointers,
3550// especially at startup, where we can drag/resize while starting 3551// especially at startup, where we can drag/resize while starting
3551// and causing it to send events to windows later on and make 3552// and causing it to send events to windows later on and make