From 7182e3530e59b51afee3b057b7f53e2f479cd355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Pollak?= Date: Thu, 29 Mar 2018 14:59:45 -0300 Subject: [PATCH] Xlib: Fallback to first display if app:main_display() doesn't match any --- nw_xlib.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nw_xlib.lua b/nw_xlib.lua index 7649402..5eb3f7e 100644 --- a/nw_xlib.lua +++ b/nw_xlib.lua @@ -992,6 +992,9 @@ function app:main_display() return d end end + + -- if none matched, return the first display available + return self:displays()[1] end function app:active_display()