19 ms·
Same issue — I never found a way around the clamp. I park the window's top-left at (maxX - 1, maxY - 1) of the union of all displays' CGDisplayBounds, i.e. just
by dbm5 2mo ago
Same issue — I never found a way around the clamp. I park the window's top-left at (maxX - 1, maxY - 1) of the union of all displays' CGDisplayBounds, i.e. just inside the bottom-right corner of the whole arrangement. The clamp is much looser going off the bottom/right than up/left — pushing to something like (-30000, -30000) gets snapped back near the top-left and leaves a full-height sliver, whereas bottom-right leaves just the corner pixel (plus its shadow, which I also haven't beaten).
Since the target is derived from the union, a display disconnect or resolution change shrinks the desktop and the parked window pops back into view. I listen for display-config changes and re-apply the position.
- mortenjorck 2mo agoThanks for the corroboration. Something that apparently might be possible is using the private framework for Spaces to offload windows to a "holding Space"; I haven't tried it because it felt just a little too hacky for something I'm ideally hoping to turn into a commercial product, but it might be worth investigating depending on your use case.
- dbm5 2mo agoNot sure if it is worth it for your use case, but I was successful in creating a virtual display - second screen - and putting the window there. That did work. I was trying to get kb input and mouse clicks to work, but then realized that that was even more useless than spinning a window to begin with (lol) so backed out all that effort for this much simpler implementation. EDIT: private APIs — CGVirtualDisplay / CGVirtualDisplayDescriptor / │ CGVirtualDisplayMode (the same ones BetterDisplay uses)
- mortenjorck 2mo agoOh, that's pretty clever! Create a dummy display that never actually renders anywhere and use it as the holding area for "temporarily hidden" windows. Does the dummy display have to live within the desktop geometry (as in the user could accidentally move the cursor off one edge onto it) or can it be totally isolated?
- 1bpp 2mo agoDid you write this or have Claude do it? You've never used an em dash in your comment history and this doesn't sound human. Are you trying to use it for translation?
- dbm5 2mo agoI use em dashes all the time. That was not claude.