display: Require XFixes 5.0

We want to put barrier wrappers in mutter, which requre XFixes 5.0.
XFixes 5.0 was released in March, 2011, which should be old enough
to mandate support for.

https://bugzilla.gnome.org/show_bug.cgi?id=677215
This commit is contained in:
Jasper St. Pierre 2012-07-30 16:02:56 -03:00
parent 4d9d66da65
commit 71055556ee
2 changed files with 14 additions and 14 deletions

View File

@ -315,10 +315,8 @@ struct _MetaDisplay
#define META_DISPLAY_HAS_RENDER(display) ((display)->have_render) #define META_DISPLAY_HAS_RENDER(display) ((display)->have_render)
unsigned int have_composite : 1; unsigned int have_composite : 1;
unsigned int have_damage : 1; unsigned int have_damage : 1;
unsigned int have_xfixes : 1;
#define META_DISPLAY_HAS_COMPOSITE(display) ((display)->have_composite) #define META_DISPLAY_HAS_COMPOSITE(display) ((display)->have_composite)
#define META_DISPLAY_HAS_DAMAGE(display) ((display)->have_damage) #define META_DISPLAY_HAS_DAMAGE(display) ((display)->have_damage)
#define META_DISPLAY_HAS_XFIXES(display) ((display)->have_xfixes)
}; };
struct _MetaDisplayClass struct _MetaDisplayClass

View File

@ -388,13 +388,11 @@ enable_compositor (MetaDisplay *display,
if (!META_DISPLAY_HAS_COMPOSITE (display) || if (!META_DISPLAY_HAS_COMPOSITE (display) ||
!META_DISPLAY_HAS_DAMAGE (display) || !META_DISPLAY_HAS_DAMAGE (display) ||
!META_DISPLAY_HAS_XFIXES (display) ||
!META_DISPLAY_HAS_RENDER (display)) !META_DISPLAY_HAS_RENDER (display))
{ {
meta_warning (_("Missing %s extension required for compositing"), meta_warning (_("Missing %s extension required for compositing"),
!META_DISPLAY_HAS_COMPOSITE (display) ? "composite" : !META_DISPLAY_HAS_COMPOSITE (display) ? "composite" :
!META_DISPLAY_HAS_DAMAGE (display) ? "damage" : !META_DISPLAY_HAS_DAMAGE (display) ? "damage" : "render");
!META_DISPLAY_HAS_XFIXES (display) ? "xfixes" : "render");
return; return;
} }
@ -757,20 +755,24 @@ meta_display_open (void)
the_display->damage_error_base, the_display->damage_error_base,
the_display->damage_event_base); the_display->damage_event_base);
the_display->have_xfixes = FALSE;
the_display->xfixes_error_base = 0; the_display->xfixes_error_base = 0;
the_display->xfixes_event_base = 0; the_display->xfixes_event_base = 0;
if (!XFixesQueryExtension (the_display->xdisplay, if (XFixesQueryExtension (the_display->xdisplay,
&the_display->xfixes_event_base, &the_display->xfixes_event_base,
&the_display->xfixes_error_base)) &the_display->xfixes_error_base))
{ {
the_display->xfixes_error_base = 0; int xfixes_major, xfixes_minor;
the_display->xfixes_event_base = 0;
} XFixesQueryVersion (the_display->xdisplay, &xfixes_major, &xfixes_minor);
if (xfixes_major * 100 + xfixes_minor < 500)
meta_fatal ("Mutter requires XFixes 5.0");
}
else 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", meta_verbose ("Attempted to init XFixes, found error base %d event base %d\n",
the_display->xfixes_error_base, the_display->xfixes_error_base,