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

Side by Side Diff: ui/gfx/gtk_native_view_id_manager.cc

Issue 8632021: GTK: Port to gdk_x11_window_lookup_for_display (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Include gdkx.h needed for X11 symbols Created 9 years 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
« ui/base/gtk/gtk_compat.h ('K') | « ui/base/x/x11_util.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gfx/gtk_native_view_id_manager.h" 5 #include "ui/gfx/gtk_native_view_id_manager.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 #include <gdk/gdkx.h> 8 #include <gdk/gdkx.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 if (i == perm_xid_to_info_.end()) 167 if (i == perm_xid_to_info_.end())
168 return; 168 return;
169 169
170 if (i->second.ref_count > 1) { 170 if (i->second.ref_count > 1) {
171 i->second.ref_count--; 171 i->second.ref_count--;
172 } else { 172 } else {
173 if (i->second.widget) { 173 if (i->second.widget) {
174 gtk_preserve_window_set_preserve(i->second.widget, FALSE); 174 gtk_preserve_window_set_preserve(i->second.widget, FALSE);
175 } else { 175 } else {
176 GdkWindow* window = reinterpret_cast<GdkWindow*>( 176 GdkWindow* window = reinterpret_cast<GdkWindow*>(
177 gdk_xid_table_lookup(xid)); 177 gdk_x11_window_lookup_for_display(gdk_display_get_default(), xid));
178 DCHECK(window); 178 DCHECK(window);
179 gdk_window_destroy(window); 179 gdk_window_destroy(window);
180 } 180 }
181 perm_xid_to_info_.erase(i); 181 perm_xid_to_info_.erase(i);
182 } 182 }
183 } 183 }
184 184
185 // ----------------------------------------------------------------------------- 185 // -----------------------------------------------------------------------------
186 186
187 187
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 if (k != perm_xid_to_info_.end()) 243 if (k != perm_xid_to_info_.end())
244 k->second.widget = NULL; 244 k->second.widget = NULL;
245 } 245 }
246 246
247 native_view_to_id_.erase(i); 247 native_view_to_id_.erase(i);
248 id_to_info_.erase(j); 248 id_to_info_.erase(j);
249 } 249 }
250 250
251 // ----------------------------------------------------------------------------- 251 // -----------------------------------------------------------------------------
OLDNEW
« ui/base/gtk/gtk_compat.h ('K') | « ui/base/x/x11_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698