Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0fdbf6bc
Commit
0fdbf6bc
authored
Sep 18, 2006
by
Richard M. Stallman
Browse files
(widget-button-click): Handle non-mouse-motion events
that might come in during mouse tracking.
parent
f316efd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
lisp/wid-edit.el
lisp/wid-edit.el
+12
-9
No files found.
lisp/wid-edit.el
View file @
0fdbf6bc
...
...
@@ -959,15 +959,18 @@ Recommended as a parent keymap for modes using widgets.")
(push event unread-command-events)
(setq event oevent)
(throw 'button-press-cancelled t))
(
setq
pos
(
widget-event-point
event
))
(
if
(
and
pos
(
eq
(
get-char-property
pos
'button
)
button
))
(
when
face
(
overlay-put
overlay
'face
pressed-face
)
(
overlay-put
overlay
'mouse-face
pressed-face
))
(
overlay-put
overlay
'face
face
)
(
overlay-put
overlay
'mouse-face
mouse-face
)))))
(unless (or (integerp event)
(memq (car event) '(switch-frame select-window))
(eq (car event) 'scroll-bar-movement))
(setq pos (widget-event-point event))
(if (and pos
(eq (get-char-property pos 'button)
button))
(when face
(overlay-put overlay 'face pressed-face)
(overlay-put overlay 'mouse-face pressed-face))
(overlay-put overlay 'face face)
(overlay-put overlay 'mouse-face mouse-face))))))
;; When mouse is released over the button, run
;; its action function.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment