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

Side by Side Diff: services/ui/ws/server_window.cc

Issue 2680883002: Fixes bugs in cursor handling (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « services/ui/ws/event_dispatcher_delegate.h ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "services/ui/ws/server_window.h" 5 #include "services/ui/ws/server_window.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 13 matching lines...) Expand all
24 ServerWindow::ServerWindow(ServerWindowDelegate* delegate, 24 ServerWindow::ServerWindow(ServerWindowDelegate* delegate,
25 const WindowId& id, 25 const WindowId& id,
26 const Properties& properties) 26 const Properties& properties)
27 : delegate_(delegate), 27 : delegate_(delegate),
28 id_(id), 28 id_(id),
29 parent_(nullptr), 29 parent_(nullptr),
30 stacking_target_(nullptr), 30 stacking_target_(nullptr),
31 transient_parent_(nullptr), 31 transient_parent_(nullptr),
32 is_modal_(false), 32 is_modal_(false),
33 visible_(false), 33 visible_(false),
34 cursor_id_(mojom::Cursor::CURSOR_NULL), 34 // Default to POINTER as CURSOR_NULL doesn't change the cursor, it leaves
35 non_client_cursor_id_(mojom::Cursor::CURSOR_NULL), 35 // the last non-null cursor.
36 cursor_id_(mojom::Cursor::POINTER),
37 non_client_cursor_id_(mojom::Cursor::POINTER),
36 opacity_(1), 38 opacity_(1),
37 can_focus_(true), 39 can_focus_(true),
38 properties_(properties), 40 properties_(properties),
39 // Don't notify newly added observers during notification. This causes 41 // Don't notify newly added observers during notification. This causes
40 // problems for code that adds an observer as part of an observer 42 // problems for code that adds an observer as part of an observer
41 // notification (such as ServerWindowDrawTracker). 43 // notification (such as ServerWindowDrawTracker).
42 observers_( 44 observers_(
43 base::ObserverList<ServerWindowObserver>::NOTIFY_EXISTING_ONLY) { 45 base::ObserverList<ServerWindowObserver>::NOTIFY_EXISTING_ONLY) {
44 DCHECK(delegate); // Must provide a delegate. 46 DCHECK(delegate); // Must provide a delegate.
45 } 47 }
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 window->OnStackingChanged(); 477 window->OnStackingChanged();
476 } 478 }
477 479
478 // static 480 // static
479 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { 481 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) {
480 return &window->stacking_target_; 482 return &window->stacking_target_;
481 } 483 }
482 484
483 } // namespace ws 485 } // namespace ws
484 } // namespace ui 486 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/event_dispatcher_delegate.h ('k') | services/ui/ws/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698