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

Side by Side Diff: ui/aura/desktop_host_linux.cc

Issue 8253001: aura: Some changes in Window and Desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/aura/desktop_host.h" 5 #include "ui/aura/desktop_host.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/message_pump_x.h" 8 #include "base/message_pump_x.h"
9 #include "ui/aura/desktop.h" 9 #include "ui/aura/desktop.h"
10 #include "ui/aura/event.h" 10 #include "ui/aura/event.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 case MotionNotify: { 91 case MotionNotify: {
92 MouseEvent mouseev(xev); 92 MouseEvent mouseev(xev);
93 handled = desktop_->OnMouseEvent(mouseev); 93 handled = desktop_->OnMouseEvent(mouseev);
94 break; 94 break;
95 } 95 }
96 96
97 case ConfigureNotify: { 97 case ConfigureNotify: {
98 DCHECK_EQ(xdisplay_, xev->xconfigure.display); 98 DCHECK_EQ(xdisplay_, xev->xconfigure.display);
99 DCHECK_EQ(xwindow_, xev->xconfigure.window); 99 DCHECK_EQ(xwindow_, xev->xconfigure.window);
100 DCHECK_EQ(xwindow_, xev->xconfigure.event); 100 DCHECK_EQ(xwindow_, xev->xconfigure.event);
101 desktop_->OnHostResized(gfx::Size(xev->xconfigure.width, 101
102 xev->xconfigure.height)); 102 // It's possible that the X window may be resized by some other means than
103 // from within aura (e.g. the X window manager can change the size). Make
104 // sure the desktop size is maintained properly.
105 gfx::Size size(xev->xconfigure.width, xev->xconfigure.height);
106 if (bounds_.size() != size)
107 bounds_.set_size(size);
108 desktop_->OnHostResized(size);
103 handled = true; 109 handled = true;
104 break; 110 break;
105 } 111 }
106 } 112 }
107 return handled ? EVENT_PROCESSED : EVENT_IGNORED; 113 return handled ? EVENT_PROCESSED : EVENT_IGNORED;
108 } 114 }
109 115
110 void DesktopHostLinux::SetDesktop(Desktop* desktop) { 116 void DesktopHostLinux::SetDesktop(Desktop* desktop) {
111 desktop_ = desktop; 117 desktop_ = desktop;
112 } 118 }
(...skipping 24 matching lines...) Expand all
137 } 143 }
138 144
139 } // namespace 145 } // namespace
140 146
141 // static 147 // static
142 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) { 148 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) {
143 return new DesktopHostLinux(bounds); 149 return new DesktopHostLinux(bounds);
144 } 150 }
145 151
146 } // namespace aura 152 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/desktop.cc ('k') | ui/aura/desktop_observer.h » ('j') | ui/aura/desktop_observer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698