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

Side by Side Diff: ui/base/x/x11_util.cc

Issue 9151007: GTK: Seal up GSEALs, focusing on GtkSelectionData. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add gtk_widget_style_attach to make minimal version 2.18 Created 8 years, 11 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/base/gtk/gtk_compat.h ('k') | ui/gfx/gtk_native_view_id_manager.cc » ('j') | 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 // This file defines utility functions for X11 (Linux only). This code has been 5 // This file defines utility functions for X11 (Linux only). This code has been
6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support 6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support
7 // remains woefully incomplete. 7 // remains woefully incomplete.
8 8
9 #include "ui/base/x/x11_util.h" 9 #include "ui/base/x/x11_util.h"
10 10
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 XID GetX11RootWindow() { 318 XID GetX11RootWindow() {
319 return DefaultRootWindow(GetXDisplay()); 319 return DefaultRootWindow(GetXDisplay());
320 } 320 }
321 321
322 bool GetCurrentDesktop(int* desktop) { 322 bool GetCurrentDesktop(int* desktop) {
323 return GetIntProperty(GetX11RootWindow(), "_NET_CURRENT_DESKTOP", desktop); 323 return GetIntProperty(GetX11RootWindow(), "_NET_CURRENT_DESKTOP", desktop);
324 } 324 }
325 325
326 #if defined(TOOLKIT_USES_GTK) 326 #if defined(TOOLKIT_USES_GTK)
327 XID GetX11WindowFromGtkWidget(GtkWidget* widget) { 327 XID GetX11WindowFromGtkWidget(GtkWidget* widget) {
328 return GDK_WINDOW_XID(widget->window); 328 return GDK_WINDOW_XID(gtk_widget_get_window(widget));
329 } 329 }
330 330
331 XID GetX11WindowFromGdkWindow(GdkWindow* window) { 331 XID GetX11WindowFromGdkWindow(GdkWindow* window) {
332 return GDK_WINDOW_XID(window); 332 return GDK_WINDOW_XID(window);
333 } 333 }
334 334
335 GtkWindow* GetGtkWindowFromX11Window(XID xid) { 335 GtkWindow* GetGtkWindowFromX11Window(XID xid) {
336 GdkWindow* gdk_window = 336 GdkWindow* gdk_window =
337 gdk_x11_window_lookup_for_display(gdk_display_get_default(), xid); 337 gdk_x11_window_lookup_for_display(gdk_display_get_default(), xid);
338 if (!gdk_window) 338 if (!gdk_window)
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 << "request_code " << static_cast<int>(error_event.request_code) << ", " 1089 << "request_code " << static_cast<int>(error_event.request_code) << ", "
1090 << "minor_code " << static_cast<int>(error_event.minor_code) 1090 << "minor_code " << static_cast<int>(error_event.minor_code)
1091 << " (" << request_str << ")"; 1091 << " (" << request_str << ")";
1092 } 1092 }
1093 1093
1094 // ---------------------------------------------------------------------------- 1094 // ----------------------------------------------------------------------------
1095 // End of x11_util_internal.h 1095 // End of x11_util_internal.h
1096 1096
1097 1097
1098 } // namespace ui 1098 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/gtk/gtk_compat.h ('k') | ui/gfx/gtk_native_view_id_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698