Skip to content

Fullscreen spans all monitors when capturing All Displays - #289

Open
ozy24 wants to merge 2 commits into
mausimus:masterfrom
ozy24:feature/all-desktops-fullscreen
Open

Fullscreen spans all monitors when capturing All Displays#289
ozy24 wants to merge 2 commits into
mausimus:masterfrom
ozy24:feature/all-desktops-fullscreen

Conversation

@ozy24

@ozy24 ozy24 commented May 25, 2026

Copy link
Copy Markdown

Summary

Makes Fullscreen (Ctrl+Shift+G) span the entire virtual desktop (all monitors) when capturing All Displays, instead of only the nearest monitor.

Motivation

ShaderGlass already captures every connected monitor via the existing "All Displays" input (NULL HMONITOR), and applies the correct virtual-screen offset for Glass alignment. The only gap was Fullscreen: ToggleBorderless used MonitorFromWindow and so only ever covered one monitor, leaving no way to span the overlay across all displays.

What changed

  • ToggleBorderless — when "All Displays" is the active capture (capture API, no window, NULL monitor, not image/device), sizes the borderless window to SM_XVIRTUALSCREEN / SM_YVIRTUALSCREEN / SM_CXVIRTUALSCREEN / SM_CYVIRTUALSCREEN. All other capture modes are unchanged (still nearest monitor).
  • SaveProfile — persists the "All Displays" selection by writing CaptureDesktop "All Displays" for the NULL-monitor case. LoadProfile already matches that name, so the selection (and its menu checkmark) is restored on load instead of falling through to nothing selected. Only applies on Win10 2004+/Win11 where the NULL-monitor entry exists; never for image/device/window captures.
  • MANUAL.html — one-line note documenting the behaviour.

How to use

  1. Input → Desktop → All Displays
  2. Start capture (Glass mode)
  3. Fullscreen / Ctrl+Shift+G to span all monitors

Single-monitor, window, and file capture behaviour is unchanged.

@mausimus

Copy link
Copy Markdown
Owner

Interesting, I guess it doesn't say that in Microsoft's docs so AI couldn't know but you can pass NULL HMONITOR and that will capture all desktops (it's already what ShaderGlass defaults to). So to handle multi-monitor output all that's needed is to make the window span all screens (you can kinda resize it manually even now but can't make fully borderless).

@ozy24
ozy24 force-pushed the feature/all-desktops-fullscreen branch from 371abd8 to 3c0abf5 Compare June 17, 2026 11:46
@ozy24 ozy24 changed the title Add All Desktops multi-monitor capture and virtual fullscreen span Fullscreen spans all monitors when capturing All Displays Jun 17, 2026
@ozy24

ozy24 commented Jun 17, 2026

Copy link
Copy Markdown
Author

Thanks for the feedback @mausimus!

Reworked as you suggested. Dropped the multi-monitor compositor - "All Displays" (NULL HMONITOR) already captures every screen and ShaderGlass::Initialize already applies the virtual-screen offset, so the only change needed was making Fullscreen span all monitors.

Now a single commit: when "All Displays" is active, ToggleBorderless sizes to SM_X/Y/CX/CYVIRTUALSCREEN; otherwise unchanged. Down to ShaderWindow.cpp + a one-line MANUAL.html note. Builds clean on Release|x64.

The previous approach added a custom multi-monitor compositor, but capturing
all desktops already works in ShaderGlass via a NULL HMONITOR ("All Displays").
The only missing piece was making the borderless/Fullscreen window span the
whole virtual desktop instead of just the nearest monitor, which this does.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ozy24
ozy24 force-pushed the feature/all-desktops-fullscreen branch 2 times, most recently from 3c0abf5 to 68a9891 Compare June 17, 2026 12:17
@mausimus

Copy link
Copy Markdown
Owner

Ok I tried it and it does work, some people have indeed asked for this feature. The issues I have are:

  • it should not be the default; with multi monitor setups I think you normally fullscreen something on one monitor and want to ShaderGlass fullscreen on top of just that; most shaders are also built for single display (bezels etc.)
  • this feature should be for advanced users only hidden behind a checkbox in the Output menu "Fullscreen on All Displays" (placed after the existing Fullscreen menu item); only if someone ticks it then they would get new behavior when entering fullscreen

@ozy24

ozy24 commented Jun 24, 2026

Copy link
Copy Markdown
Author

Hello, yes, that makes sense. My use case is slightly different from most Shaderglass users, as I use particular shaders to reduce eye strain, where multi-display spanning makes more sense. I'll get the PR updated accordingly.

Add an Output menu checkbox so multi-monitor fullscreen is opt-in and only applies when All Displays capture is active, keeping single-monitor fullscreen as the default.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ozy24

ozy24 commented Jul 12, 2026

Copy link
Copy Markdown
Author

Hello,

I've updated the PR.

What changed

  • Fullscreen no longer spans all monitors by default. The default behavior is unchanged: fullscreen still covers only the monitor nearest the ShaderGlass window.
  • Added an opt-in checkbox in the Output menu: Fullscreen on All Displays, placed directly after Fullscreen.
  • The checkbox is off by default and is persisted in settings, so it stays as you left it across restarts.
  • When the checkbox is ticked and you enter fullscreen, ShaderGlass spans the entire virtual desktop — but only if All Displays is also selected as the desktop input. That way every monitor has actual captured content; otherwise the extra monitors would just show black.
  • With any other input (single monitor, window, file, etc.), fullscreen still covers a single monitor, even if the checkbox is ticked.

How to use it

Input → Desktop → All Displays
Output → tick Fullscreen on All Displays
Fullscreen (Ctrl+Shift+G)
To stick after restart, save as default profile while All Displays is selected.

Happy to adjust anything if you'd like it handled differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants