Forcing menus position



Hello

Is there a "non-intrusive" way to force a position for menus to be
displayed?  For example, I want some of my menus to be displayed always
at the bottom-left corner of the screen, no matter the position of the
cursor.

I could get this by modifying the `popup-menu' function from the
menus.jl file (diff output at the end of the message).

So, I can do something like

  (popup-menu my-menu (cons 0 (screen-height)))

to place `my-menu' at the bottom-left corner of the screen.

Is there a non-intrusive way of doing this?  If there is not, John, can
you consider applying the modifications to menus.jl?

Best wishes.
Mario


$ diff -u ~/menus.jl lisp/sawfish/wm/menus.jl

--- lisp/sawfish/wm/menus.jl    2005-11-27 12:38:09.000000000 +0000
+++ /home/mario/menus.jl        2005-11-27 12:24:09.000000000 +0000
@@ -262,7 +262,7 @@
               (user-eval result))
              (t result)))))
 
-  (define (popup-menu spec)
+  (define (popup-menu spec #!optional position)
     (or spec (error "No menu given to popup-menu"))
     (if (and menu-active menu-process (process-in-use-p menu-process))
        (error "Menu already active")
@@ -297,7 +297,7 @@
                    (rplacd offset
                            (max 0 (+ (cdr offset) (cdr dims)
                                      (cdr (window-position menu-active))))))
-               (setq offset nil))
+               (setq offset position))
              (setq nickname-table (make-table eq-hash eq))
              (setq nickname-index 0)
              (format menu-process "(popup-menu %s %S %S)\n"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]