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

Unified Diff: chrome/browser/process_singleton_posix.cc

Issue 1949393007: X11: Better timestamp handling for _NET_ACTIVE_WINDOW (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/process_singleton_posix.cc
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
index d5394b857a367f8806f408c9d527cc7f5b53d96e..c877d38bbd47c135761caad09b8560a74de04d77 100644
--- a/chrome/browser/process_singleton_posix.cc
+++ b/chrome/browser/process_singleton_posix.cc
@@ -81,6 +81,7 @@
#include "base/timer/timer.h"
#include "build/build_config.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_thread.h"
@@ -91,6 +92,10 @@
#include "chrome/browser/ui/process_singleton_dialog_linux.h"
#endif
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#include "ui/events/platform/x11/x11_event_source.h"
+#endif
+
#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
#include "ui/views/linux_ui/linux_ui.h"
#endif
@@ -817,6 +822,13 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
base::PlatformThread::Sleep(sleep_interval);
}
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kWmUserTimeMs,
+ base::Uint64ToString(
+ ui::X11EventSource::GetInstance()->UpdateServerTime()));
+#endif
+
Tom (Use chromium acct) 2016/05/06 20:42:00 This doesn't seem like the best place to put this.
Elliot Glaysher 2016/05/06 21:13:13 I agree that this is really not a good place for t
Tom (Use chromium acct) 2016/05/06 22:09:43 Done.
timeval socket_timeout = TimeDeltaToTimeVal(timeout);
setsockopt(socket.fd(),
SOL_SOCKET,
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_browser_creator.cc » ('j') | ui/events/platform/x11/x11_event_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698