diff options
-rw-r--r-- | hw/xquartz/darwin.h | 2 | ||||
-rw-r--r-- | hw/xquartz/pseudoramiX.c | 37 | ||||
-rw-r--r-- | hw/xquartz/quartzCocoa.m | 2 |
3 files changed, 39 insertions, 2 deletions
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h index 3231077be..6d2fbd0e5 100644 --- a/hw/xquartz/darwin.h +++ b/hw/xquartz/darwin.h @@ -130,4 +130,6 @@ extern FILE *debug_log_fp; #define DEBUG_LOG(msg, args...) #endif +#define TRACE() DEBUG_LOG("\n") + #endif /* _DARWIN_H */ 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: diff --git a/hw/xquartz/quartzCocoa.m b/hw/xquartz/quartzCocoa.m index aa4b9fb1e..2890d34f1 100644 --- a/hw/xquartz/quartzCocoa.m +++ b/hw/xquartz/quartzCocoa.m @@ -44,8 +44,6 @@ #include "darwin.h" -#include "pseudoramiX.h" - extern void FatalError(const char *, ...); extern char *display; extern int noPanoramiXExtension; |