Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Issue 1949393007: X11: Better timestamp handling for _NET_ACTIVE_WINDOW (Closed)

Created:
4 years, 7 months ago by Tom (Use chromium acct)
Modified:
4 years, 7 months ago
CC:
chromium-reviews, tfarina, asvitkine+watch_chromium.org, tdresser+watch_chromium.org, piman, pkotwicz, danakj, dcheng
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

X11: Better timestamp handling for _NET_ACTIVE_WINDOW Main changes introduced: 1. Get the X server timestamp in the newly created browser process and send it over IPC to the old process to update wm_user_time_ms 2. Add logic in set_wm_user_time_ms to avoid setting the time to 0 (or backwards) 3. If wm_user_time_ms == 0 and we try to activate a window, grab the server time first BUG=593516, 608521, 379615 Committed: https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86 Cr-Commit-Position: refs/heads/master@{#394018}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Added XFlush and moved code to chrome_browser_main_extra_parts_x11.cc #

Total comments: 4

Patch Set 3 : Change kAtomStr, fix formatting #

Total comments: 10

Patch Set 4 : Refactor #

Total comments: 1

Patch Set 5 : Fix comment #

Patch Set 6 : Merge :P #

Patch Set 7 : Don't clobber the root window event mask #

Total comments: 1

Patch Set 8 : Change a property of a new window instead of the root window #

Total comments: 7

Patch Set 9 : C++ style casts and remove dummy_data_ #

Total comments: 4

Patch Set 10 : Move to SCOPED_UMA_HISTOGRAM_TIMER #

Patch Set 11 : ms->microseconds #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -10 lines) Patch
M chrome/browser/chrome_browser_main_extra_parts_x11.cc View 1 2 3 2 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/ui/startup/startup_browser_creator.cc View 1 2 3 4 chunks +19 lines, -2 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 10 1 chunk +6 lines, -0 lines 0 comments Download
M ui/events/platform/x11/x11_event_source.h View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -0 lines 0 comments Download
M ui/events/platform/x11/x11_event_source.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +44 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_desktop_handler.h View 3 chunks +4 lines, -7 lines 0 comments Download
M ui/views/widget/desktop_aura/x11_desktop_handler.cc View 1 2 3 3 chunks +17 lines, -1 line 0 comments Download

Messages

Total messages: 77 (29 generated)
Tom (Use chromium acct)
https://codereview.chromium.org/1949393007/diff/1/chrome/browser/process_singleton_posix.cc File chrome/browser/process_singleton_posix.cc (right): https://codereview.chromium.org/1949393007/diff/1/chrome/browser/process_singleton_posix.cc#newcode831 chrome/browser/process_singleton_posix.cc:831: This doesn't seem like the best place to put ...
4 years, 7 months ago (2016-05-06 20:42:00 UTC) #2
Elliot Glaysher
https://codereview.chromium.org/1949393007/diff/1/chrome/browser/process_singleton_posix.cc File chrome/browser/process_singleton_posix.cc (right): https://codereview.chromium.org/1949393007/diff/1/chrome/browser/process_singleton_posix.cc#newcode831 chrome/browser/process_singleton_posix.cc:831: On 2016/05/06 20:42:00, Tom Anderson wrote: > This doesn't ...
4 years, 7 months ago (2016-05-06 21:13:13 UTC) #3
piman
https://codereview.chromium.org/1949393007/diff/1/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/1949393007/diff/1/ui/events/platform/x11/x11_event_source.cc#newcode158 ui/events/platform/x11/x11_event_source.cc:158: XDeleteProperty(display_, window, dummyAtom); On 2016/05/06 20:42:00, Tom Anderson wrote: ...
4 years, 7 months ago (2016-05-06 21:23:00 UTC) #5
Tom (Use chromium acct)
https://codereview.chromium.org/1949393007/diff/1/chrome/browser/process_singleton_posix.cc File chrome/browser/process_singleton_posix.cc (right): https://codereview.chromium.org/1949393007/diff/1/chrome/browser/process_singleton_posix.cc#newcode831 chrome/browser/process_singleton_posix.cc:831: On 2016/05/06 21:13:13, Elliot Glaysher wrote: > On 2016/05/06 ...
4 years, 7 months ago (2016-05-06 22:09:43 UTC) #6
Elliot Glaysher
https://codereview.chromium.org/1949393007/diff/20001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/1949393007/diff/20001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode729 chrome/browser/ui/startup/startup_browser_creator.cc:729: static_cast<Time>(time)); nit: if statements with multi-line bodies get wrapped ...
4 years, 7 months ago (2016-05-06 22:21:10 UTC) #7
Tom (Use chromium acct)
https://codereview.chromium.org/1949393007/diff/20001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/1949393007/diff/20001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode729 chrome/browser/ui/startup/startup_browser_creator.cc:729: static_cast<Time>(time)); On 2016/05/06 22:21:09, Elliot Glaysher wrote: > nit: ...
4 years, 7 months ago (2016-05-06 22:45:00 UTC) #8
Elliot Glaysher
lgtm
4 years, 7 months ago (2016-05-06 22:54:25 UTC) #9
sky
https://codereview.chromium.org/1949393007/diff/40001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/1949393007/diff/40001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode725 chrome/browser/ui/startup/startup_browser_creator.cc:725: std::string switchValue = switch_value https://codereview.chromium.org/1949393007/diff/40001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/1949393007/diff/40001/ui/events/platform/x11/x11_event_source.cc#newcode131 ...
4 years, 7 months ago (2016-05-07 16:58:34 UTC) #10
Tom (Use chromium acct)
https://codereview.chromium.org/1949393007/diff/40001/chrome/browser/ui/startup/startup_browser_creator.cc File chrome/browser/ui/startup/startup_browser_creator.cc (right): https://codereview.chromium.org/1949393007/diff/40001/chrome/browser/ui/startup/startup_browser_creator.cc#newcode725 chrome/browser/ui/startup/startup_browser_creator.cc:725: std::string switchValue = On 2016/05/07 16:58:34, sky wrote: > ...
4 years, 7 months ago (2016-05-09 17:50:00 UTC) #11
sky
LGTM https://codereview.chromium.org/1949393007/diff/60001/ui/events/platform/x11/x11_event_source.h File ui/events/platform/x11/x11_event_source.h (right): https://codereview.chromium.org/1949393007/diff/60001/ui/events/platform/x11/x11_event_source.h#newcode66 ui/events/platform/x11/x11_event_source.h:66: // last_seen_server_time with this value. nit: generally when ...
4 years, 7 months ago (2016-05-12 15:01:16 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/60001
4 years, 7 months ago (2016-05-12 16:38:29 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/80001
4 years, 7 months ago (2016-05-12 16:40:34 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/4522) ios-device-gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 7 months ago (2016-05-12 16:42:38 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/120001
4 years, 7 months ago (2016-05-12 16:52:57 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/160508)
4 years, 7 months ago (2016-05-12 17:57:01 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/140001
4 years, 7 months ago (2016-05-12 21:28:49 UTC) #28
Tom (Use chromium acct)
Elliot/Dana PTAL at the deltas from the latest patchset before commit https://codereview.chromium.org/1949393007/diff2/120001:140001/ui/events/platform/x11/x11_event_source.cc
4 years, 7 months ago (2016-05-12 21:30:58 UTC) #29
danakj
https://codereview.chromium.org/1949393007/diff/140001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/1949393007/diff/140001/ui/events/platform/x11/x11_event_source.cc#newcode158 ui/events/platform/x11/x11_event_source.cc:158: XGetWindowAttributes(display_, window, &attributes); Round trips :( Can you just ...
4 years, 7 months ago (2016-05-12 21:32:50 UTC) #31
Tom (Use chromium acct)
On 2016/05/12 21:32:50, danakj wrote: > https://codereview.chromium.org/1949393007/diff/140001/ui/events/platform/x11/x11_event_source.cc > File ui/events/platform/x11/x11_event_source.cc (right): > > https://codereview.chromium.org/1949393007/diff/140001/ui/events/platform/x11/x11_event_source.cc#newcode158 > ...
4 years, 7 months ago (2016-05-12 21:35:09 UTC) #32
danakj
On Thu, May 12, 2016 at 2:35 PM, <thomasanderson@google.com> wrote: > On 2016/05/12 21:32:50, danakj ...
4 years, 7 months ago (2016-05-12 21:39:09 UTC) #33
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-12 22:25:53 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/160001
4 years, 7 months ago (2016-05-12 22:59:31 UTC) #37
Tom (Use chromium acct)
On 2016/05/12 21:39:09, danakj wrote: > On Thu, May 12, 2016 at 2:35 PM, <mailto:thomasanderson@google.com> ...
4 years, 7 months ago (2016-05-12 23:03:17 UTC) #38
danakj
That looks nicer, thanks, 2 comments: https://codereview.chromium.org/1949393007/diff/160001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/1949393007/diff/160001/ui/events/platform/x11/x11_event_source.cc#newcode159 ui/events/platform/x11/x11_event_source.cc:159: dummy_atom_ = XInternAtom(display_, ...
4 years, 7 months ago (2016-05-12 23:33:27 UTC) #39
danakj
https://codereview.chromium.org/1949393007/diff/160001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/1949393007/diff/160001/ui/events/platform/x11/x11_event_source.cc#newcode87 ui/events/platform/x11/x11_event_source.cc:87: event->xproperty.window == *(Window*)arg; C++ style casts please https://codereview.chromium.org/1949393007/diff/160001/ui/events/platform/x11/x11_event_source.cc#newcode172 ui/events/platform/x11/x11_event_source.cc:172: ...
4 years, 7 months ago (2016-05-12 23:35:48 UTC) #40
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-13 00:00:07 UTC) #42
Tom (Use chromium acct)
Going to commit after a dry run https://codereview.chromium.org/1949393007/diff/160001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/1949393007/diff/160001/ui/events/platform/x11/x11_event_source.cc#newcode87 ui/events/platform/x11/x11_event_source.cc:87: event->xproperty.window == ...
4 years, 7 months ago (2016-05-13 17:21:25 UTC) #43
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/180001
4 years, 7 months ago (2016-05-13 17:22:02 UTC) #45
danakj
Thanks that LGTM
4 years, 7 months ago (2016-05-13 18:33:15 UTC) #46
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-13 19:07:31 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/180001
4 years, 7 months ago (2016-05-13 19:26:57 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/182955)
4 years, 7 months ago (2016-05-13 19:37:52 UTC) #53
Tom (Use chromium acct)
Pinging rkaplow@ for OWNERS permission for histograms.xml
4 years, 7 months ago (2016-05-13 19:47:00 UTC) #55
rkaplow
https://codereview.chromium.org/1949393007/diff/180001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1949393007/diff/180001/tools/metrics/histograms/histograms.xml#newcode12336 tools/metrics/histograms/histograms.xml:12336: + units="microseconds"> this is in milliseconds actually https://codereview.chromium.org/1949393007/diff/180001/ui/events/platform/x11/x11_event_source.cc File ...
4 years, 7 months ago (2016-05-13 21:30:45 UTC) #56
Tom (Use chromium acct)
https://codereview.chromium.org/1949393007/diff/180001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1949393007/diff/180001/tools/metrics/histograms/histograms.xml#newcode12336 tools/metrics/histograms/histograms.xml:12336: + units="microseconds"> On 2016/05/13 21:30:44, rkaplow wrote: > this ...
4 years, 7 months ago (2016-05-14 04:18:39 UTC) #57
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/200001
4 years, 7 months ago (2016-05-14 05:07:44 UTC) #59
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-14 06:25:03 UTC) #61
rkaplow
On 2016/05/14 04:18:39, Tom Anderson wrote: > https://codereview.chromium.org/1949393007/diff/180001/tools/metrics/histograms/histograms.xml > File tools/metrics/histograms/histograms.xml (right): > > https://codereview.chromium.org/1949393007/diff/180001/tools/metrics/histograms/histograms.xml#newcode12336 ...
4 years, 7 months ago (2016-05-16 14:49:18 UTC) #62
rkaplow
4 years, 7 months ago (2016-05-16 14:49:34 UTC) #63
Tom (Use chromium acct)
On 2016/05/16 14:49:34, rkaplow wrote: Can I instead use a timediff, specifying microseconds in histograms.xml ...
4 years, 7 months ago (2016-05-16 16:25:50 UTC) #64
rkaplow
On 2016/05/16 16:25:50, Tom Anderson wrote: > On 2016/05/16 14:49:34, rkaplow wrote: > > Can ...
4 years, 7 months ago (2016-05-16 19:39:54 UTC) #65
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/220001
4 years, 7 months ago (2016-05-16 21:11:34 UTC) #67
Tom (Use chromium acct)
On 2016/05/16 19:39:54, rkaplow wrote: > On 2016/05/16 16:25:50, Tom Anderson wrote: > > On ...
4 years, 7 months ago (2016-05-16 21:12:05 UTC) #68
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-16 22:20:03 UTC) #70
rkaplow
lgtm
4 years, 7 months ago (2016-05-17 01:50:53 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949393007/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949393007/220001
4 years, 7 months ago (2016-05-17 01:58:35 UTC) #74
commit-bot: I haz the power
Committed patchset #11 (id:220001)
4 years, 7 months ago (2016-05-17 02:03:02 UTC) #75
commit-bot: I haz the power
4 years, 7 months ago (2016-05-17 02:04:11 UTC) #77
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86
Cr-Commit-Position: refs/heads/master@{#394018}

Powered by Google App Engine
This is Rietveld 408576698