gtk: fix button enable when mouse is over button
This commit is contained in:
parent
fdede6f063
commit
49903be78f
|
@ -300,11 +300,12 @@
|
|||
(if crossing?
|
||||
(GdkEventCrossing-type event)
|
||||
(GdkEventButton-type event)))])
|
||||
(unless (or (= type GDK_2BUTTON_PRESS)
|
||||
(= type GDK_3BUTTON_PRESS))
|
||||
(let ([wx (gtk->wx gtk)])
|
||||
(and
|
||||
wx
|
||||
(if (or (= type GDK_2BUTTON_PRESS)
|
||||
(= type GDK_3BUTTON_PRESS))
|
||||
#t
|
||||
(let* ([modifiers (if motion?
|
||||
(GdkEventMotion-state event)
|
||||
(if crossing?
|
||||
|
@ -365,7 +366,16 @@
|
|||
(constrained-reply (send wx get-eventspace)
|
||||
(lambda () (or (send wx dispatch-on-event m #t)
|
||||
(send wx internal-pre-on-event gtk m)))
|
||||
#t))))))))
|
||||
#t
|
||||
#:fail-result
|
||||
;; an enter event is synthesized when a button is
|
||||
;; enabled and the mouse is over the button, and the
|
||||
;; event is not dispatched via the eventspace; leave
|
||||
;; events are perhaps similarly synthesized, so allow
|
||||
;; them, too
|
||||
(if (or (eq? type 'enter) (eq? type 'leave))
|
||||
#f
|
||||
#t)))))))))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user