summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/impure/graphics.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/impure/graphics.nim b/lib/impure/graphics.nim
index b3bc578d0..0ec2d3903 100755
--- a/lib/impure/graphics.nim
+++ b/lib/impure/graphics.nim
@@ -487,7 +487,8 @@ proc fillSurface*(sur: PSurface, color: TColor) =
   if sdl.FillRect(sur.s, nil, sur.createSdlColor(color)) == -1:
     raiseEGraphics()
 
-template withEvents*(surf: PSurface, event: expr, actions: stmt): stmt =
+template withEvents*(surf: PSurface, event: expr, actions: stmt): stmt {.
+  immediate.} =
   ## Simple template which creates an event loop. ``Event`` is the name of the
   ## variable containing the TEvent object.
   while True: