summaryrefslogtreecommitdiffstats
path: root/base/win
diff options
context:
space:
mode:
Diffstat (limited to 'base/win')
-rw-r--r--base/win/win_util.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index 7c106a2..3b6b1761 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -196,7 +196,10 @@ bool IsMachineATablet() {
if ((sm & kMultiTouch) == kMultiTouch) {
int cx = GetSystemMetrics(SM_CXSCREEN);
int cy = GetSystemMetrics(SM_CYSCREEN);
- return cx <= kMaxTabletScreenWidth && cy <= kMaxTabletScreenHeight;
+ // Handle landscape and portrait modes.
+ return cx > cy ?
+ (cx <= kMaxTabletScreenWidth && cy <= kMaxTabletScreenHeight) :
+ (cy <= kMaxTabletScreenWidth && cx <= kMaxTabletScreenHeight);
}
return false;
}