[gnome-shell/wip/carlosg/backendless-clutter: 62/62] shell: Drop dependency on ClutterX11 headers/gir




commit 82450e1060dcece25430b008e63fab21cccbde66
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue May 11 12:44:20 2021 +0200

    shell: Drop dependency on ClutterX11 headers/gir
    
    This can be replaced with MetaX11Display nowadays.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1841>

 src/gnome-shell-plugin.c    | 6 ++++--
 src/main.c                  | 1 -
 src/meson.build             | 1 -
 src/shell-embedded-window.c | 1 -
 src/shell-global.c          | 1 -
 src/shell-tray-manager.c    | 1 -
 6 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
index 41641948b2..39af545ace 100644
--- a/src/gnome-shell-plugin.c
+++ b/src/gnome-shell-plugin.c
@@ -37,10 +37,10 @@
 #include <string.h>
 
 #include <clutter/clutter.h>
-#include <clutter/x11/clutter-x11.h>
 #include <gjs/gjs.h>
 #include <meta/display.h>
 #include <meta/meta-plugin.h>
+#include <meta/meta-x11-display.h>
 #include <meta/util.h>
 
 #include "shell-global-private.h"
@@ -74,6 +74,8 @@ gnome_shell_plugin_has_swap_event (GnomeShellPlugin *shell_plugin)
   CoglRenderer *renderer = cogl_display_get_renderer (cogl_display);
   const char * (* query_extensions_string) (Display *dpy, int screen);
   Bool (* query_extension) (Display *dpy, int *error, int *event);
+  MetaDisplay *display = meta_plugin_get_display (META_PLUGIN (shell_plugin));
+  MetaX11Display *x11_display = meta_display_get_x11_display (display);
   Display *xdisplay;
   int screen_number;
   const char *glx_extensions;
@@ -82,7 +84,7 @@ gnome_shell_plugin_has_swap_event (GnomeShellPlugin *shell_plugin)
   if (cogl_renderer_get_winsys_id (renderer) != COGL_WINSYS_ID_GLX)
     return FALSE;
 
-  xdisplay = clutter_x11_get_default_display ();
+  xdisplay = meta_x11_display_get_xdisplay (x11_display);
 
   query_extensions_string =
     (void *) cogl_get_proc_address ("glXQueryExtensionsString");
diff --git a/src/main.c b/src/main.c
index 5d07a43014..23944351b4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -10,7 +10,6 @@
 
 #include <cogl-pango/cogl-pango.h>
 #include <clutter/clutter.h>
-#include <clutter/x11/clutter-x11.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n-lib.h>
 #include <girepository.h>
diff --git a/src/meson.build b/src/meson.build
index d235c37438..53b8b527d5 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -213,7 +213,6 @@ libshell_dep = declare_dependency(link_with: libshell)
 
 libshell_gir_includes = [
   'Clutter-@0@'.format(mutter_api_version),
-  'ClutterX11-@0@'.format(mutter_api_version),
   'Meta-@0@'.format(mutter_api_version),
   'Gcr-3',
   'PolkitAgent-1.0'
diff --git a/src/shell-embedded-window.c b/src/shell-embedded-window.c
index 31e350657e..8fd6112871 100644
--- a/src/shell-embedded-window.c
+++ b/src/shell-embedded-window.c
@@ -3,7 +3,6 @@
 #include "config.h"
 
 #include <gdk/gdkx.h>
-#include <clutter/x11/clutter-x11.h>
 
 #include "shell-embedded-window-private.h"
 
diff --git a/src/shell-global.c b/src/shell-global.c
index 027c9d6c45..eff53f396a 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -16,7 +16,6 @@
 #include <locale.h>
 
 #include <X11/extensions/Xfixes.h>
-#include <clutter/x11/clutter-x11.h>
 #include <gdk/gdkx.h>
 #include <gio/gio.h>
 #include <girepository.h>
diff --git a/src/shell-tray-manager.c b/src/shell-tray-manager.c
index 03f36a72be..c8e325978f 100644
--- a/src/shell-tray-manager.c
+++ b/src/shell-tray-manager.c
@@ -3,7 +3,6 @@
 #include "config.h"
 
 #include <clutter/clutter.h>
-#include <clutter/x11/clutter-x11.h>
 #include <girepository.h>
 #include <gtk/gtk.h>
 #include <meta/display.h>


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