aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-01-07 02:07:43 (GMT)
committerfluxgen <fluxgen>2003-01-07 02:07:43 (GMT)
commit188ac46621ba4eadf236f7889de550e38bdfd717 (patch)
tree33bf2ce652849a34d7c1761ea669c1378ec05aae /src/Toolbar.cc
parent87e65a8c06593fac430a44eba1664654769e9f18 (diff)
downloadfluxbox_pavel-188ac46621ba4eadf236f7889de550e38bdfd717.zip
fluxbox_pavel-188ac46621ba4eadf236f7889de550e38bdfd717.tar.bz2
using fbtk menu instead of windowmenu
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