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

Multiple screen setup no longer working since version 1.2.0. (X11) #21

Open
dataCobra opened this issue Oct 4, 2024 · 4 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@dataCobra
Copy link

Describe The Bug
When the screens get locked only the primary windows gets a screenshot, the other screen only has a white image. The visual typing indicator gets displayed on both screens. (Both with and without blur)

To Reproduce
Steps to reproduce the behavior:

  1. Have a multi monitor setup
  2. Use a version >= 1.2.0
  3. Lock the screen automatically or manual
  4. Screenshot for primary but white background for other screens.

Expected Behavior
All screens/displays should show a screenshot from the contents when the lock is in place.

System Info:

  • Void Linux
  • i3lock --version = 2.15
  • i3lockr --version = 1.2.0 and 1.2.1
@dataCobra dataCobra added the bug Something isn't working label Oct 4, 2024
@owenthewizard
Copy link
Owner

owenthewizard commented Oct 7, 2024

Might be because scrap is used for screen captures since 1.2.0. I'm on holiday right now so I can't work on this for the moment.

Can you try using scrap (one of the examples should work) and see if it captures all your monitors?

@bmhenry
Copy link

bmhenry commented Oct 8, 2024

Looks like scrap's Display::primary (as used here) is the culprit. You'd want to iterate over all available displays with Display::all() like they do in their list example

@dataCobra
Copy link
Author

dataCobra commented Oct 9, 2024

I tried to create a patch with Display::all() but my current Rust knowledge is not enough to figure out how to make the code work with a Vec<Display> instead of the Display.

Couldn't figure out how to use the available functions to iterate over every display in the vector.

@bmhenry
Copy link

bmhenry commented Oct 9, 2024

I've opened a PR here. This works for me on a setup of 3 monitors, which I tested with

  • all the same resolution and no offsets
  • differing resolutions and differing top/left offsets

I doubt it's foolproof, but it should at least be a start.

Until the PR is merged, you should be able to install and use the forked version available at that pull request. If you run into bugs LMK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants