# HG changeset patch # User sam # Date 1703668476 -25200 # Node ID e5d7e3f6826eec53428033a14f63fd186fd183c3 # Parent 3ba17a9b0c013ea9a5d5cba993e09d9effd4ab08 fix: do not try to change fullscreen if already in correct status diff -r 3ba17a9b0c01 -r e5d7e3f6826e semicongine/engine.nim --- a/semicongine/engine.nim Wed Dec 27 16:08:13 2023 +0700 +++ b/semicongine/engine.nim Wed Dec 27 16:14:36 2023 +0700 @@ -210,5 +210,6 @@ func hideSystemCursor*(engine: Engine) = engine.window.hideSystemCursor() func fullscreen*(engine: Engine): bool = engine.fullscreen proc `fullscreen=`*(engine: var Engine, enable: bool) = - engine.fullscreen = enable - engine.window.fullscreen(engine.fullscreen) + if enable != engine.fullscreen: + engine.fullscreen = enable + engine.window.fullscreen(engine.fullscreen)