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

Unified Diff: chrome/browser/chromeos/login/screen_locker.cc

Issue 2788001: Remove all grab widget in screen locker. (Closed)
Patch Set: fix comment and removed dlog Created 10 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index 45f670d1f4fbc8d195abdbab7b20d951abda0a72..8d67d3b4db86c91c9a9715b5c90728c172ffe2c3 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -16,17 +16,16 @@
#include "chrome/browser/chromeos/login/login_utils.h"
#include "chrome/browser/chromeos/login/message_bubble.h"
#include "chrome/browser/chromeos/login/screen_lock_view.h"
+#include "chrome/browser/chromeos/wm_ipc.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/common/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+#include "third_party/cros/chromeos_wm_ipc_enums.h"
#include "views/screen.h"
#include "views/widget/root_view.h"
#include "views/widget/widget_gtk.h"
-#include "chrome/browser/chromeos/wm_ipc.h"
-#include "third_party/cros/chromeos_wm_ipc_enums.h"
-
namespace {
// The maxium times that the screen locker should try to grab input,
// and its interval. It has to be able to grab all inputs in 30 seconds,
@@ -88,12 +87,15 @@ class GrabWidget : public views::WidgetGtk {
virtual void Show() {
views::WidgetGtk::Show();
- GtkWidget* current_grab_window = gtk_grab_get_current();
- if (current_grab_window)
+ GtkWidget* current_grab_window;
+ // Make sure there is no grab widget so that gtk simply propagates
+ // an event. This is necessary to allow message bubble and password
+ // field, button to process events simultaneously. GTK
+ // maintains grab widgets in a linked-list, so we need to remove
+ // until it's empty.
+ while ((current_grab_window = gtk_grab_get_current()) != NULL)
gtk_grab_remove(current_grab_window);
- gtk_grab_add(window_contents());
-
// Now steal all inputs.
TryGrabAllInputs();
}
@@ -190,7 +192,6 @@ class MouseEventRelay : public MessageLoopForUI::Observer {
virtual void DidProcessEvent(GdkEvent* event) {
if (event->any.window != src_) {
- DLOG(INFO) << "ignore event src non grab window: " << event->type;
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698