summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-08-19 16:36:08 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-08-19 16:36:08 (GMT)
commit75850d8b604b8d35350f7eb535213eecf10beefc (patch)
treef7c53a0ba9c205668cab968da16c6c386f651b19
parent4e64d45e1678f525fe20b4a53fb9539a58f18176 (diff)
downloadfluxbox_lack-75850d8b604b8d35350f7eb535213eecf10beefc.zip
fluxbox_lack-75850d8b604b8d35350f7eb535213eecf10beefc.tar.bz2
shift+enter wasn't sending right click if the menu item had a submenu
-rw-r--r--src/FbTk/Menu.cc6
-rw-r--r--src/WorkspaceMenu.cc2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 4bdc597..ce751d9 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -1058,11 +1058,11 @@ void Menu::keyPressEvent(XKeyEvent &event) {
1058 resetTypeAhead(); 1058 resetTypeAhead();
1059 if (validIndex(m_active_index) && 1059 if (validIndex(m_active_index) &&
1060 isItemEnabled(m_active_index)) { 1060 isItemEnabled(m_active_index)) {
1061 if (menuitems[m_active_index]->submenu() != 0) 1061 // send fake button click
1062 int button = (event.state & ShiftMask) ? 3 : 1;
1063 if (menuitems[m_active_index]->submenu() != 0 && button == 1)
1062 enterSubmenu(); 1064 enterSubmenu();
1063 else { 1065 else {
1064 // send fake button click
1065 int button = (event.state & ShiftMask) ? 3 : 1;
1066 find(m_active_index)->click(button, event.time, event.state); 1066 find(m_active_index)->click(button, event.time, event.state);
1067 m_need_update = true; 1067 m_need_update = true;
1068 updateMenu(); 1068 updateMenu();
diff --git a/src/WorkspaceMenu.cc b/src/WorkspaceMenu.cc
index 5a83170..3bef2b6 100644
--- a/src/WorkspaceMenu.cc
+++ b/src/WorkspaceMenu.cc
@@ -125,7 +125,7 @@ void WorkspaceMenu::init(BScreen &screen) {
125 wkspc->name().c_str(), 125 wkspc->name().c_str(),
126 &wkspc->menu()); 126 &wkspc->menu());
127 FbTk::RefCount<FbTk::Command<void> > jump_cmd(new JumpToWorkspaceCmd(wkspc->workspaceID())); 127 FbTk::RefCount<FbTk::Command<void> > jump_cmd(new JumpToWorkspaceCmd(wkspc->workspaceID()));
128 mb_menu->setCommand(2, jump_cmd); 128 mb_menu->setCommand(3, jump_cmd);
129 insert(mb_menu, workspace + IDX_AFTER_ICONS); 129 insert(mb_menu, workspace + IDX_AFTER_ICONS);
130 } 130 }
131 setItemSelected(screen.currentWorkspace()->workspaceID() + IDX_AFTER_ICONS, true); 131 setItemSelected(screen.currentWorkspace()->workspaceID() + IDX_AFTER_ICONS, true);