[gtk+/gtk-2-22] [GdkWindowCache] Don't ignore the CompositeOverlayWindow
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-22] [GdkWindowCache] Don't ignore the CompositeOverlayWindow
- Date: Mon, 13 Sep 2010 16:21:48 +0000 (UTC)
commit 81ec8c7a1bcb9e9240f01054b6b72e804dade811
Author: Adel Gadllah <adel gadllah gmail com>
Date: Mon Sep 13 18:21:15 2010 +0200
[GdkWindowCache] Don't ignore the CompositeOverlayWindow
Add the composite overlay window to the cache, as this can be a reasonable Xdnd proxy as well.
This is only done when the screen is composited in order to avoid mapping
the COW. We assume that the CM is using the COW (which is true for pretty
much any CM currently in use).
https://bugzilla.gnome.org/show_bug.cgi?id=601731
gdk/x11/gdkdnd-x11.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index c0ad26d..cae510d 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -30,6 +30,7 @@
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
+#include <X11/extensions/Xcomposite.h>
#include <string.h>
@@ -520,6 +521,7 @@ gdk_window_cache_new (GdkScreen *screen)
GdkWindow *root_window = gdk_screen_get_root_window (screen);
GdkChildInfoX11 *children;
guint nchildren, i;
+ Window cow;
GdkWindowCache *result = g_new (GdkWindowCache, 1);
@@ -568,6 +570,20 @@ gdk_window_cache_new (GdkScreen *screen)
g_free (children);
+ /*
+ * Add the composite overlay window to the cache, as this can be a reasonable
+ * Xdnd proxy as well.
+ * This is only done when the screen is composited in order to avoid mapping
+ * the COW. We assume that the CM is using the COW (which is true for pretty
+ * much any CM currently in use).
+ */
+ if (gdk_screen_is_composited (screen))
+ {
+ cow = XCompositeGetOverlayWindow (xdisplay, GDK_WINDOW_XWINDOW (root_window));
+ gdk_window_cache_add (result, cow, 0, 0, gdk_screen_get_width (screen), gdk_screen_get_height (screen), TRUE);
+ XCompositeReleaseOverlayWindow (xdisplay, GDK_WINDOW_XWINDOW (root_window));
+ }
+
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]