nashaofu / xcap

XCap is a cross-platform screen capture library written in Rust. It supports Linux (X11, Wayland), MacOS, and Windows. XCap supports screenshot and video recording (to be implemented).
https://docs.rs/xcap
Apache License 2.0
459 stars 55 forks source link

Window not supporting wayland native apps & Monitor returning 0,0 on wayland. #136

Open TukanDev opened 3 months ago

TukanDev commented 3 months ago

Monitor::from_point() returns 0 for x and y of the monitor, which also makes capturing area by cropping the image kind of difficult (maybe just my skill issue so its offsetted by abit on x and alot on y). Everything else about a monitor info seems fine.

Window::all() (or however you get it...) does not handle wayland so it only captures xorg or xwayland windows... If there is no xwayland/xorg window maximized/existing and in background it wont detect any window, HOWEVER it works obviously fine if you open wayland native app and screenshot it while being on top (incase of my dolphin file manager it will be there including any other window that was smaller/ontop of xorg/xwayland window) also possibly hide windows that are on top of targetted window so we dont get for example dolphin or any smaller window inside a window shot if on top of targetting window (ex: hide dolphin if doing window shot for focused app that is maximized in back while dolphin is just chilling in front during screenshot).

Any plans to re add area capture functions back (from before create renaming and refactor aka screenshots branch)??

I can confirm these issues affect KDE plasma (wayland) 6.0.4 on arch linux.