| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
| 10 | 10 |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 move_loop_->EndMoveLoop(); | 674 move_loop_->EndMoveLoop(); |
| 675 return; | 675 return; |
| 676 } | 676 } |
| 677 source_state_ = SOURCE_STATE_DROPPED; | 677 source_state_ = SOURCE_STATE_DROPPED; |
| 678 SendXdndDrop(source_window); | 678 SendXdndDrop(source_window); |
| 679 return; | 679 return; |
| 680 } | 680 } |
| 681 | 681 |
| 682 int cursor_type = ui::kCursorNull; | 682 int cursor_type = ui::kCursorNull; |
| 683 switch (negotiated_operation_) { | 683 switch (negotiated_operation_) { |
| 684 case ui::DragDropTypes::DRAG_COPY: | 684 case ui::DragDropTypes::DRAG_NONE: |
| 685 cursor_type = ui::kCursorCopy; | 685 cursor_type = ui::kCursorDndNone; |
| 686 break; | 686 break; |
| 687 case ui::DragDropTypes::DRAG_MOVE: | 687 case ui::DragDropTypes::DRAG_MOVE: |
| 688 cursor_type = ui::kCursorMove; | 688 cursor_type = ui::kCursorDndMove; |
| 689 break; | 689 break; |
| 690 default: | 690 case ui::DragDropTypes::DRAG_COPY: |
| 691 cursor_type = ui::kCursorGrabbing; | 691 cursor_type = ui::kCursorDndCopy; |
| 692 break; |
| 693 case ui::DragDropTypes::DRAG_LINK: |
| 694 cursor_type = ui::kCursorDndLink; |
| 692 break; | 695 break; |
| 693 } | 696 } |
| 694 move_loop_->UpdateCursor(cursor_manager_->GetInitializedCursor(cursor_type)); | 697 move_loop_->UpdateCursor(cursor_manager_->GetInitializedCursor(cursor_type)); |
| 695 | 698 |
| 696 // Note: event.data.[2,3] specify a rectangle. It is a request by the other | 699 // Note: event.data.[2,3] specify a rectangle. It is a request by the other |
| 697 // window to not send further XdndPosition messages while the cursor is | 700 // window to not send further XdndPosition messages while the cursor is |
| 698 // within it. However, it is considered advisory and (at least according to | 701 // within it. However, it is considered advisory and (at least according to |
| 699 // the spec) the other side must handle further position messages within | 702 // the spec) the other side must handle further position messages within |
| 700 // it. GTK+ doesn't bother with this, so neither should we. | 703 // it. GTK+ doesn't bother with this, so neither should we. |
| 701 | 704 |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 for (int x = 0; x < in_bitmap->width(); ++x) { | 1359 for (int x = 0; x < in_bitmap->width(); ++x) { |
| 1357 if (SkColorGetA(in_row[x]) > kMinAlpha) | 1360 if (SkColorGetA(in_row[x]) > kMinAlpha) |
| 1358 return true; | 1361 return true; |
| 1359 } | 1362 } |
| 1360 } | 1363 } |
| 1361 | 1364 |
| 1362 return false; | 1365 return false; |
| 1363 } | 1366 } |
| 1364 | 1367 |
| 1365 } // namespace views | 1368 } // namespace views |
| OLD | NEW |