| 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 OnHostLostWindowCapture(); | 419 if (xev->xfocus.mode != NotifyGrab) |
| 420 OnHostLostWindowCapture(); |
| 420 break; | 421 break; |
| 421 case ConfigureNotify: { | 422 case ConfigureNotify: { |
| 422 DCHECK_EQ(xwindow_, xev->xconfigure.event); | 423 DCHECK_EQ(xwindow_, xev->xconfigure.event); |
| 423 DCHECK_EQ(xwindow_, xev->xconfigure.window); | 424 DCHECK_EQ(xwindow_, xev->xconfigure.window); |
| 424 // It's possible that the X window may be resized by some other means | 425 // It's possible that the X window may be resized by some other means |
| 425 // than from within aura (e.g. the X window manager can change the | 426 // than from within aura (e.g. the X window manager can change the |
| 426 // size). Make sure the root window size is maintained properly. | 427 // size). Make sure the root window size is maintained properly. |
| 427 gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y, | 428 gfx::Rect bounds(xev->xconfigure.x, xev->xconfigure.y, |
| 428 xev->xconfigure.width, xev->xconfigure.height); | 429 xev->xconfigure.width, xev->xconfigure.height); |
| 429 bool size_changed = bounds_.size() != bounds.size(); | 430 bool size_changed = bounds_.size() != bounds.size(); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 } | 727 } |
| 727 | 728 |
| 728 namespace test { | 729 namespace test { |
| 729 | 730 |
| 730 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 731 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
| 731 default_override_redirect = override_redirect; | 732 default_override_redirect = override_redirect; |
| 732 } | 733 } |
| 733 | 734 |
| 734 } // namespace test | 735 } // namespace test |
| 735 } // namespace aura | 736 } // namespace aura |
| OLD | NEW |