bbidulock / icewm

A window manager designed for speed, usability, and consistency
Other
597 stars 99 forks source link

Unmaximizing a window doesn't work if previous size is the same #769

Closed marcuscf closed 8 months ago

marcuscf commented 8 months ago

If you close a window when it's maximized, some apps will remember that state and will reopen as a maximized window too.

The issue is that now the unmaximize button does nothing. If your theme has different states for the maximized button, you can see it really changes state but the window size doesn't change. If you really want to unmaximize that window now you have to ensure it's in the "unmaximized state" first then resize it manually, probably by using Alt + Right mouse button because the borders are almost impossible to reach in this state, or by moving the window first then resizing it by its border.

Tested with Mousepad (text editor) and Thunar on Debian (icewm 3.3.1) and Geany and zzzFM on antiX Linux (icewm 3.4.6).

It would be nice if IceWM could detect that both window sizes are too similar to each other just shrink the window to whatever size it thinks would look good (e.g. ½ screen width and ½ screen height) so at least we could see the unmaximize button is working and we can now grab the window edges easily. This could also apply to windows that somehow try to get bigger when unmaximizing (not sure it really happens but it might happen in multi-monitor setups when they're not all the same size).

gijsbers commented 8 months ago

Solutions:

  1. use a winoption to configure an initial application window geometry.
  2. define a hotkey that uses icesh to set a 50% dimension to the currently focused window.
  3. use a script to start those apps that uses a -geometry option or use icewmhint.
  4. talk to the developer of those applications about this. It is their lazy thinking and incomplete implementation of the EWMH specification that creates this situation. If they would properly understand the maximized state they would only save the unmaximized state together with a maximized flag and thus properly restore the last state.
marcuscf commented 8 months ago
4. talk to the developer of those applications about this. It is their lazy thinking and incomplete implementation of the EWMH specification that creates this situation. If they would properly understand the maximized state they would only save the unmaximized state together with a maximized flag and thus properly restore the last state.

Sorry I wasn't aware it was entirely the application's fault. I guessed it was somehow related to each application but I assumed they couldn't save size + maximization state and that most of the work would be on the window manager side.

I guess the developers didn't fully understand what they were supposed to save there and just saved redundant information (maximized size and maximization state = true) "just to be safe". Then it worked fine when they tested on other environments and called it done. And caused this mess. :-)

gijsbers commented 8 months ago

Right. Therefore it is desirable that users report problems to the application developers and not to the WM.