Haiku GUI requires window tiling

Window snapping demo:

Also, when pulling to the corners window should occupy a quarter of the screen.
A good example is how it works in Mate Desktop.

To avoid this, it would be possible to add some keyboard key press (Shift?) so that snapping does not work at that time.

Or that snapping with the mouse cursor only works with Shift pressed (this could be made optional).

Possibly better the inverse : moving with Shift ( or Ctrl, Alt or CMD ) pressed snaps to points/things. Moving without those keys presses would just move like a normal window.

3 Likes

Sounds good, but what about programs with fixed size window? They cause frequently an UI glitch or just don’t behave as expected.

1 Like

Yes, moving windows with the keyboard only would be great, too

Such windows could remain fixed in size. It would just stick in the corner or on the side (or in any case only in the corners).

On my “ToDo” list I have a “Write some ‘WindowWrangler’ thingie” item just for that “snap windows to corner/sides” features… too bad I’m too lazy, but also…

This thread reminded me that @zuMi’s winpwnr.sh exists (notice the “-n” parameter in particular). That script was disscussed here: Haiku scripting.

I bet one can use that along with the “Shortcuts” preflet to have something working.

2 Likes

Of course you should be able to enable/disable it

I tried that, but it did not work (probably my fault)

I used that script with the auto discovery function of the focused window by associating different actions via Shortcuts, it works but being a bash script it is obviously slow and not very performing.
the part of the script you mentioned was inspired by “fourways”:
pressing option key + middle mouse button and “drawing” a stroke LibStroke - Free Software Directory
, the app performs various actions on the window below the affected area, such as bottom-up stroke brings the window to full screen, top-down minimizes the window, side-to-side change to the workspace, if you can’t find the sources I should have it somewhere in my disk, also one could add some more strokes, vertical stroke down + horizontal stroke to move and resize the window on the bottom half of the screen, or vertical stroke up + horizontal to move and resize on the upper half of the screen, or horizontal stroke left + vertical stroke to move and scale on the left half of the screen.

there was also a ticworkspacegadget, it applied actions when a window approached an edge/corner (but I couldn’t find sources), and digging through the haiku source code I found an app called Switcher which, I imagine, does a similar thing

1 Like

In the ticket linked in the first reply, I have suggested to add this to the operations already associated with the “windows” key (like Stack and Tile). This has two advantages:

  • It will not be triggered by accident when you just wanted to move a window “normally”
  • It will make it possible to tile a window to the edge of a display even if you have other displays to it’s left/right. On Windows this doesn’t work well because there is no screen “edge” at that place to attach the window to
1 Like

Good day,

I personally think that window tiling would be a great feature to add to stack & tile. Though I’m certain what I’m thinking about is a completely different approach to what others may be thinking. “There are as many ways to cook an egg as people cooking an egg”.

Regards,
RR

Indeed, tiling as implemented in other tiling window managers would perform horrible I reckon. The current approach is nicely complementing a spatial desktop driven environment, which Haiku is based on.

Indeed.
It’s worth pointing out that all changes to Haiku’s window management have to be done very carefully and need to be widely tested. I believe the fact that Haiku’s S&T was conceived and developed with real-world UX-testing by the fine fellows of the Auckland University, is why it’s working so nicely.

1 Like

Windows tiling on screen design details

Screen zones by numbers:

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                   Zone 0                    ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┃                                             ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                             ┃
┃                                             ┃
┃                   Zone 1                    ┃
┃                                             ┃
┃                                             ┃
┠─────────────────────────────────────────────┨
┃                                             ┃
┃                                             ┃
┃                   Zone 2                    ┃
┃                                             ┃
┃                                             ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

┏━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┓
┃                      │                      ┃
┃                      │                      ┃
┃                      │                      ┃
┃                      │                      ┃
┃                      │                      ┃
┃        Zone 3        │       Zone 4         ┃
┃                      │                      ┃
┃                      │                      ┃
┃                      │                      ┃
┃                      │                      ┃
┃                      │                      ┃
┗━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┛

┏━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━┓
┃                      │                      ┃
┃                      │                      ┃
┃        Zone 5        │        Zone 6        ┃
┃                      │                      ┃
┃                      │                      ┃
┠──────────────────────┼──────────────────────┨
┃                      │                      ┃
┃                      │                      ┃
┃        Zone 7        │        Zone 8        ┃
┃                      │                      ┃
┃                      │                      ┃
┗━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━┛

Window tiling should work with Command key and mouse or by keyboard shortcut. (Shift key already in use for sliding window tab.)

When grabbing stacked together windows, they should act as one complex (window).

Full screen (Zone 0) not needed to work for window tilling (there already a ways to do this).

Grouped windows resizing also should work on near borders of two grouped windows with Command key as stacked two borders (can be highlighted or indicated with double cursor for resizing), this is needed for resizing/adjusting some windows tiling, for example:

┏━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━┓
┃                         │                   ┃
┃                         │                   ┃
┃                         │                   ┃
┠─────────────────────────┴──┬────────────────┨
┃                            │                ┃
┃                            │                ┃
┃                            │                ┃
┃                            │                ┃
┃                            │                ┃
┃                            │                ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛

Well, not exactly.

The “zoom” button is supposed to fit windows to their content, not make them use the whole screen. Few apps implement this, and so, filling the whole screen ends up being the default behavior, but it shouldn’t be.

That means “zone 0” may not be a bad idea.

The 8 other zones could be associated with a screen edge or corner (hold the Window key,move the window tab near a border/corner and get some type of highlight of what will happen, like we get for Stack and Tile already in other cases).

But this leaves us without a good space for “Zone 0”. The middle of the display is a possible choice but seems a bit strange. Maybe we can live without it until we find out a way? Or maybe “Zone 1” and “Zone 0” can be the “same” thing and then it depends if there is a window docked to Zone 2 or not.

What I meant was that Zone 0 wouldn’t work with the mouse (snapping to the top like in Windows OS), it’s possible to assign some separate key to this zone (although F11 is already there?).

These zones (1, 2) are especially useful on a vertically oriented monitor. I think it’s good to have a separate Zone 0.

That could work too. Also if any of the 7 or 8 zones are occupied…

Or Zone 0, say, should work with Shift+Command and mouse cursor from any border (and some special keyboard shortcut). This would be useful if you want to expand the window to the entire screen, regardless of whether there are other windows in any zones. Don’t resizable window in this case should stick in the middle of the screen.

Also it be useful if there would be system internal messages to do this windows rearrangement, so it can be pre scripted for some software or some workflow to start automatically.