mirror of
https://github.com/rgleichman/glance.git
synced 2024-08-16 18:30:36 +03:00
Use Gdk.EVENT_STOP instead of True.
This commit is contained in:
parent
9196bc6224
commit
5ed0c88e78
@ -297,9 +297,8 @@ timeoutCallback inputsRef stateRef gdkWindow device backgroundArea = do
|
|||||||
modifyIORef' stateRef (updateState inputs . processInputs inputs)
|
modifyIORef' stateRef (updateState inputs . processInputs inputs)
|
||||||
modifyIORef' inputsRef (\i -> i {_inEvents = []}) -- Clear the event queue.
|
modifyIORef' inputsRef (\i -> i {_inEvents = []}) -- Clear the event queue.
|
||||||
Gtk.widgetQueueDraw backgroundArea
|
Gtk.widgetQueueDraw backgroundArea
|
||||||
-- TODO Replace GTK callback return values with constants to avoid
|
-- Use Gdk.EVENT_PROPAGATE to continue propagating the event.
|
||||||
-- boolean blindness.
|
pure Gdk.EVENT_STOP
|
||||||
pure True
|
|
||||||
|
|
||||||
leftClickAction ::
|
leftClickAction ::
|
||||||
IORef Inputs ->
|
IORef Inputs ->
|
||||||
@ -354,7 +353,7 @@ backgroundPress inputsRef stateRef eventButton = do
|
|||||||
LeftMouseButton ->
|
LeftMouseButton ->
|
||||||
leftClickAction inputsRef stateRef eventButton
|
leftClickAction inputsRef stateRef eventButton
|
||||||
_ -> mempty
|
_ -> mempty
|
||||||
pure True
|
pure Gdk.EVENT_STOP
|
||||||
|
|
||||||
startApp :: Gtk.Application -> IO ()
|
startApp :: Gtk.Application -> IO ()
|
||||||
startApp app = do
|
startApp app = do
|
||||||
@ -391,7 +390,7 @@ startApp app = do
|
|||||||
#draw
|
#draw
|
||||||
( \context ->
|
( \context ->
|
||||||
renderCairo context (updateBackground backgroundArea stateRef)
|
renderCairo context (updateBackground backgroundArea stateRef)
|
||||||
>> pure True
|
>> pure Gdk.EVENT_STOP
|
||||||
)
|
)
|
||||||
|
|
||||||
#showAll window
|
#showAll window
|
||||||
|
Loading…
Reference in New Issue
Block a user