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

[bug] Fullscreen doesn't work with 2 displays when one of them has Windows scale setup #68

Open
joao-bolsson opened this issue Nov 9, 2020 · 2 comments

Comments

@joao-bolsson
Copy link

Hi! I'm studying your framework and I'm using two displays in Windows platform. I set the scale of one display up to 125% and left the other one normal (100%). When I externalize a dock to another display (125) and keep the root on the other (100), the fullscreen doesn't fill all the available space.

The following code gives me the right scale, in this case: 1.25.

GraphicsDevice device;
double scale =device.getDisplayMode().getWidth() / device.getDefaultConfiguration().getBounds()

I already tried to just multiply the bounds (w and h) by thatscale, but it didn't work, seems to me that have another code working on that as well, but I'm not pretty sure about it.

I'm working on the class DefaultScreenDockFullscreenStrategy. If you have some idea of what could be, please give a return and I can send the fix.

@Benoker
Copy link
Owner

Benoker commented Nov 10, 2020

lol, I did never think of such a configuration.

You are probably stopped by the BoundaryRestriction, which is there to ensure that a window cannot be dragged outside of a screen.

Try disabling the restriction with:
CControl.putProperty(ScreenDockStation.BOUNDARY_RESTRICTION, BoundaryRestriction.FREE)

@joao-bolsson
Copy link
Author

joao-bolsson commented Nov 10, 2020

Thanks for answering, but it didn't work :( haha
The problem with the dimension only happens when the panels are in different displays. If both are in the same display (with scale or not) the fullscreen works fine.

I'll give some more shots in this issue and try to solve, any help is welcome :)

[update]:
case 1: both panels (root and externalized dock) in the same display with 125% of scale
case 2: externalized dock in the display with 125% and root in another display with 100%

from DefaultScreenDockFullscreenStrategy.findBestFullscreenBounds is returned the same Rectangle for both cases, but with case 1 the externalized dock fills all the available space, but in the case 2 doesn't. Looks like the framework is getting some configuration from where the root panel is.

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

2 participants