Fix not starting on Wayland

fix #829
This commit is contained in:
northcoastam authored and GitHub committed 2022-12-03 15:51:02 -03:00
1 parent 34a9151910
commit fcb6861119
1 file changed
+2
+2
View File
@@ -107,6 +107,8 @@ class KlipperScreen(Gtk.Window):
self.connect("key-press-event", self._key_press_event)
monitor = Gdk.Display.get_default().get_primary_monitor()
if monitor is None:
monitor = Gdk.Display.get_default().get_monitor(0)
if monitor is None:
raise RuntimeError("Couldn't get default monitor")
self.width = self._config.get_main_config().getint("width", monitor.get_geometry().width)