aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-19 14:07:00 (GMT)
committerfluxgen <fluxgen>2002-10-19 14:07:00 (GMT)
commit799617f6d1ef27de7126b05e27d1ba6e0814bc39 (patch)
tree94aec581a693d609ba1c25d435149305bc3f8b15 /src
parent1b6e3c1750aa199719a6165276ae858c1b89096e (diff)
downloadfluxbox_pavel-799617f6d1ef27de7126b05e27d1ba6e0814bc39.zip
fluxbox_pavel-799617f6d1ef27de7126b05e27d1ba6e0814bc39.tar.bz2
windowmenu always visible, fixes bug [ 604634 ] Fluxbox 0.1.11 menu on iconbar problem
Diffstat (limited to 'src')
-rw-r--r--src/Toolbar.cc21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 6bf5654..96500af 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.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: Toolbar.cc,v 1.34 2002/10/15 17:13:24 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.35 2002/10/19 14:07:00 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -998,10 +998,23 @@ void Toolbar::buttonPressEvent(XButtonEvent *be) {
998 XLowerWindow(display, frame.window); 998 XLowerWindow(display, frame.window);
999 } else if (be->button == 3) { 999 } else if (be->button == 3) {
1000 FluxboxWindow *fluxboxwin = 0; 1000 FluxboxWindow *fluxboxwin = 0;
1001 // if we clicked on a icon then show window menu
1001 if ( iconbar && (fluxboxwin = iconbar->findWindow(be->window)) ) { 1002 if ( iconbar && (fluxboxwin = iconbar->findWindow(be->window)) ) {
1002 Windowmenu *wm = fluxboxwin->getWindowmenu(); 1003 const Windowmenu * const wm = fluxboxwin->getWindowmenu();
1003 if (wm) 1004 if (wm != 0) {
1004 fluxboxwin->showMenu(be->x_root, be->y_root - wm->height()); 1005 int menu_y = be->y_root - wm->height();
1006 int menu_x = be->x_root;
1007 // make sure the menu is visible
1008 if (menu_y < 0) {
1009 menu_y = 0;
1010 }
1011 if (menu_x < 0) {
1012 menu_x = 0;
1013 } else if (menu_x + wm->width() > screen->getWidth()) {
1014 menu_x = screen->getWidth() - wm->width();
1015 }
1016 fluxboxwin->showMenu(menu_x, menu_y);
1017 }
1005 } else if (! toolbarmenu->isVisible()) { 1018 } else if (! toolbarmenu->isVisible()) {
1006 int x, y; 1019 int x, y;
1007 1020