diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-04-25 17:54:36 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-04-25 18:04:22 -0700 |
commit | b9ca7896356f79ee27be5d5aa62052f6984282b0 (patch) | |
tree | 455a3a2d7cb721d265f8db51ffd13e9fbb4edd07 /hw/xquartz/pseudoramiX.c | |
parent | 0209e46249b61974a6e3ed54a51cc36dfaf0064f (diff) |
XQuartz: Added some pseudoramiX debug traces
(cherry picked from commit 5bee1585a399eab0a7b6fc80ad476d81b5d227d3)
Diffstat (limited to 'hw/xquartz/pseudoramiX.c')
-rw-r--r-- | hw/xquartz/pseudoramiX.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/hw/xquartz/pseudoramiX.c b/hw/xquartz/pseudoramiX.c index 49d5eb6d4..aafaa26ef 100644 --- a/hw/xquartz/pseudoramiX.c +++ b/hw/xquartz/pseudoramiX.c @@ -37,6 +37,7 @@ Equipment Corporation. #include <dix-config.h> #endif +#include "darwin.h" #include "pseudoramiX.h" #include "extnsionst.h" #include "dixstruct.h" @@ -99,6 +100,8 @@ PseudoramiXAddScreen(int x, int y, int w, int h) sizeof(PseudoramiXScreenRec)); } + DEBUG_LOG("x: %d, y: %d, w: %d, h: %d\n", x, y, w, h); + s = &pseudoramiXScreens[pseudoramiXNumScreens++]; s->x = x; s->y = y; @@ -116,6 +119,8 @@ void PseudoramiXExtensionInit(int argc, char *argv[]) if (noPseudoramiXExtension) return; + TRACE(); + /* Even with only one screen we need to enable PseudoramiX to allow dynamic screen configuration changes. */ #if 0 @@ -153,12 +158,16 @@ void PseudoramiXExtensionInit(int argc, char *argv[]) void PseudoramiXResetScreens(void) { + TRACE(); + pseudoramiXNumScreens = 0; } static void PseudoramiXResetProc(ExtensionEntry *extEntry) { + TRACE(); + PseudoramiXResetScreens(); } @@ -166,6 +175,8 @@ static void PseudoramiXResetProc(ExtensionEntry *extEntry) // was PanoramiX static int ProcPseudoramiXQueryVersion(ClientPtr client) { + TRACE(); + return ProcPanoramiXQueryVersion(client); } @@ -178,6 +189,8 @@ static int ProcPseudoramiXGetState(ClientPtr client) xPanoramiXGetStateReply rep; register int n, rc; + TRACE(); + REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) @@ -205,6 +218,8 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client) xPanoramiXGetScreenCountReply rep; register int n, rc; + TRACE(); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) @@ -232,6 +247,8 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client) xPanoramiXGetScreenSizeReply rep; register int n, rc; + TRACE(); + REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) @@ -262,6 +279,8 @@ static int ProcPseudoramiXIsActive(ClientPtr client) /* REQUEST(xXineramaIsActiveReq); */ xXineramaIsActiveReply rep; + TRACE(); + REQUEST_SIZE_MATCH(xXineramaIsActiveReq); rep.type = X_Reply; @@ -285,6 +304,8 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client) /* REQUEST(xXineramaQueryScreensReq); */ xXineramaQueryScreensReply rep; + DEBUG_LOG("noPseudoramiXExtension=%d, pseudoramiXNumScreens=%d\n", noPseudoramiXExtension, pseudoramiXNumScreens); + REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); rep.type = X_Reply; @@ -327,6 +348,7 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client) // was PanoramiX static int ProcPseudoramiXDispatch (ClientPtr client) { REQUEST(xReq); + TRACE(); switch (stuff->data) { case X_PanoramiXQueryVersion: @@ -353,6 +375,8 @@ SProcPseudoramiXQueryVersion (ClientPtr client) REQUEST(xPanoramiXQueryVersionReq); register int n; + TRACE(); + swaps(&stuff->length,n); REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq); return ProcPseudoramiXQueryVersion(client); @@ -364,6 +388,8 @@ SProcPseudoramiXGetState(ClientPtr client) REQUEST(xPanoramiXGetStateReq); register int n; + TRACE(); + swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); return ProcPseudoramiXGetState(client); @@ -375,6 +401,8 @@ SProcPseudoramiXGetScreenCount(ClientPtr client) REQUEST(xPanoramiXGetScreenCountReq); register int n; + TRACE(); + swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); return ProcPseudoramiXGetScreenCount(client); @@ -386,6 +414,8 @@ SProcPseudoramiXGetScreenSize(ClientPtr client) REQUEST(xPanoramiXGetScreenSizeReq); register int n; + TRACE(); + swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); return ProcPseudoramiXGetScreenSize(client); @@ -398,6 +428,8 @@ SProcPseudoramiXIsActive(ClientPtr client) REQUEST(xXineramaIsActiveReq); register int n; + TRACE(); + swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xXineramaIsActiveReq); return ProcPseudoramiXIsActive(client); @@ -410,6 +442,8 @@ SProcPseudoramiXQueryScreens(ClientPtr client) REQUEST(xXineramaQueryScreensReq); register int n; + TRACE(); + swaps (&stuff->length, n); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); return ProcPseudoramiXQueryScreens(client); @@ -419,6 +453,9 @@ SProcPseudoramiXQueryScreens(ClientPtr client) static int SProcPseudoramiXDispatch (ClientPtr client) { REQUEST(xReq); + + TRACE(); + switch (stuff->data) { case X_PanoramiXQueryVersion: |