aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/dri2
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-21 08:06:12 +0100
committermarha <marha@users.sourceforge.net>2011-11-21 08:06:12 +0100
commit45710577f374972946a8eb37833a9c94e5a299bf (patch)
tree83862aa10e13033fe715c36f673f6e82c5434934 /xorg-server/hw/xfree86/dri2
parent1037d56ca89d503cfd62830a90e934a2806ad804 (diff)
downloadvcxsrv-45710577f374972946a8eb37833a9c94e5a299bf.tar.gz
vcxsrv-45710577f374972946a8eb37833a9c94e5a299bf.tar.bz2
vcxsrv-45710577f374972946a8eb37833a9c94e5a299bf.zip
xserver xkeyboard-config mesa git update 21 nov 2011
Diffstat (limited to 'xorg-server/hw/xfree86/dri2')
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c17
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2ext.c3
2 files changed, 17 insertions, 3 deletions
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index a97508d21..0d613be8e 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -816,7 +816,8 @@ DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable)
/* If we're currently waiting for a swap on this drawable, reset
* the request and suspend the client. We only support one
* blocked client per drawable. */
- if ((pPriv->swapsPending) &&
+ if (pPriv &&
+ pPriv->swapsPending &&
pPriv->blockedClient == NULL) {
ResetCurrentRequest(client);
client->sequence--;
@@ -1234,14 +1235,24 @@ DRI2CloseScreen(ScreenPtr pScreen)
}
extern ExtensionModule dri2ExtensionModule;
+extern Bool DRI2ModuleSetup(void);
+
+/* Called by InitExtensions() */
+Bool
+DRI2ModuleSetup(void)
+{
+ dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable");
+ if (!dri2DrawableRes)
+ return FALSE;
+
+ return TRUE;
+}
static pointer
DRI2Setup(pointer module, pointer opts, int *errmaj, int *errmin)
{
static Bool setupDone = FALSE;
- dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable");
-
if (!setupDone)
{
setupDone = TRUE;
diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c
index 934abf6de..e612cf051 100644
--- a/xorg-server/hw/xfree86/dri2/dri2ext.c
+++ b/xorg-server/hw/xfree86/dri2/dri2ext.c
@@ -50,6 +50,7 @@
#include "xf86Module.h"
static ExtensionEntry *dri2Extension;
+extern Bool DRI2ModuleSetup(void);
static Bool
validDrawable(ClientPtr client, XID drawable, Mask access_mode,
@@ -634,6 +635,8 @@ DRI2ExtensionInit(void)
StandardMinorOpcode);
DRI2EventBase = dri2Extension->eventBase;
+
+ DRI2ModuleSetup();
}
extern Bool noDRI2Extension;