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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2298953003: Handle XI_Enter and XI_Leave events. (Closed)
Patch Set: Fix. Created 4 years, 3 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/x/events_x_utils.cc ('k') | no next file » | 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/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 if (!factory->ShouldProcessXI2Event(xev)) 2052 if (!factory->ShouldProcessXI2Event(xev))
2053 break; 2053 break;
2054 2054
2055 XIEnterEvent* enter_event = static_cast<XIEnterEvent*>(xev->xcookie.data); 2055 XIEnterEvent* enter_event = static_cast<XIEnterEvent*>(xev->xcookie.data);
2056 switch (static_cast<XIEvent*>(xev->xcookie.data)->evtype) { 2056 switch (static_cast<XIEvent*>(xev->xcookie.data)->evtype) {
2057 case XI_Enter: 2057 case XI_Enter:
2058 case XI_Leave: 2058 case XI_Leave:
2059 OnCrossingEvent(enter_event->evtype == XI_Enter, enter_event->focus, 2059 OnCrossingEvent(enter_event->evtype == XI_Enter, enter_event->focus,
2060 XI2ModeToXMode(enter_event->mode), 2060 XI2ModeToXMode(enter_event->mode),
2061 enter_event->detail); 2061 enter_event->detail);
2062 break; 2062 return ui::POST_DISPATCH_STOP_PROPAGATION;
2063 case XI_FocusIn: 2063 case XI_FocusIn:
2064 case XI_FocusOut: 2064 case XI_FocusOut:
2065 OnFocusEvent(enter_event->evtype == XI_FocusIn, 2065 OnFocusEvent(enter_event->evtype == XI_FocusIn,
2066 XI2ModeToXMode(enter_event->mode), enter_event->detail); 2066 XI2ModeToXMode(enter_event->mode), enter_event->detail);
2067 break; 2067 return ui::POST_DISPATCH_STOP_PROPAGATION;
2068 default: 2068 default:
2069 break; 2069 break;
2070 } 2070 }
2071 2071
2072 ui::EventType type = ui::EventTypeFromNative(xev); 2072 ui::EventType type = ui::EventTypeFromNative(xev);
2073 XEvent last_event; 2073 XEvent last_event;
2074 int num_coalesced = 0; 2074 int num_coalesced = 0;
2075 2075
2076 switch (type) { 2076 switch (type) {
2077 case ui::ET_TOUCH_MOVED: 2077 case ui::ET_TOUCH_MOVED:
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 if (linux_ui) { 2308 if (linux_ui) {
2309 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 2309 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
2310 if (native_theme) 2310 if (native_theme)
2311 return native_theme; 2311 return native_theme;
2312 } 2312 }
2313 2313
2314 return ui::NativeThemeAura::instance(); 2314 return ui::NativeThemeAura::instance();
2315 } 2315 }
2316 2316
2317 } // namespace views 2317 } // namespace views
OLDNEW
« no previous file with comments | « ui/events/x/events_x_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698