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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_screen_x11.cc

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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) 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_screen_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_screen_x11.h"
6 6
7 #include <X11/extensions/Xrandr.h> 7 #include <X11/extensions/Xrandr.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 // It clashes with out RootWindow. 10 // It clashes with out RootWindow.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // You'd think we'd be able to just call window->GetBoundsInScreen(), but we 187 // You'd think we'd be able to just call window->GetBoundsInScreen(), but we
188 // can't because |window| (and the associated RootWindow*) can be partially 188 // can't because |window| (and the associated RootWindow*) can be partially
189 // initialized at this point; RootWindow initializations call through into 189 // initialized at this point; RootWindow initializations call through into
190 // GetDisplayNearestWindow(). But the X11 resources are created before we 190 // GetDisplayNearestWindow(). But the X11 resources are created before we
191 // create the aura::RootWindow. So we ask what the DRWHX11 believes the 191 // create the aura::RootWindow. So we ask what the DRWHX11 believes the
192 // window bounds are instead of going through the aura::Window's screen 192 // window bounds are instead of going through the aura::Window's screen
193 // bounds. 193 // bounds.
194 aura::WindowEventDispatcher* dispatcher = window->GetDispatcher(); 194 aura::WindowEventDispatcher* dispatcher = window->GetDispatcher();
195 if (dispatcher) { 195 if (dispatcher) {
196 DesktopRootWindowHostX11* rwh = DesktopRootWindowHostX11::GetHostForXID( 196 DesktopRootWindowHostX11* rwh = DesktopRootWindowHostX11::GetHostForXID(
197 dispatcher->GetAcceleratedWidget()); 197 dispatcher->host()->GetAcceleratedWidget());
198 if (rwh) 198 if (rwh)
199 return GetDisplayMatching(rwh->GetX11RootWindowBounds()); 199 return GetDisplayMatching(rwh->GetX11RootWindowBounds());
200 } 200 }
201 201
202 return GetPrimaryDisplay(); 202 return GetPrimaryDisplay();
203 } 203 }
204 204
205 gfx::Display DesktopScreenX11::GetDisplayNearestPoint( 205 gfx::Display DesktopScreenX11::GetDisplayNearestPoint(
206 const gfx::Point& point) const { 206 const gfx::Point& point) const {
207 for (std::vector<gfx::Display>::const_iterator it = displays_.begin(); 207 for (std::vector<gfx::Display>::const_iterator it = displays_.begin();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 ProcessDisplayChange(new_displays); 348 ProcessDisplayChange(new_displays);
349 } 349 }
350 350
351 //////////////////////////////////////////////////////////////////////////////// 351 ////////////////////////////////////////////////////////////////////////////////
352 352
353 gfx::Screen* CreateDesktopScreen() { 353 gfx::Screen* CreateDesktopScreen() {
354 return new DesktopScreenX11; 354 return new DesktopScreenX11;
355 } 355 }
356 356
357 } // namespace views 357 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_win.cc ('k') | ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698