OLD | NEW |
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/x11_window_event_filter.h" | 5 #include "ui/views/widget/x11_window_event_filter.h" |
6 | 6 |
7 #include <X11/extensions/XInput.h> | 7 #include <X11/extensions/XInput.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/Xlib.h> | 10 #include <X11/Xlib.h> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 "_NET_WM_MOVERESIZE", | 52 "_NET_WM_MOVERESIZE", |
53 NULL | 53 NULL |
54 }; | 54 }; |
55 | 55 |
56 } // namespace | 56 } // namespace |
57 | 57 |
58 namespace views { | 58 namespace views { |
59 | 59 |
60 X11WindowEventFilter::X11WindowEventFilter( | 60 X11WindowEventFilter::X11WindowEventFilter( |
61 aura::RootWindow* root_window, | 61 aura::RootWindow* root_window, |
62 aura::DesktopActivationClient* activation_client, | 62 aura::DesktopActivationClient* activation_client) |
63 NativeWidgetAura* widget) | 63 : activation_client_(activation_client), |
64 : widget_(widget), | |
65 activation_client_(activation_client), | |
66 xdisplay_(base::MessagePumpAuraX11::GetDefaultXDisplay()), | 64 xdisplay_(base::MessagePumpAuraX11::GetDefaultXDisplay()), |
67 xwindow_(root_window->GetAcceleratedWidget()), | 65 xwindow_(root_window->GetAcceleratedWidget()), |
68 x_root_window_(DefaultRootWindow(xdisplay_)), | 66 x_root_window_(DefaultRootWindow(xdisplay_)), |
69 atom_cache_(xdisplay_, kAtomsToCache), | 67 atom_cache_(xdisplay_, kAtomsToCache), |
70 is_active_(false) { | 68 is_active_(false) { |
71 } | 69 } |
72 | 70 |
73 X11WindowEventFilter::~X11WindowEventFilter() { | 71 X11WindowEventFilter::~X11WindowEventFilter() { |
74 } | 72 } |
75 | 73 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 177 |
180 XSendEvent(xdisplay_, x_root_window_, False, | 178 XSendEvent(xdisplay_, x_root_window_, False, |
181 SubstructureRedirectMask | SubstructureNotifyMask, | 179 SubstructureRedirectMask | SubstructureNotifyMask, |
182 &event); | 180 &event); |
183 | 181 |
184 return true; | 182 return true; |
185 } | 183 } |
186 | 184 |
187 } // namespace views | 185 } // namespace views |
188 | 186 |
OLD | NEW |