| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ash/host/ash_window_tree_host_x11.h" | 5 #include "ash/host/ash_window_tree_host_x11.h" |
| 6 | 6 |
| 7 #include <X11/extensions/Xfixes.h> | 7 #include <X11/extensions/Xfixes.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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 window()->SetEventTargeter( | 113 window()->SetEventTargeter( |
| 114 std::unique_ptr<ui::EventTargeter>(new ui::NullEventTargeter)); | 114 std::unique_ptr<ui::EventTargeter>(new ui::NullEventTargeter)); |
| 115 | 115 |
| 116 if (ui::PlatformEventSource::GetInstance()) { | 116 if (ui::PlatformEventSource::GetInstance()) { |
| 117 // Block X events which are not turned into ui::Events from getting | 117 // Block X events which are not turned into ui::Events from getting |
| 118 // processed. (e.g. ConfigureNotify) | 118 // processed. (e.g. ConfigureNotify) |
| 119 ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); | 119 ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 void AshWindowTreeHostX11::SetBounds(const gfx::Rect& bounds) { | 123 void AshWindowTreeHostX11::SetBoundsInPixel(const gfx::Rect& bounds) { |
| 124 WindowTreeHostX11::SetBounds(bounds); | 124 WindowTreeHostX11::SetBounds(bounds); |
| 125 if (pointer_barriers_) { | 125 if (pointer_barriers_) { |
| 126 UnConfineCursor(); | 126 UnConfineCursor(); |
| 127 ConfineCursorToRootWindow(); | 127 ConfineCursorToRootWindow(); |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 gfx::Transform AshWindowTreeHostX11::GetRootTransform() const { | 131 gfx::Transform AshWindowTreeHostX11::GetRootTransform() const { |
| 132 return transformer_helper_.GetTransform(); | 132 return transformer_helper_.GetTransform(); |
| 133 } | 133 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 continue; | 249 continue; |
| 250 XFree(data); | 250 XFree(data); |
| 251 XIChangeProperty(xdisplay(), dev_list[i].deviceid, prop, XA_INTEGER, 8, | 251 XIChangeProperty(xdisplay(), dev_list[i].deviceid, prop, XA_INTEGER, 8, |
| 252 PropModeReplace, &value, 1); | 252 PropModeReplace, &value, 1); |
| 253 } | 253 } |
| 254 } | 254 } |
| 255 } | 255 } |
| 256 #endif // defined(OS_CHROMEOS) | 256 #endif // defined(OS_CHROMEOS) |
| 257 | 257 |
| 258 } // namespace ash | 258 } // namespace ash |
| OLD | NEW |