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
This commit is contained in:
alfrix 2023-11-08 13:36:39 -03:00
parent 51d21895d0
commit 8f07f2197e

View File

@ -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: