Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In multimonitor setup, only displays on primary monitor #1

Open
dperelman opened this issue Jul 15, 2023 · 0 comments
Open

In multimonitor setup, only displays on primary monitor #1

dperelman opened this issue Jul 15, 2023 · 0 comments

Comments

@dperelman
Copy link

Thanks for the port to SDL2. I was very confused by the old version suddenly breaking after running upgrades.

I have a multi-monitor set-up and this version only displays on the primary monitor. I added some debugging statements so I can see Xscreensaver is still running an instance for each of my monitors, but it's only visible on the primary monitor. If I comment out the line calling SDL_SetWindowFullscreen(), then it does show the clock on every monitor... except at the wrong size: it's small in the bottom-left corner on my secondary monitor and it changes my primary monitor resolution to 640x480.

Playing around, I accidentally fixed this issue by adding the line

SDL_SetWindowPosition(window, window_x, window_y);

where above with the logic that gets the width and height, I added:

window_x = windowAttributes.x;
window_y = windowAttributes.y;

Not sure if there's a cleaner way to handle this or why moving the window to the position it was already in did anything.

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

No branches or pull requests

1 participant