| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "views/widget/root_view.h" | 5 #include "views/widget/root_view.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // on the floor. | 59 // on the floor. |
| 60 // | 60 // |
| 61 // NOTE: We don't expand the region to paint to include | 61 // NOTE: We don't expand the region to paint to include |
| 62 // scheduled_dirty_rect as that results in us drawing on top of any GTK | 62 // scheduled_dirty_rect as that results in us drawing on top of any GTK |
| 63 // widgets that don't have a window. We have to schedule the paint through | 63 // widgets that don't have a window. We have to schedule the paint through |
| 64 // GTK so that such widgets are painted. | 64 // GTK so that such widgets are painted. |
| 65 SchedulePaintInRect(scheduled_dirty_rect, false); | 65 SchedulePaintInRect(scheduled_dirty_rect, false); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 void RootView::StartDragForViewFromMouseEvent( | |
| 70 View* view, | |
| 71 const OSExchangeData& data, | |
| 72 int operation) { | |
| 73 // NOTE: view may be null. | |
| 74 drag_view_ = view; | |
| 75 static_cast<WidgetGtk*>(GetWidget())->DoDrag(data, operation); | |
| 76 // If the view is removed during the drag operation, drag_view_ is set to | |
| 77 // NULL. | |
| 78 if (view && drag_view_ == view) { | |
| 79 View* drag_view = drag_view_; | |
| 80 drag_view_ = NULL; | |
| 81 drag_view->OnDragDone(); | |
| 82 } | |
| 83 } | |
| 84 | |
| 85 } | 69 } |
| OLD | NEW |