From 8f07f2197ebd9c9cbc5dc62f3268a9215bdbd6e8 Mon Sep 17 00:00:00 2001 From: alfrix Date: Wed, 8 Nov 2023 13:36:39 -0300 Subject: [PATCH] Desktop environment users should be out of fullscreen KS is meant to be standalone, running inside a DE can cause unexpected issues, like dialogs without buttons and other issues until those issues are fully resolved, it should not be running Fullscreen inside the desktop environment --- screen.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/screen.py b/screen.py index 65afcc5e..f6cf535e 100755 --- a/screen.py +++ b/screen.py @@ -125,7 +125,11 @@ class KlipperScreen(Gtk.Window): raise RuntimeError("Couldn't get default monitor") self.width = self._config.get_main_config().getint("width", None) self.height = self._config.get_main_config().getint("height", None) - if self.width or self.height: + if 'XDG_CURRENT_DESKTOP' in os.environ: + if not self.width: + self.width = max(int(monitor.get_geometry().width * .5), 480) + if not self.height: + self.height = max(int(monitor.get_geometry().height * .5), 320) self.set_resizable(True) self.windowed = True else: