From e952f73e186989bf2691b71297c48451dfb17db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20I=C3=B1iguez=20Goia?= Date: Tue, 10 Jan 2023 00:32:01 +0100 Subject: [PATCH] ui: fixed crash on Wayland resizing the pop-ups - Fixed crash on Wayland (Fedora 37) when setting the minimum and maximum size of a pop-up. setMinimumSize() makes crash the GUI. - With the above fix, we don't need to set QT_QPA_PLATFORM (Closes: #794) --- ui/bin/opensnitch-ui | 1 - ui/opensnitch/dialogs/prompt.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/bin/opensnitch-ui b/ui/bin/opensnitch-ui index 61d70c41ae..1a46c4087c 100755 --- a/ui/bin/opensnitch-ui +++ b/ui/bin/opensnitch-ui @@ -69,7 +69,6 @@ Examples: import faulthandler faulthandler.enable() - os.environ["QT_QPA_PLATFORM"] = "xcb" os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1" if supported_qt_version(5,6,0): try: diff --git a/ui/opensnitch/dialogs/prompt.py b/ui/opensnitch/dialogs/prompt.py index 8644862116..73e67e4f3c 100644 --- a/ui/opensnitch/dialogs/prompt.py +++ b/ui/opensnitch/dialogs/prompt.py @@ -152,8 +152,7 @@ def adjust_size(self): self._width = self.width() self._height = self.height() - self.setMinimumSize(self._width, self._height) - self.setMaximumSize(self._width, self._height) + self.resize(QtCore.QSize(self._width, self._height)) def move_popup(self): popup_pos = self._cfg.getInt(self._cfg.DEFAULT_POPUP_POSITION)