Open Bug 2057706 Opened 4 months ago Updated 3 months ago

[Wayland] The color picking tool picks the same wrong color when trying to get the color from the screen

Categories

(Core :: Widget: Gtk, defect)

Firefox 153
defect

Tracking

()

UNCONFIRMED

People

(Reporter: u792781, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0

Steps to reproduce:

1- Open Firefox normally or using the terminal.
2- Visiting "https://www.w3schools.com/colors/colors_picker.asp" or opening the Gartic Phone URL and trying any of the drawing modes.
3- Clicking on "+" to add a new custom color.
4- Trying to click anywhere at the screen to get that specific color.

Running it from CachyOS KDE Wayland

Actual results:

No matter where i click on the screen, it always gives the same color and hex code, like "#007F3B", usually green, but sometimes if i restart Firefox the color it picks is a shade of purple.

When starting it from the terminal, these messages appear:

❯ firefox
[Parent 51590, Main Thread] WARNING: the GVariant format string '(u)' has a type of '(u)' but the given value has a type of '((u))': 'glib warning', file toolkit/xre/nsSigHandlers.cpp:200

(firefox:51590): GLib-CRITICAL **: 23:06:43.748: the GVariant format string '(u)' has a type of '(u)' but the given value has a type of '((u))'
[Parent 51590, Main Thread] WARNING: g_variant_get: assertion 'valid_format_string (format_string, TRUE, value)' failed: 'glib warning', file toolkit/xre/nsSigHandlers.cpp:200

Expected results:

The right color of the pixel should get returned.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

What I see on this page is different from yours. Could you check the link again?

https://www.w3schools.com/colors/colors_picker.asp

On Wayland we need to implement it via DBus - org.freedesktop.portal.Screenshot.PickColor
https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Screenshot.html#org-freedesktop-portal-screenshot-pickcolor

Blocks: wayland
Severity: -- → S3
Summary: The color picking tool picks the same wrong color when trying to get the color from the screen → [Wayland] The color picking tool picks the same wrong color when trying to get the color from the screen

The code lives here:
https://searchfox.org/firefox-main/source/widget/gtk/nsColorPicker.cpp

I wonder how the Wayland backend is integrated to Gtk3 and if we actually use it.

Looks initial implementation is Bug 1673000.

See Also: → 1673000

Hm, the color selection seems to be working for me under Gnome/Fedora 44.

What I see on this page is different from yours. Could you check the link again?

Click on the bar under "Or Use HTML5", it opens a pop-up that has the picker visible in op's screenshot. The "+" button is in that pop-up.

I can't reproduce on swaywm on Alpine Linux either.

On Wayland we need to implement it via DBus - org.freedesktop.portal.Screenshot.PickColor

I haven't installed any portal to handle this: I'm just getting the GTK picker that op is seeing.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: