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

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

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 years, 4 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
« no previous file with comments | « ui/events/win/events_win.cc ('k') | ui/events/x/events_x_unittest.cc » ('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/events/event_constants.h" 5 #include "ui/events/event_constants.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <string.h> 8 #include <string.h>
9 #include <X11/extensions/XInput.h> 9 #include <X11/extensions/XInput.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 default: 615 default:
616 NOTREACHED(); 616 NOTREACHED();
617 break; 617 break;
618 } 618 }
619 KeySym keysym = XK_VoidSymbol; 619 KeySym keysym = XK_VoidSymbol;
620 if (xkey) 620 if (xkey)
621 XLookupString(xkey, NULL, 0, &keysym, NULL); 621 XLookupString(xkey, NULL, 0, &keysym, NULL);
622 return keysym; 622 return keysym;
623 } 623 }
624 624
625 bool IsCharFromNative(const base::NativeEvent& native_event) {
626 return false;
627 }
628
625 int GetChangedMouseButtonFlagsFromNative( 629 int GetChangedMouseButtonFlagsFromNative(
626 const base::NativeEvent& native_event) { 630 const base::NativeEvent& native_event) {
627 switch (native_event->type) { 631 switch (native_event->type) {
628 case ButtonPress: 632 case ButtonPress:
629 case ButtonRelease: 633 case ButtonRelease:
630 return GetEventFlagsFromXState(native_event->xbutton.state); 634 return GetEventFlagsFromXState(native_event->xbutton.state);
631 case GenericEvent: { 635 case GenericEvent: {
632 XIDeviceEvent* xievent = 636 XIDeviceEvent* xievent =
633 static_cast<XIDeviceEvent*>(native_event->xcookie.data); 637 static_cast<XIDeviceEvent*>(native_event->xcookie.data);
634 switch (xievent->evtype) { 638 switch (xievent->evtype) {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 start_time = &start_time_; 817 start_time = &start_time_;
814 if (!end_time) 818 if (!end_time)
815 end_time = &end_time_; 819 end_time = &end_time_;
816 820
817 DeviceDataManagerX11::GetInstance()->GetGestureTimes( 821 DeviceDataManagerX11::GetInstance()->GetGestureTimes(
818 native_event, start_time, end_time); 822 native_event, start_time, end_time);
819 return true; 823 return true;
820 } 824 }
821 825
822 } // namespace ui 826 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/win/events_win.cc ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698