From 5ed0c88e7877e4baff8d5790d969d7e3f9344d0c Mon Sep 17 00:00:00 2001 From: Robbie Gleichman Date: Sun, 13 Sep 2020 22:22:43 -0700 Subject: [PATCH] Use Gdk.EVENT_STOP instead of True. --- gui/Main.hs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gui/Main.hs b/gui/Main.hs index a9bf426..88869af 100644 --- a/gui/Main.hs +++ b/gui/Main.hs @@ -297,9 +297,8 @@ timeoutCallback inputsRef stateRef gdkWindow device backgroundArea = do modifyIORef' stateRef (updateState inputs . processInputs inputs) modifyIORef' inputsRef (\i -> i {_inEvents = []}) -- Clear the event queue. Gtk.widgetQueueDraw backgroundArea - -- TODO Replace GTK callback return values with constants to avoid - -- boolean blindness. - pure True + -- Use Gdk.EVENT_PROPAGATE to continue propagating the event. + pure Gdk.EVENT_STOP leftClickAction :: IORef Inputs -> @@ -354,7 +353,7 @@ backgroundPress inputsRef stateRef eventButton = do LeftMouseButton -> leftClickAction inputsRef stateRef eventButton _ -> mempty - pure True + pure Gdk.EVENT_STOP startApp :: Gtk.Application -> IO () startApp app = do @@ -391,7 +390,7 @@ startApp app = do #draw ( \context -> renderCairo context (updateBackground backgroundArea stateRef) - >> pure True + >> pure Gdk.EVENT_STOP ) #showAll window