waycrate / wayshot

Mirrored at https://git.sr.ht/~shinyzenith/wayshot | screenshot tool for wlroots based compositors implementing zwlr_screencopy_v1
https://crates.io/crates/wayshot
BSD 2-Clause "Simplified" License
108 stars 18 forks source link

libwayshot outputting garbage on other monitors #118

Open coffeeispower opened 1 month ago

coffeeispower commented 1 month ago

I'm trying to port tsoding's boomer to wayland and i'm trying to use this library to take a screenshot of all screens, however only the first screen appears correctly and the other screen just has a bunch of garbage:

imagem

CheerfulPianissimo commented 1 month ago

Hi. A few questions I can think of: Which version of the library are you using? Have you tried replicating the issue with the dev branch at https://github.com/waycrate/wayshot/tree/freeze-feat-andreas ? Which GPU and compositor is your system using?

coffeeispower commented 1 month ago

@CheerfulPianissimo I'm using the latest version of libwayshot 0.3.0 with hyprland 0.38 with Intel Iris Plus Graphics G1 GPU I've not tried using the dev branch, i'll try it out and see if it works

coffeeispower commented 1 month ago

The dev branch fixed the issue. It had some breaking changes bcs it returns a dynamic image instead of a image buffer but my code is pretty small anyway. When you think that code will be merged?

Shinyzenith commented 1 month ago

Hi, it should be merged in the coming weeks, it's a big rebase so we need to get smaller details correct along with the API design before merging it.

coffeeispower commented 1 month ago

@Shinyzenith That's good to hear!

By the way if anyone is interested, i already uploaded the code of my project to github https://github.com/coffeeispower/woomer

Shinyzenith commented 1 month ago

This is so cool!! I wanted to make this forever and someone finally did it!

How are you handling the zoom stuff? I presume egl?

coffeeispower commented 1 month ago

@Shinyzenith I'm using raylib Basically it uses this library (wayshot) to make a screenshot, loads into a texture and draws it on the screen on a full screen window using raylib, and it's all one single file ignoring the spotlight shader

Shinyzenith commented 1 month ago

Looks good!