OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/login/screen_locker.h" | 5 #include "chrome/browser/chromeos/login/screen_locker.h" |
6 | 6 |
7 #include <X11/extensions/XTest.h> | 7 #include <X11/extensions/XTest.h> |
8 #include <X11/keysym.h> | 8 #include <X11/keysym.h> |
9 #include <gdk/gdkkeysyms.h> | 9 #include <gdk/gdkkeysyms.h> |
10 #include <gdk/gdkx.h> | 10 #include <gdk/gdkx.h> |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
799 // Add the window to its own group so that its grab won't be stolen if | 799 // Add the window to its own group so that its grab won't be stolen if |
800 // gtk_grab_add() gets called on behalf on a non-screen-locker widget (e.g. | 800 // gtk_grab_add() gets called on behalf on a non-screen-locker widget (e.g. |
801 // a modal dialog) -- see http://crosbug.com/8999. We intentionally do this | 801 // a modal dialog) -- see http://crosbug.com/8999. We intentionally do this |
802 // after calling ClearGtkGrab(), as want to be in the default window group | 802 // after calling ClearGtkGrab(), as want to be in the default window group |
803 // then so we can break any existing GTK grabs. | 803 // then so we can break any existing GTK grabs. |
804 GtkWindowGroup* window_group = gtk_window_group_new(); | 804 GtkWindowGroup* window_group = gtk_window_group_new(); |
805 gtk_window_group_add_window(window_group, | 805 gtk_window_group_add_window(window_group, |
806 GTK_WINDOW(lock_window_->GetNativeView())); | 806 GTK_WINDOW(lock_window_->GetNativeView())); |
807 g_object_unref(window_group); | 807 g_object_unref(window_group); |
808 | 808 |
809 // Don't let X draw default background, which was causing flash on | |
810 // resume. | |
811 gdk_window_set_back_pixmap(lock_window_->GetNativeView()->window, | |
812 NULL, false); | |
813 gdk_window_set_back_pixmap(lock_widget_->GetNativeView()->window, | |
814 NULL, false); | |
oshima
2011/05/10 23:54:25
hmm, i wonder why I had two...
| |
815 lock_window->set_toplevel_focus_widget( | 809 lock_window->set_toplevel_focus_widget( |
816 static_cast<views::WidgetGtk*>(lock_widget_->native_widget())-> | 810 static_cast<views::WidgetGtk*>(lock_widget_->native_widget())-> |
817 window_contents()); | 811 window_contents()); |
818 | 812 |
819 // Create the SystemKeyEventListener so it can listen for system keyboard | 813 // Create the SystemKeyEventListener so it can listen for system keyboard |
820 // messages regardless of focus while screen locked. | 814 // messages regardless of focus while screen locked. |
821 SystemKeyEventListener::GetInstance(); | 815 SystemKeyEventListener::GetInstance(); |
822 } | 816 } |
823 | 817 |
824 void ScreenLocker::OnLoginFailure(const LoginFailure& error) { | 818 void ScreenLocker::OnLoginFailure(const LoginFailure& error) { |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1197 | 1191 |
1198 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { | 1192 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { |
1199 if (!background_view_->IsScreenSaverVisible()) { | 1193 if (!background_view_->IsScreenSaverVisible()) { |
1200 StartScreenSaver(); | 1194 StartScreenSaver(); |
1201 return true; | 1195 return true; |
1202 } | 1196 } |
1203 return false; | 1197 return false; |
1204 } | 1198 } |
1205 | 1199 |
1206 } // namespace chromeos | 1200 } // namespace chromeos |
OLD | NEW |