Skip to content

Commit

Permalink
ui: fixed crash on Wayland resizing the pop-ups
Browse files Browse the repository at this point in the history
 - 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)
  • Loading branch information
gustavo-iniguez-goya committed Jan 9, 2023
1 parent a619814 commit e952f73
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion ui/bin/opensnitch-ui
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions ui/opensnitch/dialogs/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e952f73

Please sign in to comment.