miinitext: General cleanup (v2)

This really just wants to be the list of disable booleans and
initialization functions, and nothing else. Stop including the protocol
headers from extinit.h, remove a stray mention of xgl, and move an
XInput declaration to a better place.

v2: A bunch of drivers assume they'll get the DPMS tokens implicitly,
so add it to globals.h.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Adam Jackson 2018-01-10 13:05:42 -05:00
parent 4d5aab66c0
commit c2b2f06aa0
6 changed files with 25 additions and 40 deletions

View File

@ -37,6 +37,7 @@
#include "glxserver.h"
#include <GL/glxtokens.h>
#include <X11/extensions/presenttokens.h>
#include <unpack.h>
#include <pixmapstr.h>
#include <windowstr.h>

View File

@ -32,6 +32,7 @@
#include <xf86drm.h>
#include <xf86Crtc.h>
#include <damage.h>
#include <X11/extensions/dpmsconst.h>
#ifdef GLAMOR_HAS_GBM
#define GLAMOR_FOR_XORG 1

View File

@ -69,7 +69,6 @@ extern void DbeExtensionInit(void);
#endif
#if defined(DPMSExtension)
#include <X11/extensions/dpmsconst.h>
extern _X_EXPORT Bool noDPMSExtension;
extern void DPMSExtensionInit(void);
#endif
@ -82,7 +81,6 @@ extern _X_EXPORT Bool noGlxExtension;
#endif
#ifdef PANORAMIX
#include <X11/extensions/panoramiXproto.h>
extern _X_EXPORT Bool noPanoramiXExtension;
extern void PanoramiXExtensionInit(void);
#endif
@ -100,23 +98,18 @@ extern _X_EXPORT Bool noRenderExtension;
extern void RenderExtensionInit(void);
#if defined(RES)
#include <X11/extensions/XResproto.h>
extern _X_EXPORT Bool noResExtension;
extern void ResExtensionInit(void);
#endif
#if defined(SCREENSAVER)
#include <X11/extensions/saver.h>
extern _X_EXPORT Bool noScreenSaverExtension;
extern void ScreenSaverExtensionInit(void);
#endif
#include <X11/extensions/shapeproto.h>
extern void ShapeExtensionInit(void);
#ifdef MITSHM
#include <X11/extensions/shm.h>
#include <X11/extensions/shmproto.h>
extern _X_EXPORT Bool noMITShmExtension;
extern void ShmExtensionInit(void);
#endif
@ -126,14 +119,11 @@ extern void SyncExtensionInit(void);
extern void XCMiscExtensionInit(void);
#ifdef XCSECURITY
#include <X11/extensions/secur.h>
#include "securitysrv.h"
extern _X_EXPORT Bool noSecurityExtension;
extern void SecurityExtensionInit(void);
#endif
#ifdef XF86BIGFONT
#include <X11/extensions/xf86bigfproto.h>
extern _X_EXPORT Bool noXFree86BigfontExtension;
extern void XFree86BigfontExtensionInit(void);
#endif
@ -144,40 +134,29 @@ extern _X_EXPORT Bool noXFixesExtension;
extern void XFixesExtensionInit(void);
extern void XInputExtensionInit(void);
extern _X_EXPORT void AssignTypeAndName(DeviceIntPtr dev,
Atom type,
const char *name);
#include <X11/extensions/XKB.h>
extern void XkbExtensionInit(void);
#if defined(XSELINUX)
#include "xselinux.h"
extern _X_EXPORT Bool noSELinuxExtension;
extern void SELinuxExtensionInit(void);
#endif
#ifdef XTEST
#include <X11/extensions/xtestconst.h>
#include <X11/extensions/xtestproto.h>
extern void XTestExtensionInit(void);
#endif
#if defined(XV)
#include <X11/extensions/Xv.h>
#include <X11/extensions/XvMC.h>
extern _X_EXPORT Bool noXvExtension;
extern void XvExtensionInit(void);
extern void XvMCExtensionInit(void);
#endif
#if defined(DRI3)
#include <X11/extensions/dri3proto.h>
extern void dri3_extension_init(void);
#endif
#if defined(PRESENT)
#include <X11/extensions/presentproto.h>
#include "presentext.h"
#endif

View File

@ -4,6 +4,10 @@
#include "window.h" /* for WindowPtr */
#include "extinit.h"
#ifdef DPMSExtension
/* sigh, too many drivers assume this */
#include <X11/extensions/dpmsconst.h>
#endif
/* Global X server variables that are visible to mi, dix, os, and ddx */

View File

