Commit e2c00a47 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(widget-choose): Use display-mouse-p instead of window-system.

(widget-choice-mouse-down-action): Use display-popup-menus-p
instead of window-system.
parent fbebec27
......@@ -176,7 +176,7 @@ mouse event, and the number of elements in items is less than
`widget-menu-max-size', a popup menu will be used, otherwise the
(cond ((and (< (length items) widget-menu-max-size)
event (fboundp 'x-popup-menu) window-system)
event (fboundp 'x-popup-menu) (display-mouse-p))
;; We are in Emacs-19, pressed by the mouse
(x-popup-menu event
(list title (cons "" items))))
......@@ -1818,7 +1818,7 @@ when he invoked the menu."
;; Return non-nil if we need a menu.
(let ((args (widget-get widget :args))
(old (widget-get widget :choice)))
(cond ((not window-system)
(cond ((not (display-popup-menus-p))
;; No place to pop up a menu.
((not (or (fboundp 'x-popup-menu) (fboundp 'popup-menu)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment