[gtk/wip/otte/build: 77/77] x11: Remove XComposite




commit a15f2302fde21fe0e91d2520a45793cd35c7d17b
Author: Benjamin Otte <otte redhat com>
Date:   Fri Apr 2 03:05:40 2021 +0200

    x11: Remove XComposite
    
    It's only used during DND to allow use of the root window's cow window
    as a DND target, because apparently gnome-shell used to think that was a
    great idea to DND to the overview.
    
    Somebody complain to gnome-shell devs about it not being a good idea if
    they want it fixed.
    Potentially using Wayland is a better idea though.
    
    This reverts 85ae875dcbfcfa3fbdca857dc90467d39b9ff0c5
    
    Related: https://bugzilla.gnome.org/show_bug.cgi?id=601731

 config.h.meson           |  3 ---
 gdk/x11/gdkdisplay-x11.c | 22 ----------------------
 gdk/x11/gdkdisplay-x11.h |  2 --
 gdk/x11/gdkdrag-x11.c    | 27 ---------------------------
 gdk/x11/meson.build      |  1 -
 meson.build              |  4 +---
 6 files changed, 1 insertion(+), 58 deletions(-)
---
diff --git a/config.h.meson b/config.h.meson
index 549a677379..ce736cdee3 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -121,9 +121,6 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #mesondefine HAVE_UNISTD_H
 
-/* Have the XCOMPOSITE X extension */
-#mesondefine HAVE_XCOMPOSITE
-
 /* Have the Xcursor library */
 #mesondefine HAVE_XCURSOR
 
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 4350f2eef8..a414369a84 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -69,10 +69,6 @@
 
 #include <X11/extensions/shape.h>
 
-#ifdef HAVE_XCOMPOSITE
-#include <X11/extensions/Xcomposite.h>
-#endif
-
 #ifdef HAVE_RANDR
 #include <X11/extensions/Xrandr.h>
 #endif
@@ -1455,24 +1451,6 @@ gdk_x11_display_open (const char *display_name)
 #endif
     display_x11->have_xfixes = FALSE;
 
-#ifdef HAVE_XCOMPOSITE
-  if (XCompositeQueryExtension (display_x11->xdisplay,
-                               &ignore, &ignore))
-    {
-      int major, minor;
-
-      XCompositeQueryVersion (display_x11->xdisplay, &major, &minor);
-
-      /* Prior to Composite version 0.4, composited windows clipped their
-       * parents, so you had to use IncludeInferiors to draw to the parent
-       * This isn't useful for our purposes, so require 0.4
-       */
-      display_x11->have_xcomposite = major > 0 || (major == 0 && minor >= 4);
-    }
-  else
-#endif
-    display_x11->have_xcomposite = FALSE;
-
   display_x11->have_shapes = FALSE;
   display_x11->have_input_shapes = FALSE;
 
diff --git a/gdk/x11/gdkdisplay-x11.h b/gdk/x11/gdkdisplay-x11.h
index 58eafeca61..9051f16842 100644
--- a/gdk/x11/gdkdisplay-x11.h
+++ b/gdk/x11/gdkdisplay-x11.h
@@ -71,8 +71,6 @@ struct _GdkX11Display
   gboolean have_xfixes;
   int xfixes_event_base;
 
-  gboolean have_xcomposite;
-
   gboolean have_randr12;
   gboolean have_randr13;
   gboolean have_randr15;
diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c
index d82d3a7d4b..1108554242 100644
--- a/gdk/x11/gdkdrag-x11.c
+++ b/gdk/x11/gdkdrag-x11.c
@@ -47,9 +47,6 @@
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 #include <X11/extensions/shape.h>
-#ifdef HAVE_XCOMPOSITE
-#include <X11/extensions/Xcomposite.h>
-#endif
 
 #include <string.h>
 
@@ -518,9 +515,6 @@ gdk_surface_cache_new (GdkDisplay *display)
   Window xroot_window = GDK_DISPLAY_XROOTWIN (display);
   GdkChildInfoX11 *children;
   guint nchildren, i;
-#ifdef HAVE_XCOMPOSITE
-  Window cow;
-#endif
 
   GdkSurfaceCache *result = g_new (GdkSurfaceCache, 1);
 
@@ -571,27 +565,6 @@ gdk_surface_cache_new (GdkDisplay *display)
 
   g_free (children);
 
-#ifdef HAVE_XCOMPOSITE
-  /*
-   * 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_display_is_composited (display))
-    {
-      gdk_x11_display_error_trap_push (display);
-      cow = XCompositeGetOverlayWindow (xdisplay, xroot_window);
-      gdk_surface_cache_add (result, cow, 0, 0,
-                           WidthOfScreen (GDK_X11_SCREEN (screen)->xscreen),
-                           HeightOfScreen (GDK_X11_SCREEN (screen)->xscreen),
-                           TRUE);
-      XCompositeReleaseOverlayWindow (xdisplay, xroot_window);
-      gdk_x11_display_error_trap_pop_ignored (display);
-    }
-#endif
-
   return result;
 }
 
diff --git a/gdk/x11/meson.build b/gdk/x11/meson.build
index ec7d0ef78f..e5cadf9a69 100644
--- a/gdk/x11/meson.build
+++ b/gdk/x11/meson.build
@@ -67,7 +67,6 @@ gdk_x11_deps = [
   xcursor_dep,
   xdamage_dep,
   xfixes_dep,
-  xcomposite_dep,
   xrandr_dep,
   xinerama_dep,
 ]
diff --git a/meson.build b/meson.build
index 8664a64c76..63937f1cd4 100644
--- a/meson.build
+++ b/meson.build
@@ -489,14 +489,12 @@ if x11_enabled
   xcursor_dep    = dependency('xcursor')
   xdamage_dep    = dependency('xdamage')
   xfixes_dep     = dependency('xfixes')
-  xcomposite_dep = dependency('xcomposite')
   fontconfig_dep = dependency('fontconfig')
 
-  x11_pkgs = ['fontconfig', 'x11', 'xext', 'xi', 'xrandr', 'xcursor', 'xdamage', 'xfixes', 'xcomposite', 
'xinerama']
+  x11_pkgs = ['fontconfig', 'x11', 'xext', 'xi', 'xrandr', 'xcursor', 'xdamage', 'xfixes', 'xinerama']
 
   cdata.set('HAVE_XCURSOR', 1)
   cdata.set('HAVE_XDAMAGE', 1)
-  cdata.set('HAVE_XCOMPOSITE', 1)
   cdata.set('HAVE_XFIXES', 1)
 
   if not cc.has_function('XkbQueryExtension', dependencies: x11_dep,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]