So that you can actually use blackbox, I whipped up a little patch.  This
makes it possible to bring up the root menu with a click on button
1.  If the menu is visible, another click on the root window will hide the
root menu.  To get access to the workspaces menu, add the line:
[workspaces] (description here)
to your menu file.  This patch doesnt let you access the window menu, but
then of course this is a quick hack.  Hopefully this will temporarily
solve your problem.  Support for something like this would be a legitimate
feature to add in my opinion, though probably with key presses in addition
to mouse actions.  I will also post this patch to
blackbox.thelinuxcommunity.org.  Let me know how this works.

-- 
Gregory J. Barlow       http://barlow.ncssm.net
NCSSM 99                [EMAIL PROTECTED]
NC State                [EMAIL PROTECTED]
--
"An ounce of mother is worth a ton of priest"
        - Spanish proverb

--- blackbox-0.61.0-orig/src/blackbox.cc        Sun Jun 25 01:56:48 2000
+++ blackbox-0.61.0/src/blackbox.cc     Fri Sep  8 15:49:27 2000
@@ -310,11 +310,38 @@
               if (! screen->isRootColormapInstalled())
                screen->getImageControl()->installRootColormap();
 
-             if (screen->getWorkspacemenu()->isVisible())
-               screen->getWorkspacemenu()->hide();
+       // Begin temporary hack 
 
-              if (screen->getRootmenu()->isVisible())
-                screen->getRootmenu()->hide();
+             if (screen->getRootmenu()->isVisible())
+               screen->getRootmenu()->hide();
+             else {
+
+               int mx = e->xbutton.x_root -
+                      (screen->getRootmenu()->getWidth() / 2);
+               int my = e->xbutton.y_root -
+                      (screen->getRootmenu()->getTitleHeight() / 2);
+
+               if (mx < 0) mx = 0;
+               if (my < 0) my = 0;
+
+               if (mx + screen->getRootmenu()->getWidth() > screen->getWidth())
+                 mx = screen->getWidth() -
+                      screen->getRootmenu()->getWidth() -
+                      screen->getBorderWidth();
+
+               if (my + screen->getRootmenu()->getHeight() >
+                   screen->getHeight())
+                 my = screen->getHeight() -
+                      screen->getRootmenu()->getHeight() -
+                      screen->getBorderWidth();
+
+               screen->getRootmenu()->move(mx, my);
+
+               if (! screen->getRootmenu()->isVisible()) {
+                 checkMenu();
+                 screen->getRootmenu()->show();
+               }
+             }
             } else if (e->xbutton.button == 2) {
              int mx = e->xbutton.x_root -
                       (screen->getWorkspacemenu()->getWidth() / 2);

Reply via email to