godot icon indicating copy to clipboard operation
godot copied to clipboard

Can't rename any node with Godot 4 Beta15 under KDE Plasma Wayland session

Open dark-elf1 opened this issue 2 years ago • 17 comments

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

dark-elf1 avatar Jan 25 '23 21:01 dark-elf1

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.

Calinou avatar Jan 26 '23 10:01 Calinou

I test this on the master. #72012 is fixed, but I still cannot rename any node.

beicause avatar Jan 26 '23 11:01 beicause

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.

dark-elf1 avatar Jan 26 '23 13:01 dark-elf1

Is it only an issue with popups (e.g., rename / inspector properties), or with any input controls (e.g., script editor)?

bruvzg avatar Jan 26 '23 15:01 bruvzg

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..

dark-elf1 avatar Jan 26 '23 15:01 dark-elf1

I was not able to reproduce it with Gnome /Wayland session on PopOS 22.04.

bruvzg avatar Jan 27 '23 07:01 bruvzg

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.

dark-elf1 avatar Jan 27 '23 14:01 dark-elf1

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

beicause avatar Jan 27 '23 15:01 beicause

It seems that the issue can't be reproduced on Gnome/Wayland with openSUSE. So this is a KDE Plasma/Wayland specific issue?

dark-elf1 avatar Jan 27 '23 17:01 dark-elf1

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

zephyroths avatar Jan 28 '23 12:01 zephyroths

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.

dark-elf1 avatar Jan 28 '23 17:01 dark-elf1

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.

Logical-sh avatar Jan 28 '23 18:01 Logical-sh

Losing focus and regaining focus on the main window seems to reliably fix the lockout.

Logical-sh avatar Jan 28 '23 18:01 Logical-sh

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

Logical-sh avatar Jan 28 '23 18:01 Logical-sh

CC @bruvzg

clayjohn avatar Jan 28 '23 19:01 clayjohn

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.

Logical-sh avatar Jan 28 '23 21:01 Logical-sh

I will also comment, that window_set_ime_active is being called repeatedly from the NOTIFICATION_DRAW event of the line_edit.cpp

Logical-sh avatar Jan 28 '23 22:01 Logical-sh