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

Unified Diff: ui/base/gtk/gdk_x_compat.h

Issue 8632021: GTK: Port to gdk_x11_window_lookup_for_display (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Put GDK X11 compatability in another file Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/base/x/active_window_watcher_x.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gtk/gdk_x_compat.h
diff --git a/ui/base/gtk/gdk_x_compat.h b/ui/base/gtk/gdk_x_compat.h
new file mode 100644
index 0000000000000000000000000000000000000000..d304bb98cbb741d8db0ab6f43fe81821f5fc96b2
--- /dev/null
+++ b/ui/base/gtk/gdk_x_compat.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_BASE_GTK_GDK_X_COMPAT_H_
+#define UI_BASE_GTK_GDK_X_COMPAT_H_
+#pragma once
+
+#include <gdk/gdkx.h>
+
+// Google Chrome must depend on GTK 2.18, at least until the next LTS drops
+// (and we might have to extend which version of GTK we want to target due to
+// RHEL). To make our porting job for GTK3 easier, we define all the methods
+// that replace deprecated APIs in this file and then include it everywhere.
+//
+// This file is organized first by version, and then with each version,
+// alphabetically by method.
+
+#if !GTK_CHECK_VERSION(2, 24, 0)
+inline GdkWindow* gdk_x11_window_lookup_for_display(GdkDisplay* display,
+ Window window) {
+ return static_cast<GdkWindow*>(gdk_xid_table_lookup_for_display(display,
+ window));
+}
+#endif
+
+#endif // UI_BASE_GTK_GDK_X_COMPAT_H_
« no previous file with comments | « no previous file | ui/base/x/active_window_watcher_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698