tetra icon indicating copy to clipboard operation
tetra copied to clipboard

If window size is bigger than screen resolution, window cannot be moved

Open fossegutten opened this issue 5 years ago • 8 comments

If i use really big resolution like 10000 by 10000, the window isn't even visible, because of negative position. This could be prevented by preventing window position being less than 0,0

fossegutten avatar Dec 14 '19 19:12 fossegutten

Ah, yeah, the window is currently always centered when the game opens - I wouldn't really consider this a bug, as this is the behaviour I'd expect based on the code as it stands, but it might be something we want to change in the future.

17cupsofcoffee avatar Dec 14 '19 20:12 17cupsofcoffee

I think it is a bug, because if you cant even see the window if it is too big, and it's not centered. Window size should probably be clamped to the size of the monitor at creation?

fossegutten avatar Dec 15 '19 12:12 fossegutten

When you say that you can't see the window, do you mean that the entire window goes invisible, or just that you can't see the window's frame?

17cupsofcoffee avatar Dec 15 '19 14:12 17cupsofcoffee

the Whole window

fossegutten avatar Dec 15 '19 14:12 fossegutten

Huh 🤔 I wasn't able to replicate that on my machine, hence the misunderstanding - when I made the window bigger than my screen resolution, the window just appears bigger than the screen (almost as if it's in fullscreen but zoomed in).

17cupsofcoffee avatar Dec 15 '19 14:12 17cupsofcoffee

Marking this as 'could not replicate' for now, as I can't find a way to trigger the bug on my machine. My hunch is that this is an issue in SDL2, as I pretty much just pass the window size straight through to it.

17cupsofcoffee avatar Dec 17 '19 13:12 17cupsofcoffee

Try to enable some windows scaling above 100%, you might be able to replicate it then. I causes lots of problems for me.

fossegutten avatar Dec 18 '19 18:12 fossegutten

Ooh, yeah, hadn't considered it might be due to DPI issues. I'll have a play around with that when I get the chance 👍

17cupsofcoffee avatar Dec 18 '19 20:12 17cupsofcoffee