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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 379773003: Simplify the logic in DesktopWindowTreeHostX11 for FocusOut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.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/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 } 1588 }
1589 case ui::ET_UNKNOWN: 1589 case ui::ET_UNKNOWN:
1590 // No event is created for X11-release events for mouse-wheel buttons. 1590 // No event is created for X11-release events for mouse-wheel buttons.
1591 break; 1591 break;
1592 default: 1592 default:
1593 NOTREACHED() << event_type; 1593 NOTREACHED() << event_type;
1594 } 1594 }
1595 break; 1595 break;
1596 } 1596 }
1597 case FocusOut: 1597 case FocusOut:
1598 if (xev->xfocus.mode != NotifyGrab) { 1598 ReleaseCapture();
1599 ReleaseCapture(); 1599 X11DesktopHandler::get()->ProcessXEvent(xev);
1600 OnHostLostWindowCapture();
1601 X11DesktopHandler::get()->ProcessXEvent(xev);
1602 } else {
1603 dispatcher()->OnHostLostMouseGrab();
1604 }
1605 break; 1600 break;
1606 case FocusIn: 1601 case FocusIn:
1607 X11DesktopHandler::get()->ProcessXEvent(xev); 1602 X11DesktopHandler::get()->ProcessXEvent(xev);
1608 break; 1603 break;
1609 case ConfigureNotify: { 1604 case ConfigureNotify: {
1610 DCHECK_EQ(xwindow_, xev->xconfigure.window); 1605 DCHECK_EQ(xwindow_, xev->xconfigure.window);
1611 DCHECK_EQ(xwindow_, xev->xconfigure.event); 1606 DCHECK_EQ(xwindow_, xev->xconfigure.event);
1612 // It's possible that the X window may be resized by some other means than 1607 // It's possible that the X window may be resized by some other means than
1613 // from within aura (e.g. the X window manager can change the size). Make 1608 // from within aura (e.g. the X window manager can change the size). Make
1614 // sure the root window size is maintained properly. 1609 // sure the root window size is maintained properly.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 if (linux_ui) { 1815 if (linux_ui) {
1821 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 1816 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
1822 if (native_theme) 1817 if (native_theme)
1823 return native_theme; 1818 return native_theme;
1824 } 1819 }
1825 1820
1826 return ui::NativeTheme::instance(); 1821 return ui::NativeTheme::instance();
1827 } 1822 }
1828 1823
1829 } // namespace views 1824 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698