Function: hmouse-emacs-modeline-event-p

hmouse-emacs-modeline-event-p is a byte-compiled function defined in hui-window.el.

Signature

(hmouse-emacs-modeline-event-p EVENT)

Documentation

Return non-nil if EVENT happened on a window mode line.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-window.el
(defun hmouse-emacs-modeline-event-p (event)
  "Return non-nil if EVENT happened on a window mode line."
  (or (and (eventp event) (eq (posn-area (event-start event)) 'mode-line))
      ;; If drag release was to an unselected frame mode-line, on
      ;; click-to-focus systems, the release event will not include
      ;; the mode-line area, so manually compute if that was the location.
      (let* ((w (smart-window-of-coords event))
	     ;; Do all calculations in pixels if possible.
	     (line-height (when (and w (window-live-p w)) (frame-char-height (window-frame w))))
	     (mode-ln (when (and w (window-live-p w)) (nth 3 (window-edges w nil t t))))
	     (last-press-y (cdr (posn-x-y (event-start event)))))
	(and (not (eq w (minibuffer-window)))
	     last-press-y mode-ln (< (- mode-ln last-press-y) line-height)))))