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/aura/root_window_host_linux.h" | 5 #include "ui/aura/root_window_host_linux.h" |
6 | 6 |
7 #include <X11/cursorfont.h> | 7 #include <X11/cursorfont.h> |
8 #include <X11/extensions/Xfixes.h> | 8 #include <X11/extensions/Xfixes.h> |
9 #include <X11/extensions/XInput2.h> | 9 #include <X11/extensions/XInput2.h> |
10 #include <X11/extensions/Xrandr.h> | 10 #include <X11/extensions/Xrandr.h> |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 break; | 318 break; |
319 } | 319 } |
320 } // fallthrough | 320 } // fallthrough |
321 case ButtonRelease: { | 321 case ButtonRelease: { |
322 ui::MouseEvent mouseev(xev); | 322 ui::MouseEvent mouseev(xev); |
323 TranslateAndDispatchMouseEvent(&mouseev); | 323 TranslateAndDispatchMouseEvent(&mouseev); |
324 break; | 324 break; |
325 } | 325 } |
326 case FocusOut: | 326 case FocusOut: |
327 if (xev->xfocus.mode != NotifyGrab) | 327 if (xev->xfocus.mode != NotifyGrab) |
328 delegate_->OnHostLostCapture(); | 328 delegate_->OnHostLostWindowCapture(); |
329 break; | 329 break; |
330 case ConfigureNotify: { | 330 case ConfigureNotify: { |
331 DCHECK_EQ(xwindow_, xev->xconfigure.event); | 331 DCHECK_EQ(xwindow_, xev->xconfigure.event); |
332 DCHECK_EQ(xwindow_, xev->xconfigure.window); | 332 DCHECK_EQ(xwindow_, xev->xconfigure.window); |
333 // It's possible that the X window may be resized by some other means | 333 // It's possible that the X window may be resized by some other means |
334 // than from within aura (e.g. the X window manager can change the | 334 // than from within aura (e.g. the X window manager can change the |
335 // size). Make sure the root window size is maintained properly. | 335 // size). Make sure the root window size is maintained properly. |
336 gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y, | 336 gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y, |
337 xev->xconfigure.width, xev->xconfigure.height); | 337 xev->xconfigure.width, xev->xconfigure.height); |
338 bool size_changed = bounds_.size() != bounds.size(); | 338 bool size_changed = bounds_.size() != bounds.size(); |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 return new RootWindowHostLinux(bounds); | 861 return new RootWindowHostLinux(bounds); |
862 } | 862 } |
863 | 863 |
864 // static | 864 // static |
865 gfx::Size RootWindowHost::GetNativeScreenSize() { | 865 gfx::Size RootWindowHost::GetNativeScreenSize() { |
866 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); | 866 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); |
867 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 867 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
868 } | 868 } |
869 | 869 |
870 } // namespace aura | 870 } // namespace aura |
OLD | NEW |