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

Limitation of Capture Cursor #295

Open
PeterWang-dev opened this issue Oct 18, 2024 · 3 comments
Open

Limitation of Capture Cursor #295

PeterWang-dev opened this issue Oct 18, 2024 · 3 comments

Comments

@PeterWang-dev
Copy link

Nothing happened after ticking [x] Capture Cursor .

OS: Arch Linux
DE: Plasma 6.2.0
Display Protocol: Wayland
Version of Weylus: master branch

@PeterWang-dev
Copy link
Author

PeterWang-dev commented Oct 18, 2024

I have done some investigations and tracing. There's a very weird thing I've noticed is that capture_cursor variable seems being ignored in PipeWireCapturable::recorder .

fn recorder(&self, _capture_cursor: bool) -> Result<Box<dyn Recorder>, Box<dyn Error>> {
Ok(Box::new(PipeWireRecorder::new(self.clone())?))
}
}

@PeterWang-dev
Copy link
Author

It seems a known limitation. Users need to refresh the source list to apply the state change of Capture Cursor.
Any further re-design of this? @H-M-H

@PeterWang-dev PeterWang-dev changed the title [Bug] Can not capture cursor Limitation of Capture Cursor Oct 18, 2024
@H-M-H
Copy link
Owner

H-M-H commented Oct 18, 2024

Thanks for the report! Your observations are correct! On Wayland screen recording works by first requesting permission from the user. This typically shows a dialog asking for permission. This request is also the place to specify if the cursor should be recorded. This means if the capture cursor setting is changed, Weylus would have to ask the user for permission once again. So if you want to capture the cursor you have to:

  • check the checkbox
  • reload the list of windows/screens
  • choose the desired window/screen

Obviously, this is not very nice. I am open for ideas to properly deal with this.

Another option I have not yet considered is requesting cursor metadata as described here: https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.ScreenCast.html#org-freedesktop-portal-screencast-availablecursormodes

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

No branches or pull requests

2 participants