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
3 // found in the LICENSE file.
5 #include "ui/aura/device_list_updater_aurax11.h"
7 #include <X11/extensions/XInput2.h>
9 #include "ui/events/event_utils.h"
13 DeviceListUpdaterAuraX11::DeviceListUpdaterAuraX11() {}
15 DeviceListUpdaterAuraX11::~DeviceListUpdaterAuraX11() {}
17 base::EventStatus
DeviceListUpdaterAuraX11::WillProcessEvent(
18 const base::NativeEvent
& event
) {
19 // XI_HierarchyChanged events are special. There is no window associated with
20 // these events. So process them directly from here.
21 if (event
->type
== GenericEvent
&&
22 event
->xgeneric
.evtype
== XI_HierarchyChanged
) {
23 ui::UpdateDeviceList();
26 return base::EVENT_CONTINUE
;
29 void DeviceListUpdaterAuraX11::DidProcessEvent(const base::NativeEvent
& event
) {