Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: ui/aura/window_tree_host_x11.cc

Issue 409223003: Revert of Simplify the logic in DesktopWindowTreeHostX11 for FocusOut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/aura/window_event_dispatcher.cc ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698