diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-22 18:04:05 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-22 18:04:05 +0930 |
commit | 8190ef87547b704848231bde10b1cdffc6442790 (patch) | |
tree | 29cb6d5bdefcee879d103953a140373635726f17 /dix | |
parent | 179a082c26f9e562492ee2e59e7f44f949f39f9c (diff) | |
parent | 2ddbfd345786aa39b6ccaed82a1ca5c145284ee3 (diff) |
Merge branch 'master' into mpx
Conflicts:
Xext/EVI.c
Xext/appgroup.c
Xext/cup.c
Xext/mitmisc.c
Xext/sampleEVI.c
dix/window.c
Diffstat (limited to 'dix')
-rw-r--r-- | dix/Makefile.am | 14 | ||||
-rw-r--r-- | dix/devices.c | 4 | ||||
-rw-r--r-- | dix/dispatch.c | 9 | ||||
-rw-r--r-- | dix/dixutils.c | 3 | ||||
-rw-r--r-- | dix/events.c | 7 | ||||
-rw-r--r-- | dix/main.c | 14 | ||||
-rw-r--r-- | dix/window.c | 71 |
7 files changed, 27 insertions, 95 deletions
diff --git a/dix/Makefile.am b/dix/Makefile.am index 554ab83a9..c24e98530 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -1,4 +1,10 @@ -noinst_LTLIBRARIES = libdix.la libxpstubs.la +standard_dix_libs = libdix.la libxpstubs.la + +if XPRINT +noinst_LTLIBRARIES = $(standard_dix_libs) libXpdix.la +else +noinst_LTLIBRARIES = $(standard_dix_libs) +endif AM_CFLAGS = $(DIX_CFLAGS) \ -DVENDOR_NAME=\""@VENDOR_NAME@"\" \ @@ -40,7 +46,11 @@ libdix_la_SOURCES = \ libxpstubs_la_SOURCES = \ xpstubs.c -INCLUDES = -I$(top_srcdir)/Xprint +if XPRINT +libXpdix_la_SOURCES = $(libdix_la_SOURCES) +libXpdix_la_CPPFLAGS = -I$(top_srcdir)/hw/xprint +libXpdix_la_CFLAGS = $(AM_CFLAGS) $(XPRINT_CFLAGS) +endif EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in diff --git a/dix/devices.c b/dix/devices.c index fe70e7870..656707ca5 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -830,12 +830,12 @@ CloseDownDevices(void) for (dev = inputInfo.devices; dev; dev = next) { next = dev->next; - CloseDevice(dev); + DeleteInputDeviceRequest(dev); } for (dev = inputInfo.off_devices; dev; dev = next) { next = dev->next; - CloseDevice(dev); + DeleteInputDeviceRequest(dev); } inputInfo.devices = NULL; diff --git a/dix/dispatch.c b/dix/dispatch.c index ef76dcf8c..64955d952 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -136,9 +136,6 @@ int ProcInitialConnection(); #endif #include "privates.h" #include "xace.h" -#ifdef XAPPGROUP -#include "appgroup.h" -#endif #ifdef XKB #ifndef XKB_IN_SERVER #define XKB_IN_SERVER @@ -3517,9 +3514,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv) } #endif client->replyBytesRemaining = 0; -#ifdef XAPPGROUP - client->appgroup = NULL; -#endif client->fontResFunc = NULL; #ifdef SMART_SCHEDULE client->smart_priority = 0; @@ -3646,9 +3640,6 @@ SendConnSetup(ClientPtr client, char *reason) client->requestVector = client->swapped ? SwappedProcVector : ProcVector; client->sequence = 0; -#ifdef XAPPGROUP - XagConnectionInfo (client, &lconnSetupPrefix, &lConnectionInfo, &numScreens); -#endif ((xConnSetup *)lConnectionInfo)->ridBase = client->clientAsMask; ((xConnSetup *)lConnectionInfo)->ridMask = RESOURCE_ID_MASK; #ifdef MATCH_CLIENT_ENDIAN diff --git a/dix/dixutils.c b/dix/dixutils.c index aaf510623..22935cead 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -270,7 +270,8 @@ dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) *pClient = clients[clientIndex]; return Success; bad: - client->errorValue = rid; + if(client) + client->errorValue = rid; *pClient = NULL; return rc; } diff --git a/dix/events.c b/dix/events.c index 093103360..7b503ac4e 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2664,6 +2664,13 @@ XYToWindow(DeviceIntPtr pDev, int x, int y) x - pWin->drawable.x, y - pWin->drawable.y, &box)) #endif +#ifdef ROOTLESS + /* In rootless mode windows may be offscreen, even when + * they're in X's stack. (E.g. if the native window system + * implements some form of virtual desktop system). + */ + && !pWin->rootlessUnhittable +#endif ) { if (pSprite->spriteTraceGood >= pSprite->spriteTraceSize) diff --git a/dix/main.c b/dix/main.c index 6a94aaa35..f7824ee83 100644 --- a/dix/main.c +++ b/dix/main.c @@ -113,9 +113,6 @@ Equipment Corporation. #include "dispatch.h" /* InitProcVectors() */ #endif -#include <pthread.h> -pthread_key_t threadname_key=0; - #ifdef DPMSExtension #define DPMS_SERVER #include <X11/extensions/dpms.h> @@ -251,17 +248,6 @@ main(int argc, char *argv[], char *envp[]) char *xauthfile; HWEventQueueType alwaysCheckForInput[2]; - if(threadname_key == 0) ErrorF("pthread_key_create returned %d\n", pthread_key_create(&threadname_key, NULL)); - ErrorF("threadname_key = %d\n", threadname_key); - if(pthread_getspecific(threadname_key) == NULL) { - char *nameptr = malloc(32); - sprintf(nameptr, "main thread %d", random()); - // strcpy(nameptr, "main thread"); - ErrorF("calling: pthread_setspecific(%d, %s)=%d\n", threadname_key, nameptr, pthread_setspecific(threadname_key, nameptr)); - if (pthread_getspecific(threadname_key) != NULL) ErrorF("current thread: %s\n", (char *)pthread_getspecific(threadname_key)); - } else { - if (pthread_getspecific(threadname_key) != NULL) ErrorF("thread was already: %s\n", (char *)pthread_getspecific(threadname_key)); - } display = "0"; InitGlobals(); diff --git a/dix/window.c b/dix/window.c index d3160c903..33e9752b6 100644 --- a/dix/window.c +++ b/dix/window.c @@ -124,9 +124,6 @@ Equipment Corporation. #include "dixevents.h" #include "globals.h" -#ifdef XAPPGROUP -#include "appgroup.h" -#endif #include "privates.h" #include "xace.h" @@ -310,6 +307,10 @@ SetWindowToDefaults(WindowPtr pWin) sem = xcalloc(1, sizeof(FocusSemaphoresRec)); dixSetPrivate(&pWin->devPrivates, FocusPrivatesKey, sem); + +#ifdef ROOTLESS + pWin->rootlessUnhittable = FALSE; +#endif } static void @@ -632,14 +633,6 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, if (!ancwopt) ancwopt = FindWindowWithOptional(pParent)->optional; if (visual == CopyFromParent) { -#ifdef XAPPGROUP - VisualID ag_visual; - - if (client->appgroup && !pParent->parent && - (ag_visual = XagRootVisual (client))) - visual = ag_visual; - else -#endif visual = ancwopt->visual; } @@ -1339,22 +1332,6 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) pVlist++; if (cmap == CopyFromParent) { -#ifdef XAPPGROUP - Colormap ag_colormap; - ClientPtr win_owner; - - /* - * win_owner == client for CreateWindow, other clients - * can ChangeWindowAttributes - */ - win_owner = clients[CLIENT_ID(pWin->drawable.id)]; - - if ( win_owner && win_owner->appgroup && - !pWin->parent->parent && - (ag_colormap = XagDefaultColormap (win_owner))) - cmap = ag_colormap; - else -#endif if (pWin->parent && (!pWin->optional || pWin->optional->visual == wVisual (pWin->parent))) @@ -2283,10 +2260,6 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) h = pWin->drawable.height, bw = pWin->borderWidth; int rc, action, smode = Above; -#ifdef XAPPGROUP - ClientPtr win_owner; - ClientPtr ag_leader = NULL; -#endif xEvent event; if ((pWin->drawable.class == InputOnly) && (mask & IllegalInputOnlyConfigureMask)) @@ -2382,17 +2355,9 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) else pSib = pWin->nextSib; -#ifdef XAPPGROUP - win_owner = clients[CLIENT_ID(pWin->drawable.id)]; - ag_leader = XagLeader (win_owner); -#endif if ((!pWin->overrideRedirect) && (RedirectSend(pParent) -#ifdef XAPPGROUP - || (win_owner->appgroup && ag_leader && - XagIsControlledRoot (client, pParent)) -#endif )) { event.u.u.type = ConfigureRequest; @@ -2417,16 +2382,6 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) event.u.configureRequest.height = h; event.u.configureRequest.borderWidth = bw; event.u.configureRequest.valueMask = mask; -#ifdef XAPPGROUP - /* make sure if the ag_leader maps the window it goes to the wm */ - if (ag_leader && ag_leader != client && - XagIsControlledRoot (client, pParent)) { - event.u.configureRequest.parent = XagId (win_owner); - (void) TryClientEvents (ag_leader, &event, 1, - NoEventMask, NoEventMask, NullGrab); - return Success; - } -#endif event.u.configureRequest.parent = pParent->drawable.id; if (MaybeDeliverEventsToClient(pParent, &event, 1, SubstructureRedirectMask, client) == 1) @@ -2803,31 +2758,13 @@ MapWindow(WindowPtr pWin, ClientPtr client) { xEvent event; Bool anyMarked; -#ifdef XAPPGROUP - ClientPtr win_owner = clients[CLIENT_ID(pWin->drawable.id)]; - ClientPtr ag_leader = XagLeader (win_owner); -#endif if ((!pWin->overrideRedirect) && (RedirectSend(pParent) -#ifdef XAPPGROUP - || (win_owner->appgroup && ag_leader && - XagIsControlledRoot (client, pParent)) -#endif )) { event.u.u.type = MapRequest; event.u.mapRequest.window = pWin->drawable.id; -#ifdef XAPPGROUP - /* make sure if the ag_leader maps the window it goes to the wm */ - if (ag_leader && ag_leader != client && - XagIsControlledRoot (client, pParent)) { - event.u.mapRequest.parent = XagId (win_owner); - (void) TryClientEvents (ag_leader, &event, 1, - NoEventMask, NoEventMask, NullGrab); - return Success; - } -#endif event.u.mapRequest.parent = pParent->drawable.id; if (MaybeDeliverEventsToClient(pParent, &event, 1, |