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

Side by Side Diff: ui/base/x/events_x.cc

Issue 10540123: Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/gfx/screen.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 (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/base/events.h" 5 #include "ui/base/events.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <X11/extensions/XInput.h> 8 #include <X11/extensions/XInput.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <X11/Xlib.h> 10 #include <X11/Xlib.h>
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 int y = static_cast<int>(xievent->event_y); 574 int y = static_cast<int>(xievent->event_y);
575 if (!CommandLine::ForCurrentProcess()->HasSwitch( 575 if (!CommandLine::ForCurrentProcess()->HasSwitch(
576 switches::kEnableTouchCalibration)) 576 switches::kEnableTouchCalibration))
577 return gfx::Point(x, y); 577 return gfx::Point(x, y);
578 // TODO(skuhne): Find a new home for these hardware dependent touch 578 // TODO(skuhne): Find a new home for these hardware dependent touch
579 // constants. 579 // constants.
580 // Note: These values have been found to be correct for the device I was 580 // Note: These values have been found to be correct for the device I was
581 // testing with. I have the feeling that the DPI resolution of the bezel is 581 // testing with. I have the feeling that the DPI resolution of the bezel is
582 // less then the dpi resolution over the visible part - which would explain 582 // less then the dpi resolution over the visible part - which would explain
583 // why the small value (50) is so wide compared to the entire area. 583 // why the small value (50) is so wide compared to the entire area.
584 gfx::Rect bounds = gfx::Screen::GetPrimaryMonitor().bounds_in_pixel(); 584 gfx::Rect bounds = gfx::Screen::GetPrimaryDisplay().bounds_in_pixel();
585 const int kLeftBorder = 50; 585 const int kLeftBorder = 50;
586 const int kRightBorder = 50; 586 const int kRightBorder = 50;
587 const int kBottomBorder = 50; 587 const int kBottomBorder = 50;
588 const int kTopBorder = 0; 588 const int kTopBorder = 0;
589 const int resolution_x = bounds.width(); 589 const int resolution_x = bounds.width();
590 const int resolution_y = bounds.height(); 590 const int resolution_y = bounds.height();
591 // The "grace area" (10% in this case) is to make it easier for the user to 591 // The "grace area" (10% in this case) is to make it easier for the user to
592 // navigate to the corner. 592 // navigate to the corner.
593 const double kGraceAreaFraction = 0.1; 593 const double kGraceAreaFraction = 0.1;
594 // Offset the x position to the real 594 // Offset the x position to the real
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 noop->xclient.format = 8; 979 noop->xclient.format = 8;
980 DCHECK(!noop->xclient.display); 980 DCHECK(!noop->xclient.display);
981 } 981 }
982 // Make sure we use atom from current xdisplay, which may 982 // Make sure we use atom from current xdisplay, which may
983 // change during the test. 983 // change during the test.
984 noop->xclient.message_type = GetNoopEventAtom(); 984 noop->xclient.message_type = GetNoopEventAtom();
985 return noop; 985 return noop;
986 } 986 }
987 987
988 } // namespace ui 988 } // namespace ui
OLDNEW
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/gfx/screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698