damianatorrpm / wayfire-plugin_dbus_interface

DBus Plugin for wayfire
MIT License
11 stars 6 forks source link

add a print color under cursor option #18

Open damianatorrpm opened 4 years ago

damianatorrpm commented 4 years ago

@soreau you recently did something which makes me think you know the exact part where I can take a look at? also you did the crosshair plugin (@ammen99 is it possible to call this via signal at the moment? to extend wf-prop to do so) Maybe it would be possible to have a similiar to crosshair plugin for color picker which shows it like in gtk4 for color picking https://youtu.be/PyjmfrFUZ_4?t=53

soreau commented 4 years ago

@soreau you recently did something which makes me think you know the exact part where I can take a look at?

I'm not sure to what you are referring.

also you did the crosshair plugin (@ammen99 is it possible to call this via signal at the moment? to extend wf-prop to do so) Maybe it would be possible to have a similiar to crosshair plugin for color picker which shows it like in gtk4 for color picking https://youtu.be/PyjmfrFUZ_4?t=53

The crosshair plugin simply draws two lines across the screen, intersecting where the cursor is. It doesn't so anything with cursors. That sasid, you could do a grab, hide the cursor and draw whatever kind of cursor you want instead. (the cursor wont stay hidden without a grab).

damianatorrpm commented 4 years ago

you'd need to implement the equivalent of https://github.com/flatpak/xdg-desktop-portal-gtk/blob/master/src/screenshot.c#L260 in https://github.com/emersion/xdg-desktop-portal-wlr/blob/master/src/screenshot/screenshot.c from borschty #gtk channel which would allow all gtk gcolor choosers to work

damianatorrpm commented 4 years ago

https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/f06223df4849c9ed6480c4a07bc9fc9727954458

damianatorrpm commented 4 years ago
maybe there is a flag to request continuous mode or something like that gcolor3 calls xdp_portal_pick_color() and xdp_portal_pick_color_finish() from libportal
damianatorrpm commented 4 years ago

The plan is to have get_color_under_cursor_function here than xdg-desktop-portal-wayfire could call that get the actual coordinates with framebuffer-box_from_geometry_box() (see for example zoom plugin) a) export output to dmabuf b) or, you could just wait for swap buffers event like screencopy does c) grim + slurp + ImageMagick magic though for this it's not required to have this in dbus plugin since it could be in the portal itself