sandboxie-plus / Sandboxie

Sandboxie Plus & Classic
https://Sandboxie-Plus.com
GNU General Public License v3.0
13.69k stars 1.52k forks source link

Sandboxie Plus main window can be stuck if it is in a maximized state #1169

Closed isaak654 closed 2 years ago

isaak654 commented 3 years ago

Requirement before reproduce it: make sure to have already unchecked the "Always on Top" option on the "View" menu

Steps to reproduce the behavior:

  1. Open Sandboxie Plus and double click on the title bar to enlarge the window as maximized
  2. Go to Options -> Global Settings
  3. Set another language like Nederlands -> press Ok
  4. Exit from Sandboxie Plus and reopen it
  5. Select another language like Deutsch -> press Ok
  6. Exit from Sandboxie Plus and reopen it
  7. Select "Always on Top" on the "View" menu ("Ansicht" -> "Immer oben" in german)
  8. Double click on the main title bar continuosly
  9. You won't be able to resize the window as before and turning off "Always on Top" option won't help.

Workaround:

System details and installed software: Windows 10 Pro 21H1 Tested on Sandboxie Plus 0.9.5, 0.9.6, 1.0.4

hg421 commented 3 years ago

Workaround: Exit from Sbie Plus and remove all [MainWindow] section from Sandboxie-Plus.ini in order to be able to resize the window normally.

is that really necessary? I was able to resize it normally by first dragging it a bit to the side

isaak654 commented 3 years ago

Workaround: Exit from Sbie Plus and remove all [MainWindow] section from Sandboxie-Plus.ini in order to be able to resize the window normally.

is that really necessary? I was able to resize it normally by first dragging it a bit to the side

Effectively this works if you keep the left-click button pressed on the title bar.

DavidXanatos commented 2 years ago

The graphical issue is caused by the difference between the text position rendered on a maximized window (no border) and a normalized window which has the size of being maximized, nothing here to fix for me

isaak654 commented 2 years ago

To be thorough, you also wrote another thing about this issue on Slack:

if qt does not always saved the window state properly and the issue is minimal ther eis no point in manually improving on qt's window satet save/restore routine

After further researches:

This appears something that could be fixed without too much complexity.. I might be wrong, but in the meantime I'm going to reopen this issue fur further confirmation:

Using Qt 5.10.0, I have trouble restoring a window layout on a 3 screen setups. More exactly: I have 3 QMainWindow opened and maximized on 3 different screens (2 of them being child of a "main" one). Then I want to apply another layout, eg. to have the windows maximized on different screens. This fails. Typically, a window won't change screen, despite QWidget::restoreGeometry gets a proper argument.

What I can bring to help on the topic is this: I could solve the problem by calling showNormal() on each window that has to be maximized on a new screen. Calling setWindowState(Qt::WindowNoState) alone is not enough.

I take this opportunity to wish you happy holidays!