godot icon indicating copy to clipboard operation
godot copied to clipboard

Eyedropper color picker not working with XWayland

Open TuTiuTe opened this issue 2 years ago • 2 comments

Tested versions

  • This bug is doable on every version since at least 4.0 as long as you're on wayland linux
  • Tested on Fedora, Arch, Debian, multiple different computers too

System information

Godot v4.2.1.stable - Fedora Linux 39 (Workstation Edition) - Wayland - Vulkan (Forward+) - integrated Intel(R) UHD Graphics 620 (WHL GT2) () - Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz (8 Threads)

Issue description

When trying to chose a color with the eyedropper, it immediately goes black and starts pumping out error messages

platform/linuxbsd/x11/display_server_x11.cpp:1108 - Unhandled XServer error: BadMatch (invalid parameter attributes) Major opcode of failed request: 73 Serial number of failed request: 0 Current serial number in output stream: 41303

I am not knowledgeable enough to know if this is a Xwayland or a Godot problem

Steps to reproduce

Try to chose a color with the eyedropper on wayland linux

Screencast from 2024-02-19 14-20-16.webm

Minimal reproduction project (MRP)

This is a global issue and doesn't need a MRP

TuTiuTe avatar Feb 19 '24 13:02 TuTiuTe

I'm not sure if XWayland can read the screen at all, as it's some weird semi-headless server thing, I think.

deralmas avatar Feb 22 '24 19:02 deralmas

I wonder a little bit of why it doesn't happen with 3.x?

Maybe X11 display on 3.x is simple enough that XWayland can cover it all?

donte5405 avatar May 14 '24 15:05 donte5405

I wonder a little bit of why it doesn't happen with 3.x?

Maybe X11 display on 3.x is simple enough that XWayland can cover it all?

ColorPicker in 3.x reads from the editor window by querying the viewport data, without relying on any OS-specific API. The upside is that this works regardless of sandboxing, but it won't work outside the editor window.

I guess we need to bring back the 3.x ColorPicker eyedropper as a fallback when using OS APIs isn't feasible due to sandboxing (e.g. web platform, Wayland, Android, iOS).

Calinou avatar May 15 '24 22:05 Calinou

We seem to be on a similar distro, but I get a slightly different problematic behavior that I already commented about here.

eobet avatar May 16 '24 05:05 eobet

Trying to use this does effectively crash my pc like @eobet has said. Hopefully it can be disabled on incompatible platforms or the old picker has a fallback.

ChildishGiant avatar Jun 01 '24 09:06 ChildishGiant

i use 4.3 on nixos hyprland 0.42 has same problem, but my hypr has no response. it seems like hibernate

solitudealma avatar Sep 20 '24 13:09 solitudealma