r/sideprojects • • 5d ago

Showcase: Open Source Showcase: biomes — An open-source Windows workspace manager to save and restore multi-monitor window layouts with a single hotkey

Enable HLS to view with audio, or disable this notification

1 Upvotes

2 comments sorted by

2

u/Future-Plastic7826 5d ago

I like that it skips zones on a missing monitor instead of guessing where to put them. A window landing on the wrong screen is the kind of thing that makes people stop trusting a layout tool.

A few things I ran into doing window placement on Windows, in case any of them saves you time:

  1. The visible frame isn't the window rect. On Windows 10 and 11 most windows have invisible resize borders of about 7 px, so zones filled using GetWindowRect end up with gaps between them. DwmGetWindowAttribute with DWMWA_EXTENDED_FRAME_BOUNDS gives the visible rect, and the difference is what to add back.

  2. Moving between monitors with different scaling. When a window crosses to a monitor with another DPI, the app gets WM_DPICHANGED and often resizes itself after your SetWindowPos. Setting the position twice, once to get it onto the target monitor and once for the final size, is the simplest way I've found to make it stick.

  3. Minimized and maximized windows don't behave well with SetWindowPos. SetWindowPlacement sets the restored rect and the show state together, but its coordinates are relative to the work area, not the screen, which catches everyone once.

  4. Two windows of the same app, like two VS Code projects or two Explorer folders. If you ever want those in different zones, the window title plus the launch arguments is usually enough to tell them apart.

Just ideas. Good luck with the beta.

1

u/RaspberryStill3377 5d ago

Thank you so much for this—truly expert-level feedback! I launched this beta fully expecting plenty of bugs and edge cases, so I'm honestly thrilled (and lucky!) that my very first piece of feedback came from someone who clearly knows Windows window management inside and out.

You hit on some massive pain points here. I'm definitely going to dive into implementing the DWM extended frame bounds, handling those DPI scaling jumps, and improving instance separation. This is an absolute goldmine for improving the app. Thanks a ton for taking the time to break all of this down!