-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
kill subscriber process when desktop is removed #60
base: master
Are you sure you want to change the base?
kill subscriber process when desktop is removed #60
Conversation
TODO:
|
@phenax no pressure if you do not have the time, that's just a friendly ping 😌 |
@amtoine, I think it's better if this pr contains those changes before the review if that's what you mean |
it was my question 😋 so i'll add the changes and ping you when i'm done 😉 |
remove_listener() { | ||
desktop=$1; | ||
[[ -z "$desktop" ]] && desktop=$(get_focused_desktop); | ||
|
||
kill_layout "$desktop"; | ||
local old_pid="$(get_desktop_options "$desktop" | valueof pid)"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get the point of this change. It was killing the process before resetting the state, now it does that after resetting the state but what does that accomplish?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is a change from the original PR, not sure what the goal was here to be honest 🤔
and, with the changes you originally requested in #36, kill_layout "$desktop"
and
old_pid="$(get_desktop_options "$desktop" | valueof pid)"
kill_process "$old_pid"
should do exactly the same thing 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the way kill_layout gets called... desktop options in remove_listener have to be cleared before calling kill_layout,
otherwise if remove_listener is called by the subscriber process on desktop_remove event, it will kill itself before the options are cleared.
that is the original comment on the PR 👌
This is a duplicate of the stale #36 to apply the requested changed and merge the branch to
master
.