-
Notifications
You must be signed in to change notification settings - Fork 768
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
Add the ipc shutdown event #2335
Conversation
This makes the tests fail. Can you add an appropriate skip statement that verifies AnyEvent::I3 is new enough? See e.g. t/220-ipc-window-title.t for an example. |
@acrisci You've opened a bunch of initial pull requests which all fail Travis. Are you going to keep working on these? |
Yeah sorry I've been kind of busy. Will try to finish this soon. |
6b2667e
to
cd84b2f
Compare
Ok, I finally fixed this up. |
@@ -9,9 +9,9 @@ | |||
* commands.c: all command functions (see commands_parser.c) | |||
* | |||
*/ | |||
#include <stdint.h> |
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.
Here and below, are the changes in include order and line breaks intentional? Does clang-format require them?
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 think clang-format3.7 does such (ugly) line breaks. clang-format3.5, which we use, doesn't.
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.
Yeah, I just run the default clang-format that comes with my system and make all the changes it says to.
Looks good overall. |
This event is triggered when the connection to the ipc is about to shutdown because of a user action such as with a `restart` or `exit` command. The `change` field indicates why the ipc is shutting down. It can be either "restart" or "exit". fixes i3#2318
cd84b2f
to
816dcc7
Compare
Ok I made the changes and it's ready for another review. |
@@ -154,7 +154,8 @@ static Con *maybe_auto_back_and_forth_workspace(Con *workspace) { | |||
*/ | |||
typedef struct owindow { | |||
Con *con; | |||
TAILQ_ENTRY(owindow) owindows; | |||
TAILQ_ENTRY(owindow) | |||
owindows; |
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.
This is still an incorrect line break
You didn't actually undo the incorrect formatting, did you? We really shouldn't use 3.7, the breaks are really ugly. We have an open issue to move to a current version. |
OK wasn't paying that close attention to formatting. Is there documentation for this? |
We use clang35 with the We do have #2174, though I personally don't agree with @stapelberg's suggestion there anymore. I know code style is more about having a consistent style than it is about what that style is, but personally I think the formatting clang37 uses (out of the box, anyway) is really, really bad, and I'd not want to have it. I think we should try to configure newer versions of clang to keep the code formatted the way it is today. |
@acrisci It's been two months (and longer for other PRs). Are you going to continue working on these PRs? |
@acrisci I'd appreciate some feedback on this. My impression is that you no longer work on i3, but switched your focus to sway instead. In that case we can close the PRs. |
@Airblader From reading the comments I understand that this PR was valid but was in limbo due to a formatting issue with clang-format 3.5 -> 3.7. If you'd rather I submit a new PR I'd be happy to do so. |
I don't have the link right now, but there was a new PR for the shutdown event which has been merged and is in 4.14. You can see on the IPC docs on the website that there is a shutdown event. |
This event is triggered when the connection to the ipc is about to
shutdown because of a user action such as with a
restart
orexit
command. The
change
field indicates why the ipc is shutting down. Itcan be either "restart" or "exit".
fixes #2318