-
Notifications
You must be signed in to change notification settings - Fork 190
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
Idle status #1071
base: develop
Are you sure you want to change the base?
Idle status #1071
Conversation
474ba33
to
207a0c7
Compare
@publicarray |
@redmanmale Yea I'll look into it. Do you want me to add commits to this pr? |
There is a race condition when the status has switched to idle (due to inactivity) and the user quickly (before the code switches the status) presses the status button to become online. The idle code will no longer switch to idle status automatically. |
Thank you very much @publicarray! |
You are very welcome 😄 Love to help. |
This is just a guess but I don't think |
Yes, it's a little overkill, but I want to use the same condition |
IMHO I prefer to keep platform specific stuff tied to that platform and not sprinkle it over to other platforms. |
I'll re-review once there's not an #ifdef in every file. Reviewed 3 of 11 files at r1. langs/en.h, line 495 at r3 (raw file):
don't add an #if here langs/i18n_decls.h, line 169 at r3 (raw file):
these should always exist. Even if they're not used no a platform... poor android... langs/ru.h, line 416 at r3 (raw file):
no #if src/settings.c, line 73 at r3 (raw file):
I'm gonna stop commenting but I don't like #if's unless they're features you have a strong reason to compile in/out. X11 must exist, so Xss is a fine dependency to add. If you really want to be pedantic, you could detect for the existence of Xss, and then just disable the option via the UI Comments from Reviewable |
@GrayHatter |
Review status: 0 of 12 files reviewed at latest revision, 4 unresolved discussions. langs/en.h, line 495 at r3 (raw file): Previously, GrayHatter (Gregory Mullen) wrote…
Done. langs/i18n_decls.h, line 169 at r3 (raw file): Previously, GrayHatter (Gregory Mullen) wrote…
Done. langs/ru.h, line 416 at r3 (raw file): Previously, GrayHatter (Gregory Mullen) wrote…
Done. src/settings.c, line 73 at r3 (raw file): Previously, GrayHatter (Gregory Mullen) wrote…
Done. Comments from Reviewable |
Reviewed 12 of 12 files at r4. Comments from Reviewable |
ec673e0
to
cc5f233
Compare
@redmanmale I think you have dropped DISABLE_IDLE_STATUS, which is fine. But this is going to take me some time to review. I'm not convinced XNextEventTimed is the best way to go about this, so I'll have to do a little research. If you want to merge this sooner, you can wrap the xlib stuff in an #ifdef 0 and comments as to why, then I can just review the Windows stuff which on first glance looks fine. Reviewed 2 of 12 files at r4, 2 of 6 files at r5. Comments from Reviewable |
I don't like to merge unfinished features so I'll wait for your review. Review status: 8 of 12 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
Reviewed 6 of 12 files at r4, 6 of 6 files at r5. CMakeLists.txt, line 301 at r5 (raw file):
@endoffile78 Can you test this on whateverBSD? langs/en.h, line 499 at r5 (raw file):
You should probably combine this string with the one below and add a %u format specifier for the number to make localisation less of a chore. src/settings.c, line 73 at r5 (raw file):
Can this be done now that the .ini PR is merged? src/cocoa/main.m, line 41 at r5 (raw file):
Make this static. src/layout/settings.c, line 1419 at r5 (raw file):
What happens when settings.idle_interval is set to 0? (If strtol fails.) Should we do some sanity/bound checking here? src/windows/main.c, line 813 at r5 (raw file):
Move this to the line above. (1TBS) src/windows/main.c, line 823 at r5 (raw file):
This should probably not be cast to an uint16_t since 2 seconds would mean that the number we're casting is 120 000 and a bit bigger than what an uint16 can contain. src/xlib/main.c, line 753 at r5 (raw file):
You can let this fall through to the end of the function where this code also exists. src/xlib/main.c, line 757 at r5 (raw file):
No else after return. Comments from Reviewable |
cc5f233
to
9cc60a2
Compare
bump |
9cc60a2
to
2fdbe15
Compare
Review status: 0 of 12 files reviewed at latest revision, 9 unresolved discussions. langs/en.h, line 499 at r5 (raw file): Previously, robinlinden (Robin Lindén) wrote…
I can't do it just like that because it used in the different UI labels. src/settings.c, line 73 at r5 (raw file): Previously, robinlinden (Robin Lindén) wrote…
Done. src/cocoa/main.m, line 41 at r5 (raw file): Previously, robinlinden (Robin Lindén) wrote…
Done. src/layout/settings.c, line 1419 at r5 (raw file): Previously, robinlinden (Robin Lindén) wrote…
Done. src/windows/main.c, line 813 at r5 (raw file): Previously, robinlinden (Robin Lindén) wrote…
Done. src/windows/main.c, line 823 at r5 (raw file): Previously, robinlinden (Robin Lindén) wrote…
Done. src/xlib/main.c, line 753 at r5 (raw file): Previously, robinlinden (Robin Lindén) wrote…
Done. src/xlib/main.c, line 757 at r5 (raw file): Previously, robinlinden (Robin Lindén) wrote…
Done. Comments from Reviewable |
2fdbe15
to
951da0e
Compare
It's been a while... Can we merge this? |
Robin is away on vacation, he'll have to take a look when he gets back. Reviewed 2 of 12 files at r6. Comments from Reviewable |
Reviewed 2 of 8 files at r7. src/ui.c, line 147 at r7 (raw file):
this isn't supposed to be in here anymore. It belongs in the layout dir Comments from Reviewable |
Reviewed 1 of 12 files at r6, 2 of 8 files at r7. src/settings.h, line 20 at r7 (raw file):
I defines in headers make me nervous... ESPECIALLY when you make them static as well. Plus, wouldn't time_t be better here? Comments from Reviewable |
Review status: 12 files need 2 more reviewers, 11 open discussions remaining, 1 assignee LGTMs are missing, missing Admin LGTM at current revision. (waiting on @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, @undefined, and @undefined) src/settings.h, line 20 at r7 (raw file):
What do you mean? Is there a better place for it? Or something else?
On macOS it's src/ui.c, line 147 at r7 (raw file): Previously, GrayHatter (Gregory Mullen) wrote…
IIRC I tried but failed. Comments from Reviewable |
It's libxss-dev package. Add it in cmake as-is for now. It needs to be optional in the future.
the solution used is a bit tricky.
…r Linux and pass it to code via defined constant
f271ccd
to
5618d65
Compare
aka auto away (#325) aka presence state (#167).
After some configurable time of inactivity (no mousemoves or keystrokes) your status will be automatically changed to
away
. In case of activity it will be changed back toonline
.This change is