aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/views/unix
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-19 23:06:00 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-19 23:06:00 +0000
commit5e4fe216892927ae81edd7a22b2b00521920f2f3 (patch)
treedeb6719e25efa694a38f39744f55ecb25e59c06d /src/views/unix
parentd1f1b67f5eab110fa0c47c082776d9da1c5fba86 (diff)
Fix shift detection in views on X.
On X, the meta keys are encoded in xkey.state, not xkey.keycode. This fixes 'h' and 's' not working in SampleApp. git-svn-id: http://skia.googlecode.com/svn/trunk@9694 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/views/unix')
-rw-r--r--src/views/unix/SkOSWindow_Unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/views/unix/SkOSWindow_Unix.cpp b/src/views/unix/SkOSWindow_Unix.cpp
index 17339010b5..dc51f6421b 100644
--- a/src/views/unix/SkOSWindow_Unix.cpp
+++ b/src/views/unix/SkOSWindow_Unix.cpp
@@ -225,7 +225,7 @@ SkOSWindow::NextXEventResult SkOSWindow::nextXEvent() {
SkView::Click::kMoved_State, NULL, getModi(evt));
break;
case KeyPress: {
- int shiftLevel = (evt.xkey.keycode & ShiftMask) ? 1 : 0;
+ int shiftLevel = (evt.xkey.state & ShiftMask) ? 1 : 0;
KeySym keysym = XkbKeycodeToKeysym(dsp, evt.xkey.keycode,
0, shiftLevel);
if (keysym == XK_Escape) {