summaryrefslogtreecommitdiffstats
path: root/chrome/browser/process_singleton_linux.cc
diff options
context:
space:
mode:
authordavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 17:00:34 +0000
committerdavidben@chromium.org <davidben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-30 17:00:34 +0000
commit938ddcaf07183384815094f391e3898f4a237686 (patch)
tree756ec3b55262e14c32199878c5e6140834004420 /chrome/browser/process_singleton_linux.cc
parent7e0e63c54d9c799888e22b7aadd33d1ae066f3b9 (diff)
downloadchromium_src-938ddcaf07183384815094f391e3898f4a237686.zip
chromium_src-938ddcaf07183384815094f391e3898f4a237686.tar.gz
chromium_src-938ddcaf07183384815094f391e3898f4a237686.tar.bz2
When running as a remote, call gdk_notify_startup_complete
Linux programs are expected to notify their launcher when they finish loading. GTK+ does this automatically when the first GtkWindow is opened. When acting as a remote, no window is opened, so we should manually send the notification. This could perhaps be more thorough and pass DESKTOP_LAUNCH_ID to the remote to call with gdk_notify_startup_complete_with_id, but a quick survey on codesearch suggests that no one bothers anyway. (This is reproducible in KDE. The bug report suggests some configurations of GNOME need this as well, but not yet reproducible.) R=estade BUG=45392 TEST=throbber disappears on second Chrome launch in KDE Review URL: http://codereview.chromium.org/3051023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/process_singleton_linux.cc')
-rw-r--r--chrome/browser/process_singleton_linux.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index bfd6539..885ed375 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -33,6 +33,7 @@
#include <errno.h>
#include <fcntl.h>
+#include <gdk/gdk.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/stat.h>
@@ -780,6 +781,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
// The other process is shutting down, it's safe to start a new process.
return PROCESS_NONE;
} else if (strncmp(buf, kACKToken, arraysize(kACKToken) - 1) == 0) {
+ // Notify the window manager that we've started up; if we do not open a
+ // window, GTK will not automatically call this for us.
+ gdk_notify_startup_complete();
// Assume the other process is handling the request.
return PROCESS_NOTIFIED;
}