[mutter/wip/barriers: 1/4] display: Require XFixes 5.0



commit 698e91c4f66059910814806ec524c5d7be16889c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jul 30 16:02:56 2012 -0300

    display: Require XFixes 5.0
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677215

 src/core/display-private.h |    2 --
 src/core/display.c         |   26 ++++++++++++++------------
 2 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/core/display-private.h b/src/core/display-private.h
index 64fbd2c..b321847 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -358,10 +358,8 @@ struct _MetaDisplay
 #define META_DISPLAY_HAS_RENDER(display) ((display)->have_render)
   unsigned int have_composite : 1;
   unsigned int have_damage : 1;
-  unsigned int have_xfixes : 1;
 #define META_DISPLAY_HAS_COMPOSITE(display) ((display)->have_composite)
 #define META_DISPLAY_HAS_DAMAGE(display) ((display)->have_damage)
-#define META_DISPLAY_HAS_XFIXES(display) ((display)->have_xfixes)
 };
 
 struct _MetaDisplayClass
diff --git a/src/core/display.c b/src/core/display.c
index 7032998..7479367 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -409,13 +409,11 @@ enable_compositor (MetaDisplay *display,
 
   if (!META_DISPLAY_HAS_COMPOSITE (display) ||
       !META_DISPLAY_HAS_DAMAGE (display) ||
-      !META_DISPLAY_HAS_XFIXES (display) ||
       !META_DISPLAY_HAS_RENDER (display))
     {
       meta_warning (_("Missing %s extension required for compositing"),
                     !META_DISPLAY_HAS_COMPOSITE (display) ? "composite" :
-                    !META_DISPLAY_HAS_DAMAGE (display) ? "damage" :
-                    !META_DISPLAY_HAS_XFIXES (display) ? "xfixes" : "render");
+                    !META_DISPLAY_HAS_DAMAGE (display) ? "damage" : "render");
       return;
     }
 
@@ -763,20 +761,24 @@ meta_display_open (void)
                   the_display->damage_error_base, 
                   the_display->damage_event_base);
 
-    the_display->have_xfixes = FALSE;
-
     the_display->xfixes_error_base = 0;
     the_display->xfixes_event_base = 0;
 
-    if (!XFixesQueryExtension (the_display->xdisplay,
-                               &the_display->xfixes_event_base,
-                               &the_display->xfixes_error_base))
+    if (XFixesQueryExtension (the_display->xdisplay,
+                              &the_display->xfixes_event_base,
+                              &the_display->xfixes_error_base))
       {
-        the_display->xfixes_error_base = 0;
-        the_display->xfixes_event_base = 0;
-      } 
+        int xfixes_major, xfixes_minor;
+
+        XFixesQueryVersion (the_display->xdisplay, &xfixes_major, &xfixes_minor);
+
+        if (xfixes_major * 100 + xfixes_minor < 500)
+          meta_fatal ("Mutter requires XFixes 5.0");
+      }
     else
-      the_display->have_xfixes = TRUE;
+      {
+        meta_fatal ("Mutter requires XFixes 5.0");
+      }
 
     meta_verbose ("Attempted to init XFixes, found error base %d event base %d\n",
                   the_display->xfixes_error_base, 



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