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

Side by Side Diff: ui/views/widget/x11_desktop_handler.cc

Issue 10913253: aura: Make sure the root-window retains the X events it was already listening for. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 8 years, 3 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/views/widget/x11_desktop_handler.h" 5 #include "ui/views/widget/x11_desktop_handler.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "ui/aura/desktop/desktop_activation_client.h" 8 #include "ui/aura/desktop/desktop_activation_client.h"
9 #include "ui/aura/env.h" 9 #include "ui/aura/env.h"
10 #include "ui/aura/focus_manager.h" 10 #include "ui/aura/focus_manager.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 int window; 67 int window;
68 if (ui::GetIntProperty(x_root_window_, "_NET_ACTIVE_WINDOW", &window) && 68 if (ui::GetIntProperty(x_root_window_, "_NET_ACTIVE_WINDOW", &window) &&
69 window) { 69 window) {
70 OnActiveWindowChanged(static_cast< ::Window>(window)); 70 OnActiveWindowChanged(static_cast< ::Window>(window));
71 } 71 }
72 } 72 }
73 break; 73 break;
74 } 74 }
75 } 75 }
76 76
77 return false; 77 return true;
78 } 78 }
79 79
80 void X11DesktopHandler::OnWindowInitialized(aura::Window* window) { 80 void X11DesktopHandler::OnWindowInitialized(aura::Window* window) {
81 } 81 }
82 82
83 void X11DesktopHandler::OnWillDestroyEnv() { 83 void X11DesktopHandler::OnWillDestroyEnv() {
84 g_handler = NULL; 84 g_handler = NULL;
85 delete this; 85 delete this;
86 } 86 }
87 87
88 // This code should live elsewhere and should only trigger if a non-RootWindow 88 // This code should live elsewhere and should only trigger if a non-RootWindow
89 // has been selected. 89 // has been selected.
90 void X11DesktopHandler::OnActiveWindowChanged(::Window xid) { 90 void X11DesktopHandler::OnActiveWindowChanged(::Window xid) {
91 aura::RootWindow* root_window = 91 aura::RootWindow* root_window =
92 aura::RootWindow::GetForAcceleratedWidget(xid); 92 aura::RootWindow::GetForAcceleratedWidget(xid);
93 aura::Window* window = root_window ? 93 aura::Window* window = root_window ?
94 views::DesktopNativeWidgetHelperAura::GetViewsWindowForRootWindow( 94 views::DesktopNativeWidgetHelperAura::GetViewsWindowForRootWindow(
95 root_window) : NULL; 95 root_window) : NULL;
96 96
97 desktop_activation_client_->ActivateWindow(window); 97 desktop_activation_client_->ActivateWindow(window);
98 } 98 }
99 99
100 } // namespace views 100 } // namespace views
OLDNEW
« ui/aura/root_window_host_linux.cc ('K') | « ui/aura/root_window_host_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698