glazewm icon indicating copy to clipboard operation
glazewm copied to clipboard

Improve handing of maximized/full-screen windows

Open nascentt opened this issue 2 years ago • 1 comments

This isn't as disruptive as the minimised window issue, as that was bringing up already hidden windows and leading to the user having to fight the program to get them minimized again.

This is more a usability / quality of life suggestion.

To me there's two different things that I'll disambiguate. Full screen, is a window with no maximize/restore button and takes the entity of the screen (so you can't view the taskbar or anything). This is mostly multimedia.

The other is maximised windows, windows that can be maximised/minimize/restored that have had the maximize button used.

I think anyone would agree full screen windows should be ignored and left to be fullscreen. Currently they're mostly fine. The program sometimes trims the very edge of the screen after tiling some other windows. But the screen still stays roughly the same size so it's not a huge issue.

Regarding maximised windows, currently windows can be moved around, resized and maximized without issue, and the program doesn't do anything to prevent that until another windows is opened and it starts to tile things.
I like this behavior as it means you get to temporarily use a window differently whilst you look at it for a minute, and glazewm doesnt immediately fight it. Which is good to me.

However, I propose that maybe it'd be good for glazwm to just ignore maximized windows by default? Or resize that maximized window into the only window on that workspace? That way the ability to maximize is less a temporary thing that works as a consequence of the program not catching it yet, and more an expected possibility.

Whether behaviour like this is even possible or not I'm unsure. Is it possible mean pull the window state of a window before touching it?

Obviously ignoring certain classes or processes is possible and I do that for RDP and can probably do it for things like VLC video playback window classes. But maximized file explorer/chrome etc being turned into a full-size workspace screen isn't something possible by window rules.

Anyway feel free to mark this low priority or close it if. But figured I'd put in a suggestion to float the ideas I had. The only actual issues with full screen is video playback and RDP that I've noticed so far, which are somewhat fixable with window rules.

I definitely like having the maximize button rather than have it removed entirely like I've seen with Linux tiling window managers. So keeping maximizing ability is preferred even if it's just leaving temporarily until the next new window triggers the tiling process

nascentt avatar May 06 '22 13:05 nascentt

Fully agree that the way that full-screen and maximized windows are handled right now isn't ideal. Currently full-screen windows are initialized as floating, and maximized windows, like you mentioned, are simply not handled until a redraw is triggered.

There isn't a concrete plan for this stuff yet. i3wm has a way of handling full-screen windows and it'd probably make sense to replicate that functionality as closely as possible. Maximized windows could likely be handled in a very similar way. As far as I'm aware, it should be possible to do this; it's just a pretty massive feature.

Will need to eventually spec out how exactly these windows should behave. Wrote up some questions for when planning out the feature.

  • What happens when a new window is opened and a full-screen/max window has focus? Which window gains focus?
  • What happens when a full-screen/max window is moved directionally or via workspace move command? What if the monitors have different sizes?
  • What happens when a window is moved directionally or via workspace move command to the workspace with a full-screen/max window? Does the moved window retain focus?
  • How should the toggle focus command behave when a full-screen/max window has focus? What if there's only tiling, only floating windows, or a combination of tiling/floating windows in the same workspace?
  • How should the toggle floating command behave when a full-screen/max window has focus?

lars-berger avatar May 11 '22 22:05 lars-berger