This pull request introduces the bug https://github.com/godotengine/godot/pull/15565
OS/device including version:
Linux 4.14, Debian buster, XFCE
Issue description:
Fullscreen is working half of the time
We cannot move the windows using the "Alt + mouse" shortcut
Changing the resolution does not work either.
Demo:
Window management is broken on linux:
Not working
I performed a revert of the PR and here is the result:
Working
Changing resolution was never implemented (on any platform, bindings for related functions were removed in 3.0). https://github.com/godotengine/godot/blob/2.1/platform/x11/os_x11.cpp#L666
Demos are not viewable for me ("Non-Image content-type returned").
@bruvzg I updated the issue for the demo. (I wanted to use a image link, but did not work).
Changing resolution was never implemented (on any platform, bindings for related functions were removed in 3.0). https://github.com/godotengine/godot/blob/2.1/platform/x11/os_x11.cpp#L666
I don't know, all I can say that it was working properly before those commits.
Here the piece of code I'm using to update the windows size:
extends Node
onready var viewport = get_viewport()
# GDScript used to replace the Global singleton (cause I want to convert my project to godot 3)
onready var Global = get_node('/root/globals_manager')
signal resolution_update
func update_resolution():
var is_fullscreen = Global.get('fullscreen')
var map_width = Global.get('width')
var map_height = Global.get('height')
var borderless_window = Global.get('borderless_window')
var size = Vector2(map_width, map_height)
# Fix the initialization for dual screen
OS.set_window_fullscreen(not is_fullscreen)
OS.set_window_fullscreen(is_fullscreen)
# Same thing for the borderless windows
OS.set_borderless_window(not borderless_window)
OS.set_borderless_window(borderless_window)
viewport.set_size_override_stretch(true)
if not is_fullscreen:
OS.set_window_size(size)
else:
var map_dimensions = OS.get_screen_size()
Global.set('width', map_dimensions.x)
Global.set('height', map_dimensions.y)
call_deferred('emit_signal', 'resolution_update')
func get_screen_size():
var is_fullscreen = Global.get('fullscreen')
var resolution = OS.get_window_size()
if is_fullscreen:
var screen_index = OS.get_current_screen()
resolution = OS.get_screen_size(screen_index)
return resolution
@akien-mga Reverting #15565 fixes the regression.
I recompiled godot performing a git rebase -i just before.
It remains only the issue with the shape collisions. (it seems to be an issue from January, still working on it).
CC @RandomShaper
Some tests:
Debian GNU/Linux buster/sid (4.14.0-3-amd64), Xfce
Latest 2.1 - fullscreen does not work (I can switch to fullscreen but not back to window), borderless window does not work at all, Alt+Click works.
Latest 2.1 (with e0b2044 and 6a180a6 reverted) - fullscreen works, borderless window does not, Alt+Click works.
Latest master - everything works
Latest 2.1 (with e0b2044 and 6a180a6 reverted) - fullscreen works, borderless window does not, Alt+Click works.
Just revert 6a180a6, you will have the same result. Borderless windows was working back in december. But I have no time today to perform another git bisect.
I don't know, all I can say that it was working properly before those commits.
Here the piece of code I'm using to update the windows size:
Window size change and viewport rendering resolution change (stretch mode) should work, but it's not changing actual screen resolution, viewport is rendered at specified size and the scaled to screen native resolution (aka Borderless fullscreen).
Exclusive fullscreen (with real resolution change) is not implemented (#14542, #2094, #6).
I'm checking this ASAP.
Talking about X11, in 2.1 I think borderless never worked.
I can't guess now why the Alt + click thing has stopped working. But it seems there are contradictory reports on this.
Not being able to switch back from fullscreen is less surprising.
Any other information or report will be appreciated.
@RandomShaper Once the moving window + _fullscreen_ are fixed, I am going to implement the borderless feature. It is not that hard to do (https://stackoverflow.com/questions/1904445/borderless-windows-on-linux).
A PR to fix the fullscreen issue has been submitted.
@xsellier, if the Alt + drag issue is still present, please submit it as a separate report.
@RandomShaper I've just tested it. And everything is working well.
Fixed by #16762.