summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/x11_util.cc4
-rw-r--r--chrome/common/x11_util.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/chrome/common/x11_util.cc b/chrome/common/x11_util.cc
index 0f74120..ec54f7b 100644
--- a/chrome/common/x11_util.cc
+++ b/chrome/common/x11_util.cc
@@ -82,6 +82,10 @@ bool QuerySharedMemorySupport(Display* dpy) {
return shared_memory_support;
}
+XID GetX11RootWindow() {
+ return GDK_WINDOW_XID(gdk_get_default_root_window());
+}
+
XID GetX11WindowFromGtkWidget(GtkWidget* widget) {
return GDK_WINDOW_XID(widget->window);
}
diff --git a/chrome/common/x11_util.h b/chrome/common/x11_util.h
index 130ecc7..6e5072b 100644
--- a/chrome/common/x11_util.h
+++ b/chrome/common/x11_util.h
@@ -30,6 +30,8 @@ namespace x11_util {
// These functions do not cache their results
+ // Get the X window id for the default root window
+ XID GetX11RootWindow();
// Get the X window id for the given GTK widget.
XID GetX11WindowFromGtkWidget(GtkWidget*);
// Get a Visual from the given widget. Since we don't include the Xlib