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)
This commit is contained in:
Gustavo Iñiguez Goia 2023-01-10 00:32:01 +01:00
parent a619814ea7
commit e952f73e18
Failed to generate hash of commit
2 changed files with 1 additions and 3 deletions

View file

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

View file

@ -152,8 +152,7 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
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)