UI Button to help recover "rogue" Overlay windows


Draggable UI elements seem to get lost offscreen a lot, especially when switching between Desktop/HMD, different monitors, etc.

At the last meetup others mentioned this was a problem for them too, so I put together a prototype that attempts to automatically detect and fetch rogue windows back into the visible viewport:

Client Script: Ctrl+Shift+o recollectOverlays.js


Source Gist: https://gist.github.com/humbletim/1faf22eb6822b840553be7160c5eaf1f

Experimental Bindings:

  • Ctrl+F1 – toggles Recollector Overlay on/off
  • Display > Recollector – menu option for same thing

// message port listener – eg: for triggering from controller bindings
‘recollectOverlays’, // channel
8, // message (+8px viewport margins)
true // localOnly (don’t transmit over the network)

The current prototype treats all windows as equals and screen real estate as a unit whole, but finger-grain logic could probably be made to work in this approach too.

Has anyone thought about what a "profiles based" interface might look like in context?

Something like Blender's [Screens dropdown](https://www.blender.org/manual/interface/editors/screens.html) maybe?
<img src="/uploads/highfidelity/original/2X/b/b7b2ae02c2b7f4c4550f44b78254ce4ea94105c5.jpg" width="206" height="223">


I think the offscreen problem get worse. When the screen resolution between desktop and HMD is bigger.

A problem that i have seen is that UI elements not stay on the same place

A docking function to to bottom and side etc. would help to keep the bars on the place you want. except brs are still not smart enough to move icons from horizontal to vertical order when moved to the right side etc. etc.


Ever back-up and restore your .ini file as a way to keep overlay window positions in check? That only seems to work for certain ones, but does return them to exact previous positions.

I’ve also been thinking about ways to automatically capture overlay positions into a local SQLite3 database (something that seems doable using just built-in QML features and could provide a kind of “infinite undo” space – for returning to past layouts that worked well).

Have you seen that kind of “smart docking” or responsive drag/drop behavior on websites online? (I know I have, but can’t remember any great examples off-hand).

Basically there are a bunch of modern, open source JS drag n’ drop libraries that implement those kinds of gravity and responsive layout strategies.

I bet one could be ported over to HiFi or QML scripting – and then adapted into positioning Overlay*Windows instead of absolutely-position DIVs (from a rectangular standpoint, basically the same things already).