Toinane / colorpicker

A mininal but complete colorpicker desktop app
https://colorpicker.fr
GNU General Public License v3.0
1.59k stars 119 forks source link

[Linux] colorpicker is not working on wayland. #106

Open darkRaspberry opened 3 years ago

darkRaspberry commented 3 years ago

Describe the bug Not working in wayland.

Sorry for deleting the template.

Now many distributions are moving from xorg to wayland. And Ubuntu (my current machine) is also moved to wayland by default. So its the ill effect of wayland and now colorpicker is not working. Like completely not working. Its just showing white color nothing else.

I confined its working on xorg and i'm using version 2.0.3

Toinane commented 3 years ago

Hey @darkRaspberry thank you for reporting this issue! How did you download Colorpicker? from snapstore, .deb file, other..?

darkRaspberry commented 3 years ago

How did you download Colorpicker?

From your website I redirect here https://github.com/Toinane/colorpicker/releases/tag/2.0.3 I tried .AppImage and .deb.

Also I expected this when i was installing. Any app which works on something which require reading from screen like screen recorder or screenshot doesn't support wayland directly. Xorg and wayland is not compatible.

Toinane commented 2 years ago

Okay I see! I'm sorry for that. I'm a newbie on Linux so I don't know everything about it. I'll try to add wayland compatibility for the next update ๐Ÿ‘

darkRaspberry commented 2 years ago

See the fact that you are using electron 9.x.x May be is the cause There is native wayland support by passing the flag in electron 12 which might be seems mature till now.(As release much earlier) There is native support in it. https://www.reddit.com/r/linux/comments/lw7cvk/electron_12_has_just_been_released_with_wayland/ This thread seems little worth to see.

FurtherYou can make these options your default for all Electron apps by adding the following into your ~/.config/electron-flags.conf.

--enable-features=UseOzonePlatform
--ozone-platform=wayland

In dead simple words wayland handles frontend of the linux distro. And IF you app doesn't support wayland or build on wayland. They they can't read from it. But still display on the screen very undesirably.

Default site- https://wayland.freedesktop.org/

There are newer version of electron also which support much well but. It up to you

Some useless discussion about wayland. https://github.com/microsoft/vscode/issues/109176

Toinane commented 2 years ago

Oh okay thank you for the update! I really appreciate ๐Ÿ‘ I'll update Colorpicker for Electron 16 and test the flag on it. I'm sorry for the seriously delay I have on this.

darkRaspberry commented 2 years ago

@Toinane No need to say sorry. Instead I'm grateful that you made this cool awesome app.

nazar1ua commented 2 years ago

@Toinane Please update the snap

Toinane commented 2 years ago

Hey @niphoneua sorry, I'm actually working to rewrite all the app and it's take time, so when it's done, I'll update it. I don't know for the moment if the picker will work on Wayland, but I'll do my best to do it ๐Ÿ‘

nazar1ua commented 2 years ago

Thanks

step4wd commented 2 years ago

Waiting for the update. Ubuntu 22.04 is out and the App is not working on it maybe because of the Wayland issue

Toinane commented 2 years ago

Hey there! Thanks for your waiting! I'm really sorry for the issue I've released a new version with the latest Electron version. It sould work now again on Wayland, I've tried on Ubuntu 22.04 and looks fine. The only issue is the picker feature will not work on Wayland. I can't find a deps for picking color on screen compatible with wayland and nodejs and the only one I use is not maintained for now.

When I can, I'll switch from Electron to Tauri and use Rust deps to make this work again and to be more stable/efficient!

Toinane commented 2 years ago

Also, I'll not update the snap version as it's really hard to maintain it actually. I recommend to use the .deb / .AppImage for the moment

step4wd commented 2 years ago

Thank you! Tried the DEB version of 2.1.0 and unfortunately it is still unable to pick colours

image

Toinane commented 2 years ago

If you are in Wayland interface, it's normal yeah, It only work on x11 :/ you'll need to wait a little more the transition on Rust for wayland

darkRaspberry commented 2 years ago

Before logging in, If you can change the session from wayland to xorg. Then it will work as perfect.

Adding wayland support to this app takes time. Please wait! This is open-source app, Toinane may fix it when he has time, keep patience.

Toinane commented 2 years ago

Yeah It's the best way for the moment ๐Ÿ‘ If you don't need picker, you can keep wayland. Really sorry for this, I'm not a pro on C++ module, I hope it will be better with Rust! I'm currently trying Tauri to make the next update

Toinane commented 2 years ago

image Looks to be working with tauri more easely than I was thinking!

nyjsnl commented 1 year ago

Dude, take a look at the color picker I wrote and give me some adviceย 

GogoFC commented 9 months ago

Yeah I have the same on Ubuntu GNOME Wayland. Snap doesn't do anything.

Below error is from AppImage

Screenshot from 2023-10-31 02-35-56