From 8f5d3bdb980bc958aef4e7387350c6a4b58277f2 Mon Sep 17 00:00:00 2001 From: levovix0 Date: Sun, 7 Aug 2022 11:45:27 +0300 Subject: [PATCH] fix: init --- src/siwin/window.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/siwin/window.nim b/src/siwin/window.nim index 55c2325..4f288db 100644 --- a/src/siwin/window.nim +++ b/src/siwin/window.nim @@ -292,7 +292,9 @@ when defined(linux): result.id = n.cint result.handle = display.ScreenOfDisplay(result.id) - proc defaultScreen*(): Screen = screen(display.DefaultScreen.int) + proc defaultScreen*(): Screen = + x.init() + screen(display.DefaultScreen.int) proc screen*: Screen = defaultScreen() proc n*(a: Screen): int = a.id.int