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

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

Issue 672823002: Remove IsDIPEnabled from Screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dpi-cleanup-1
Patch Set: rebase Created 6 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 DesktopScreenX11::~DesktopScreenX11() { 107 DesktopScreenX11::~DesktopScreenX11() {
108 if (has_xrandr_ && ui::PlatformEventSource::GetInstance()) 108 if (has_xrandr_ && ui::PlatformEventSource::GetInstance())
109 ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); 109 ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this);
110 } 110 }
111 111
112 //////////////////////////////////////////////////////////////////////////////// 112 ////////////////////////////////////////////////////////////////////////////////
113 // DesktopScreenX11, gfx::Screen implementation: 113 // DesktopScreenX11, gfx::Screen implementation:
114 114
115 bool DesktopScreenX11::IsDIPEnabled() {
116 return true;
117 }
118
119 gfx::Point DesktopScreenX11::GetCursorScreenPoint() { 115 gfx::Point DesktopScreenX11::GetCursorScreenPoint() {
120 TRACE_EVENT0("views", "DesktopScreenX11::GetCursorScreenPoint()"); 116 TRACE_EVENT0("views", "DesktopScreenX11::GetCursorScreenPoint()");
121 117
122 XDisplay* display = gfx::GetXDisplay(); 118 XDisplay* display = gfx::GetXDisplay();
123 119
124 ::Window root, child; 120 ::Window root, child;
125 int root_x, root_y, win_x, win_y; 121 int root_x, root_y, win_x, win_y;
126 unsigned int mask; 122 unsigned int mask;
127 XQueryPointer(display, 123 XQueryPointer(display,
128 DefaultRootWindow(display), 124 DefaultRootWindow(display),
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 change_notifier_.NotifyDisplaysChanged(old_displays, displays_); 358 change_notifier_.NotifyDisplaysChanged(old_displays, displays_);
363 } 359 }
364 360
365 //////////////////////////////////////////////////////////////////////////////// 361 ////////////////////////////////////////////////////////////////////////////////
366 362
367 gfx::Screen* CreateDesktopScreen() { 363 gfx::Screen* CreateDesktopScreen() {
368 return new DesktopScreenX11; 364 return new DesktopScreenX11;
369 } 365 }
370 366
371 } // namespace views 367 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698