Skip to content

Commit ee64449

Browse files
committed
examples/EventWatch: Show mouse events too
1 parent 621ebf6 commit ee64449

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/EventWatch.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ appLoop = waitEvent >>= go
5454
KeyboardEvent keyboardEvent
5555
| keyboardEventKeyMotion keyboardEvent == Pressed
5656
-> print (keyboardEventKeysym keyboardEvent) >> waitEvent >>= go
57+
MouseMotionEvent mouseMotionEvent
58+
-> print mouseMotionEvent >> waitEvent >>= go
59+
MouseButtonEvent mouseButtonEvent
60+
-> print mouseButtonEvent >> waitEvent >>= go
61+
MouseWheelEvent mouseWheelEvent
62+
-> print mouseWheelEvent >> waitEvent >>= go
5763
QuitEvent
5864
-> return ()
5965
_ -> waitEvent >>= go

0 commit comments

Comments
 (0)