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

Race condition when an output is plugged in #16

Closed
emersion opened this issue Jan 16, 2019 · 5 comments
Closed

Race condition when an output is plugged in #16

emersion opened this issue Jan 16, 2019 · 5 comments
Labels

Comments

@emersion
Copy link
Member

  1. Have a window with sensitive information
  2. Run swaylock
  3. Unplug the output so that sway runs without any output
  4. Re-plug the output
  5. sway draws the window with sensitive information
  6. swaylock notices a new output has appeared, creates a new surface and draws
  7. sway draws swaylock, occluding the sensitive data

(5) may or may not be visible during a long time, depending on various conditions. Recording the screen with a camera might allow to retrieve the screen contents.

@kennylevinsen
Copy link
Member

When binding lid switch to disable internal output on a laptop, this ends up happening pretty much every time the laptop is opened.

@davidedmundson
Copy link

FWIW, within kwin we know when a screen is locked (we have something bespoke, but you can get it from the logind hint)

When locked we don't render anything at all except for windows from a specific client. For you that could be only showing windows with a given namespace.

We still have the race where we render before our lockscreen catches up, but because we're skipping all other windows, that just results in a black screen for a bit, which isn't a problem.

@luispabon
Copy link

Is there a workaround to this problem other than not disabling the output when the laptop lid is closed?

@emersion
Copy link
Member Author

emersion commented Aug 3, 2021

The intented fix for this is swaywm/wlr-protocols#86. Needs implementations.

@emersion
Copy link
Member Author

The protocol has been implemented now.

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

No branches or pull requests

4 participants