godot
godot copied to clipboard
Can't rename any node with Godot 4 Beta15 under KDE Plasma Wayland session
Godot version
v4.0.beta15.official [4fa6edc88] and v4.0.beta.custom_build [1bf7b84fb]
System information
openSUSE Tumbleweed 20230125, KDE Plasma 5.26.5, Wayland session
Issue description
https://user-images.githubusercontent.com/110809639/214688115-ce2c8f95-3849-4ee5-b6be-f8e58dbd8036.mp4
It's not possible to rename any node while using wayland session under my linux distro. Using Godot 4 beta15. Tried changing keyboard layout and same result. If I swith to X11 session then it works. Also beta14 doesn't have this problem with wayland session.
Steps to reproduce
Literally try to rename any node under wayland session with beta15
Minimal reproduction project
n/a
Related to https://github.com/godotengine/godot/issues/72012 (fixed in the latest master
branch).
Can you test this on the latest master
branch? See Compiling on Linux.
I test this on the master. #72012 is fixed, but I still cannot rename any node.
Related to #72012 (fixed in the latest
master
branch).Can you test this on the latest
master
branch? See Compiling on Linux.
As suggested I compiled the engine from master[cc7aa72f01fdea5f93b0a618fcd12db55617beb0] but still can't rename any node under wayland session.
Is it only an issue with popups (e.g., rename / inspector properties), or with any input controls (e.g., script editor)?
Is it only an issue with popups (e.g., rename / inspector properties), or with any input controls (e.g., script editor)?
Script editor works, I can type in it. As for the node if i try with F2 shortcut for renaming or selecting it with right click and do rename on popup it selects the node but won't work. It completely ignores any input from keyboard. Can't delete the or rename the node's name. Edit: I forgot to mention that the mouse actions which are invoked by right clicking on the node such as cut,copy, paste, select all, clear, undo, and redo do work. Keyboard input doesn't do anything..
I was not able to reproduce it with Gnome /Wayland session on PopOS 22.04.
I test this on the master. #72012 is fixed, but I still cannot rename any node.
May I ask what distro and what desktop environment do you use? (what did you use for test?)
I was not able to reproduce it with Gnome /Wayland session on PopOS 22.04.
Interesting. I'm currently using KDE Plasma with openSUSE. I will also try to see if the issue can be reproduced on Gnome/Wayland session with openSUSE.
May I ask what distro and what desktop environment do you use? (what did you use for test?)
I also use KDE Plasma on Ubuntu 22.04
It seems that the issue can't be reproduced on Gnome/Wayland with openSUSE. So this is a KDE Plasma/Wayland specific issue?
I'm using v4.0.beta16.mono.official [518b9e580] but it still happen, I'm using Arch on KDE Wayland and it still don't work
After compiling the engine multiple times I think I might have found the commit where this issue started appearing. It's daad4aed62bfa471421f960179f0ac0fd78e8040. Hope this is an useful information.
I also am having a similar issue. I find that trying to rename a node (KDE Arch Wayland Session) doesn't work, and locks up various input until a random amount of time/interactions have passed. Usually by randomly clicking nodes my camera controls work again. Never seems to break left click selecting, but breaks mmb and typing.
Losing focus and regaining focus on the main window seems to reliably fix the lockout.
So actually, the typable editor window is appearing sort of behind the main godot window. If you shrink godot and move it, you can finish the input. Kooha-2023-01-28-12-47-22.webm
CC @bruvzg
I am no expert with godot's source code, today is the first time looking at it, but I'll share incase it helps a more familar dev find the issue faster.
It looks like the sub-window/popup created with the text editor is not receiving focus when it is created. Key events aren't even logged if keys are pressed after double clicking.
Commenting out the following line in display_server_x11.cpp causes it to work correctly on my machine
valuemask |= CWOverrideRedirect | CWSaveUnder;
But I do not think this is necessarily the correct solution as it also makes the input flash black for a second.
I think some of the new checks in the various events checking if it is an input window added in the mentioned commit may just be preventing the window from getting focused correctly.
Once you hit that point, it may come down to differences in behaviors of individual WM at that point (mutter vs kwin for example) as to if the new window is focused since it isn't being explicitly made to focus? Not sure, just my current hypothesis.
I will also comment, that window_set_ime_active is being called repeatedly from the NOTIFICATION_DRAW event of the line_edit.cpp