-
Notifications
You must be signed in to change notification settings - Fork 567
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
Implement 'set_windows_position' #778
Comments
as you mention, this is tied to having some way of querying the connected displays. We could preliminarily do a simple version that only uses the main display. Even for that to be useful, though, we do want some way of querying the platform for the size of the current display. this would require new API in druid-shell. This doesn't need to be crazy; I would add a new Then we would add methods to
In any case: bottom line is yes, we should have this, and that if you're interested in working on it you should feel free! |
What do you mean by this? I'm confused because on Windows you can definitely have half of a window on one monitor and the other half on the other monitor. |
I will concur that X11 (I'm 90% sure Wayland is the same) will also display half the window on one monitor and half on the other |
hmm, noted. |
I just saw a PR related to this, and I would like to add that Wayland does not allow you to set window position. This may changer in the future since this completely blocks wine from working under wayland, but from what I have read wayland maintainers are stubborn about it. See the gtk docs as some kind of proof. |
Function to set/move the window position on the screen.
Theres also the question about multiple displays, and if the window should be restrained within bounds.
Other GUIs I have used in the past usually did not have a restrain option, so it was up to the programmers using the GUI to implement their own if they wanted it.
We could potentionally have a set_windows_position_restrained(), that would keep the window within the display/displays if values would exceed them. In other word prevent the window from being drawn outside any visible space.
Multiple displays are a bigger problem tho as it might differ between operating system and display modes.
If lets say I have 2 fhd monitors(1920*1080)*2 and I call the function with 1921, Should the window then be drawn on the second monitor? This might be problematic if the resolution is different tho.
Maybe the best option here would be functions 'get_displays' 'set_window_display' and display.get_resolution'
The text was updated successfully, but these errors were encountered: