diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-30 00:12:58 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-30 00:12:58 +0000 |
commit | 732a0f086db4bfdfd29749c3a500af0405934b6f (patch) | |
tree | 9960ae8f4fcd2f11c499b4572a4bbb80f3327588 /chrome | |
parent | 08aab35037965c2d7d71263b453fda74fa48b378 (diff) | |
download | chromium_src-732a0f086db4bfdfd29749c3a500af0405934b6f.zip chromium_src-732a0f086db4bfdfd29749c3a500af0405934b6f.tar.gz chromium_src-732a0f086db4bfdfd29749c3a500af0405934b6f.tar.bz2 |
Keep loginwindow from flashing at startup
Review URL: http://codereview.chromium.org/554138
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37579 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/chromeos/login_manager_view.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/login_manager_view.cc b/chrome/browser/chromeos/login_manager_view.cc index f1589fa..4d6a76c 100644 --- a/chrome/browser/chromeos/login_manager_view.cc +++ b/chrome/browser/chromeos/login_manager_view.cc @@ -4,6 +4,7 @@ #include "chrome/browser/chromeos/login_manager_view.h" +#include <gdk/gdk.h> #include <signal.h> #include <sys/types.h> @@ -40,6 +41,10 @@ const SkColor kVersionColor = 0xFF7691DA; const SkColor kErrorColor = 0xFF8F384F; const char *kDefaultDomain = "@gmail.com"; +// There's a GdkBlankCursor defined in a later version of gdk. +// The version in cros is late enough to support it. +#define BlankCursor static_cast<GdkCursorType>(-2) + namespace browser { // Acts as a frame view with no UI. @@ -79,6 +84,13 @@ class LoginManagerWindow : public views::WindowGtk { login_manager_window->GetNonClientView()->SetFrameView( new LoginManagerNonClientFrameView()); login_manager_window->Init(NULL, gfx::Rect()); + + // This keeps the window from flashing at startup. + GdkWindow* gdk_window = + GTK_WIDGET(login_manager_window->GetNativeWindow())->window; + gdk_window_set_back_pixmap(gdk_window, NULL, false); + // Hide the cursor initially. + gdk_window_set_cursor(gdk_window, gdk_cursor_new(BlankCursor)); return login_manager_window; } |