summaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index b3a3cf3..efa09a7 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.51 2003/01/05 22:37:46 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.52 2003/01/07 02:07:43 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -712,21 +712,21 @@ void Toolbar::buttonPressEvent(XButtonEvent &be) {
712 FluxboxWindow *fluxboxwin = 0; 712 FluxboxWindow *fluxboxwin = 0;
713 // if we clicked on a icon then show window menu 713 // if we clicked on a icon then show window menu
714 if ( m_iconbar.get() != 0 && (fluxboxwin = m_iconbar->findWindow(be.window)) ) { 714 if ( m_iconbar.get() != 0 && (fluxboxwin = m_iconbar->findWindow(be.window)) ) {
715 const Windowmenu * const wm = fluxboxwin->getWindowmenu(); 715 const FbTk::Menu &wm = fluxboxwin->getWindowmenu();
716 if (wm != 0) { 716
717 int menu_y = be.y_root - wm->height(); 717 int menu_y = be.y_root - wm.height();
718 int menu_x = be.x_root; 718 int menu_x = be.x_root;
719 // make sure the menu is visible 719 // make sure the menu is visible
720 if (menu_y < 0) { 720 if (menu_y < 0) {
721 menu_y = 0; 721 menu_y = 0;
722 }
723 if (menu_x < 0) {
724 menu_x = 0;
725 } else if (menu_x + wm->width() > screen()->getWidth()) {
726 menu_x = screen()->getWidth() - wm->width();
727 }
728 fluxboxwin->showMenu(menu_x, menu_y);
729 } 722 }
723 if (menu_x < 0) {
724 menu_x = 0;
725 } else if (menu_x + wm.width() > screen()->getWidth()) {
726 menu_x = screen()->getWidth() - wm.width();
727 }
728 fluxboxwin->showMenu(menu_x, menu_y);
729
730 } else if (! m_toolbarmenu.isVisible()) { 730 } else if (! m_toolbarmenu.isVisible()) {
731 int x, y; 731 int x, y;
732 732