aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-11-16 22:17:06 (GMT)
committerfluxgen <fluxgen>2002-11-16 22:17:06 (GMT)
commitb51501aa42c6073a926251917df5fa8c7c1eb51d (patch)
tree07cb6caa54a08e242b0dfe3eaaaf7ad3e256519e
parentf05ff362368bc2e5440632455a6eb57d49795670 (diff)
downloadfluxbox_paul-b51501aa42c6073a926251917df5fa8c7c1eb51d.zip
fluxbox_paul-b51501aa42c6073a926251917df5fa8c7c1eb51d.tar.bz2
fixed so workspace menu is shown when you left click on workspace label
-rw-r--r--src/Toolbar.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 31377c8..745646d 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.39 2002/11/15 12:05:04 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.40 2002/11/16 22:17:06 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -972,6 +972,25 @@ void Toolbar::buttonReleaseEvent(XButtonEvent *re) {
972 if (re->x >= 0 && re->x < (signed) frame.button_w && 972 if (re->x >= 0 && re->x < (signed) frame.button_w &&
973 re->y >= 0 && re->y < (signed) frame.button_w) 973 re->y >= 0 && re->y < (signed) frame.button_w)
974 screen->nextFocus(); 974 screen->nextFocus();
975 } else if (re->window == frame.workspace_label) {
976 Basemenu *menu = screen->getWorkspacemenu();
977 //move the workspace label and make it visible
978 menu->move(re->x_root, re->y_root);
979 // make sure the entire menu is visible (TODO: this is repeated by other menus, make a function!)
980 int newx = menu->x(); // new x position of menu
981 int newy = menu->y(); // new y position of menu
982 if (menu->x() < 0)
983 newx = 0;
984 else if (menu->x() + menu->width() > screen->getWidth())
985 newx = screen->getWidth() - menu->width();
986
987 if (menu->y() < 0)
988 newy = 0;
989 else if (menu->y() + menu->height() > screen->getHeight())
990 newy = screen->getHeight() - menu->height();
991 // move and show menu
992 menu->move(newx, newy);
993 menu->show();
975 } else if (re->window == frame.window_label) 994 } else if (re->window == frame.window_label)
976 screen->raiseFocus(); 995 screen->raiseFocus();
977#ifndef HAVE_STRFTIME 996#ifndef HAVE_STRFTIME