@ -57,6 +57,10 @@ SOFTWARE.
#include "geext.h"
#include "privates.h"
extern _X_EXPORT void AssignTypeAndName(DeviceIntPtr dev,
Atom type,
const char *name);
#define BitIsOn(ptr, bit) (!!(((const BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
#define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7)))

View File

@ -97,10 +97,6 @@ SOFTWARE.
#undef DPMSExtension
#endif
#ifdef HAVE_XGL_CONFIG_H
#include <xgl-config.h>
#endif
#include "misc.h"
#include "extension.h"
#include "extinit.h"
@ -140,7 +136,7 @@ static ExtensionToggle ExtensionToggleList[] = {
{"MIT-SCREEN-SAVER", &noScreenSaverExtension},
#endif
#ifdef MITSHM
{SHMNAME, &noMITShmExtension},
{"MIT-SHM", &noMITShmExtension},
#endif
#ifdef RANDR
{"RANDR", &noRRExtension},
@ -237,21 +233,21 @@ static const ExtensionModule staticExtensions[] = {
{GEExtensionInit, "Generic Event Extension", &noGEExtension},
{ShapeExtensionInit, "SHAPE", NULL},
#ifdef MITSHM
{ShmExtensionInit, SHMNAME, &noMITShmExtension},
{ShmExtensionInit, "MIT-SHM", &noMITShmExtension},
#endif
{XInputExtensionInit, "XInputExtension", NULL},
#ifdef XTEST
{XTestExtensionInit, XTestExtensionName, &noTestExtensions},
{XTestExtensionInit, "XTEST", &noTestExtensions},
#endif
{BigReqExtensionInit, "BIG-REQUESTS", NULL},
{SyncExtensionInit, "SYNC", NULL},
{XkbExtensionInit, XkbName, NULL},
{XkbExtensionInit, "XKEYBOARD", NULL},
{XCMiscExtensionInit, "XC-MISC", NULL},
#ifdef XCSECURITY
{SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension},
{SecurityExtensionInit, "SECURITY", &noSecurityExtension},
#endif
#ifdef PANORAMIX
{PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension},
{PanoramiXExtensionInit, "XINERAMA", &noPanoramiXExtension},
#endif
#ifdef INXQUARTZ
/* PseudoramiXExtensionInit must be done before RRExtensionInit, or
@ -262,7 +258,7 @@ static const ExtensionModule staticExtensions[] = {
/* must be before Render to layer DisplayCursor correctly */
{XFixesExtensionInit, "XFIXES", &noXFixesExtension},
#ifdef XF86BIGFONT
{XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension},
{XFree86BigfontExtensionInit, "XFree86-Bigfont", &noXFree86BigfontExtension},
#endif
{RenderExtensionInit, "RENDER", &noRenderExtension},
#ifdef RANDR
@ -275,7 +271,7 @@ static const ExtensionModule staticExtensions[] = {
{DamageExtensionInit, "DAMAGE", &noDamageExtension},
#endif
#ifdef SCREENSAVER
{ScreenSaverExtensionInit, ScreenSaverName, &noScreenSaverExtension},
{ScreenSaverExtensionInit, "MIT-SCREEN-SAVER", &noScreenSaverExtension},
#endif
#ifdef DBE
{DbeExtensionInit, "DOUBLE-BUFFER", &noDbeExtension},
@ -284,23 +280,23 @@ static const ExtensionModule staticExtensions[] = {
{RecordExtensionInit, "RECORD", &noTestExtensions},
#endif
#ifdef DPMSExtension
{DPMSExtensionInit, DPMSExtensionName, &noDPMSExtension},
{DPMSExtensionInit, "DPMS", &noDPMSExtension},
#endif
#ifdef PRESENT
{present_extension_init, PRESENT_NAME, NULL},
{present_extension_init, "Present", NULL},
#endif
#ifdef DRI3
{dri3_extension_init, DRI3_NAME, NULL},
{dri3_extension_init, "DRI3", NULL},
#endif
#ifdef RES
{ResExtensionInit, XRES_NAME, &noResExtension},
{ResExtensionInit, "X-Resource", &noResExtension},
#endif
#ifdef XV
{XvExtensionInit, XvName, &noXvExtension},
{XvMCExtensionInit, XvMCName, &noXvExtension},
{XvExtensionInit, "XVideo", &noXvExtension},
{XvMCExtensionInit, "XVideo-MotionCompensation", &noXvExtension},
#endif
#ifdef XSELINUX
{SELinuxExtensionInit, SELINUX_EXTENSION_NAME, &noSELinuxExtension},
{SELinuxExtensionInit, "SELinux", &noSELinuxExtension},
#endif
};