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

swayidle: Fix sleep inhibitor not being acquired #3381

Merged
merged 1 commit into from
Jan 7, 2019
Merged

swayidle: Fix sleep inhibitor not being acquired #3381

merged 1 commit into from
Jan 7, 2019

Conversation

oscarwcl
Copy link
Contributor

@oscarwcl oscarwcl commented Jan 7, 2019

Fixes #3377.
The sleep lock file descriptor was immediately closed after it was acquired due to the dbus message being freed. Now the fd is duplicated before the message is freed so the inhibitor stays active.

Fixes #3377.
The sleep lock file descriptor was immediately closed after it was
acquired due to the dbus message being freed. Now the fd is duplicated
before the message is freed so the inhibitor stays active.
Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@emersion emersion merged commit bd59602 into swaywm:master Jan 7, 2019
@emersion
Copy link
Member

emersion commented Jan 7, 2019

Thanks!

@ianyfan
Copy link
Contributor

ianyfan commented Jan 7, 2019

This opens a new file descriptor, which means the log line outputs a misleading value for lock_fd.

ianyfan added a commit to ianyfan/sway that referenced this pull request Jan 7, 2019
ianyfan added a commit to ianyfan/sway that referenced this pull request Jan 7, 2019
The fix in swaywm#3381 causes the lock fd to be updated, but the log message
is printed before this, causing it to be misleading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Swayidle doesn't actually register a sleep inhibit
4 participants