summary refs log tree commit diff stats
path: root/examples/x11ex.nim
diff options
context:
space:
mode:
Diffstat (limited to 'examples/x11ex.nim')
-rwxr-xr-xexamples/x11ex.nim12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/x11ex.nim b/examples/x11ex.nim
index db51df2e0..6c63d0a01 100755
--- a/examples/x11ex.nim
+++ b/examples/x11ex.nim
@@ -5,7 +5,7 @@ const
   WINDOW_HEIGHT = 300
   
 var
-  width, height: int
+  width, height: cuint
   display: PDisplay
   screen: cint
   depth: int
@@ -29,10 +29,10 @@ proc create_window =
                             XBlackPixel(display, screen),
                             XWhitePixel(display, screen))
   size_hints.flags = PSize or PMinSize or PMaxSize
-  size_hints.min_width =  width
-  size_hints.max_width =  width
-  size_hints.min_height = height
-  size_hints.max_height = height
+  size_hints.min_width =  width.cint
+  size_hints.max_width =  width.cint
+  size_hints.min_height = height.cint
+  size_hints.max_height = height.cint
   discard XSetStandardProperties(display, win, "Simple Window", "window",
                          0, nil, 0, addr(size_hints))
   discard XSelectInput(display, win, ButtonPressMask or KeyPressMask or 
@@ -51,7 +51,7 @@ proc process_event =
   case int(xev.theType)
   of KeyPress:
     key = XLookupKeysym(cast[ptr TXKeyEvent](addr(xev)), 0)
-    if key != 0:
+    if key.int != 0:
       echo("keyboard event")
   of ButtonPressMask, PointerMotionMask:
     Echo("Mouse event")