Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color picker not working under Wayland #598

Open
madjesc opened this issue May 26, 2021 · 7 comments
Open

Color picker not working under Wayland #598

madjesc opened this issue May 26, 2021 · 7 comments
Labels

Comments

@madjesc
Copy link

madjesc commented May 26, 2021

Expected Behavior

When clicking in the global color picker, it should zoom in and let me choose a color.
Like #432 gif

Current Behavior

The color picker circle does nothing and the cursor gets stuck
Log:

(Akira:2): Gdk-CRITICAL **: 16:44:35.500: gdk_monitor_get_geometry: assertion 'GDK_IS_MONITOR (monitor)' failed

Possible Solution

  1. Use xdg portals
  2. Make the color picker only local <--- I will try to do this
  3. Delete the color picker

Steps to Reproduce (for bugs)

  1. Run akira under Wayland
  2. Click in the color picker
  3. Try to pick a color from the screen

Context

I was trying the app features and this happened

Your Environment (for bugs)

  • Akira Version: v0.0.14 - alpha
  • OS Info:
    Linux pKnw 5.11.22_1 How to install Akira in linux? #1 SMP 1621481187 x86_64 GNU/Linux
    NAME="void"
    ID="void"
    DISTRIB_ID="void"
    PRETTY_NAME="void"
@Alecaddd
Copy link
Member

Thanks for the report.
I'm not currently using Wayland so I can't test this issue.
If you have the means and time, it would be great if you could create PR for it, making sure that the fix keeps the color picker working under X11.

@LucileDT LucileDT added the bug label May 27, 2021
@albfan
Copy link
Collaborator

albfan commented May 31, 2021

wayland do not have access to other windows (security first) so yes, using portals is the solution.

A wayland color picker can demonstrate how to do it correctly: https://github.com/emersion/grim

@Alecaddd
Copy link
Member

Alecaddd commented Jun 4, 2021

@Mkefs any luck in figuring this out? Otherwise I can give it a try

@madjesc
Copy link
Author

madjesc commented Jun 7, 2021

@Mkefs any luck in figuring this out? Otherwise I can give it a try

Mmm, I'm having some troubles with it, and also I have homework, so I don't have so much time.
But I still working in it

@bilelmoussaoui
Copy link
Collaborator

Under wayland, the best shot I can think of using the portals. We can use libportal https://github.com/flatpak/libportal for that, it doesn't provide a vapi file, but we can easily write a wrapper for the pick_color method

See here for an example on how to do so: https://gitlab.gnome.org/bertob/nostalgia/-/blob/master/src/libportal.vapi#L3-26

@albfan
Copy link
Collaborator

albfan commented Jun 8, 2021

From color-selection I guess it should be xdp_portal_pick_color

https://gitlab.gnome.org/World/gcolor3/-/merge_requests/141/diffs#e8072c54942d0460ac2a08e9cfacb2aebffbd712_1930_1753

@madjesc madjesc mentioned this issue Jun 28, 2021
2 tasks
@AshkanArabim
Copy link

It seems like this issue was fixed in #619
Is there still something here to be worked on here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants