summaryrefslogtreecommitdiffstats
path: root/views/focus
diff options
context:
space:
mode:
Diffstat (limited to 'views/focus')
-rw-r--r--views/focus/accelerator_handler_gtk.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/views/focus/accelerator_handler_gtk.cc b/views/focus/accelerator_handler_gtk.cc
index 938dfcc..16984ab 100644
--- a/views/focus/accelerator_handler_gtk.cc
+++ b/views/focus/accelerator_handler_gtk.cc
@@ -30,6 +30,11 @@ bool AcceleratorHandler::Dispatch(GdkEvent* event) {
// with the top-level gtk widget.
WindowGtk* widget =
WidgetGtk::GetWindowForNative(reinterpret_cast<GtkWidget*>(ptr));
+ if (!widget) {
+ // During dnd we get events for windows we don't control (such as the
+ // window being dragged).
+ return true;
+ }
FocusManager* focus_manager = widget->GetFocusManager();
if (!focus_manager) {
NOTREACHED();