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

Unified Diff: ui/base/x/active_window_watcher_x.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: 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 | « ui/base/gtk/gdk_x_compat.h ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/active_window_watcher_x.cc
diff --git a/ui/base/x/active_window_watcher_x.cc b/ui/base/x/active_window_watcher_x.cc
index 10cec2df2b17afa15050cfbd1da132b3569df7ac..f766488dc718f1c3ff9ab0ddf6702951abf859a1 100644
--- a/ui/base/x/active_window_watcher_x.cc
+++ b/ui/base/x/active_window_watcher_x.cc
@@ -6,6 +6,8 @@
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
+#include "ui/base/gtk/gtk_compat.h"
+#include "ui/base/gtk/gdk_x_compat.h"
#include "ui/base/x/active_window_watcher_x_observer.h"
#include "ui/base/x/root_window_property_watcher_x.h"
@@ -84,7 +86,8 @@ void ActiveWindowWatcherX::NotifyActiveWindowChanged() {
// reason.)
if (format == 32 && num_items == 1) {
int xid = *reinterpret_cast<int*>(property);
- GdkWindow* active_window = gdk_window_lookup(xid);
+ GdkDisplay* display = gdk_display_get_default();
+ GdkWindow* active_window = gdk_x11_window_lookup_for_display(display, xid);
FOR_EACH_OBSERVER(ActiveWindowWatcherXObserver, observers_,
ActiveWindowChanged(active_window));
}
« no previous file with comments | « ui/base/gtk/gdk_x_compat.h ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698