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

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

Issue 2326223002: Revert of Refactor X11ForeignWindowManager (Closed)
Patch Set: Created 4 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.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/x11_desktop_handler.h" 5 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "ui/aura/env.h" 12 #include "ui/aura/env.h"
13 #include "ui/aura/window_event_dispatcher.h" 13 #include "ui/aura/window_event_dispatcher.h"
14 #include "ui/base/x/x11_foreign_window_manager.h"
14 #include "ui/base/x/x11_menu_list.h" 15 #include "ui/base/x/x11_menu_list.h"
15 #include "ui/base/x/x11_util.h" 16 #include "ui/base/x/x11_util.h"
16 #include "ui/events/platform/platform_event_source.h" 17 #include "ui/events/platform/platform_event_source.h"
17 #include "ui/gfx/x/x11_error_tracker.h" 18 #include "ui/gfx/x/x11_error_tracker.h"
18 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 19 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
19 20
20 namespace { 21 namespace {
21 22
22 const char* const kAtomsToCache[] = { 23 const char* const kAtomsToCache[] = {
23 "_NET_CURRENT_DESKTOP", 24 "_NET_CURRENT_DESKTOP",
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // coordinates and stacking order to eliminate repeated calls to the X server 133 // coordinates and stacking order to eliminate repeated calls to the X server
133 // during mouse movement, drag and shaping events. 134 // during mouse movement, drag and shaping events.
134 if (event_type == CreateNotify) { 135 if (event_type == CreateNotify) {
135 // The window might be destroyed if the message pump did not get a chance to 136 // The window might be destroyed if the message pump did not get a chance to
136 // run but we can safely ignore the X error. 137 // run but we can safely ignore the X error.
137 gfx::X11ErrorTracker error_tracker; 138 gfx::X11ErrorTracker error_tracker;
138 ui::XMenuList::GetInstance()->MaybeRegisterMenu(window); 139 ui::XMenuList::GetInstance()->MaybeRegisterMenu(window);
139 } else { 140 } else {
140 ui::XMenuList::GetInstance()->MaybeUnregisterMenu(window); 141 ui::XMenuList::GetInstance()->MaybeUnregisterMenu(window);
141 } 142 }
143
144 if (event_type == DestroyNotify) {
145 // Notify the XForeignWindowManager that |window| has been destroyed.
146 ui::XForeignWindowManager::GetInstance()->OnWindowDestroyed(window);
147 }
142 } 148 }
143 149
144 } // namespace views 150 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698