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/window_tree_host_x11.h" | 5 #include "ui/aura/window_tree_host_x11.h" |
6 | 6 |
7 #include <strings.h> | 7 #include <strings.h> |
8 #include <X11/cursorfont.h> | 8 #include <X11/cursorfont.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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 } | 409 } |
410 | 410 |
411 switch (xev->type) { | 411 switch (xev->type) { |
412 case Expose: { | 412 case Expose: { |
413 gfx::Rect damage_rect(xev->xexpose.x, xev->xexpose.y, | 413 gfx::Rect damage_rect(xev->xexpose.x, xev->xexpose.y, |
414 xev->xexpose.width, xev->xexpose.height); | 414 xev->xexpose.width, xev->xexpose.height); |
415 compositor()->ScheduleRedrawRect(damage_rect); | 415 compositor()->ScheduleRedrawRect(damage_rect); |
416 break; | 416 break; |
417 } | 417 } |
418 case FocusOut: | 418 case FocusOut: |
419 if (xev->xfocus.mode != NotifyGrab) | 419 OnHostLostWindowCapture(); |
420 OnHostLostWindowCapture(); | |
421 break; | 420 break; |
422 case ConfigureNotify: { | 421 case ConfigureNotify: { |
423 DCHECK_EQ(xwindow_, xev->xconfigure.event); | 422 DCHECK_EQ(xwindow_, xev->xconfigure.event); |
424 DCHECK_EQ(xwindow_, xev->xconfigure.window); | 423 DCHECK_EQ(xwindow_, xev->xconfigure.window); |
425 // It's possible that the X window may be resized by some other means | 424 // It's possible that the X window may be resized by some other means |
426 // than from within aura (e.g. the X window manager can change the | 425 // than from within aura (e.g. the X window manager can change the |
427 // size). Make sure the root window size is maintained properly. | 426 // size). Make sure the root window size is maintained properly. |
428 gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y, | 427 gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y, |
429 xev->xconfigure.width, xev->xconfigure.height); | 428 xev->xconfigure.width, xev->xconfigure.height); |
430 bool size_changed = bounds_.size() != bounds.size(); | 429 bool size_changed = bounds_.size() != bounds.size(); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 } | 726 } |
728 | 727 |
729 namespace test { | 728 namespace test { |
730 | 729 |
731 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 730 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
732 default_override_redirect = override_redirect; | 731 default_override_redirect = override_redirect; |
733 } | 732 } |
734 | 733 |
735 } // namespace test | 734 } // namespace test |
736 } // namespace aura | 735 } // namespace aura |
OLD | NEW |