[Wayland] The color picking tool picks the same wrong color when trying to get the color from the screen
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
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.
Comment 1•4 months ago
|
||
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.
Comment 2•3 months ago
|
||
Comment 3•3 months ago
|
||
What I see on this page is different from yours. Could you check the link again?
Comment 4•3 months ago
|
||
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
Comment 5•3 months ago
|
||
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.
Comment 7•3 months ago
|
||
Hm, the color selection seems to be working for me under Gnome/Fedora 44.
Comment 8•3 months ago
|
||
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.
Description
•