XQuartz: Added some pseudoramiX debug traces
This commit is contained in:
parent
db7d118527
commit
5bee1585a3
|
@ -129,4 +129,6 @@ extern FILE *debug_log_fp;
|
|||
#define DEBUG_LOG(msg, args...)
|
||||
#endif
|
||||
|
||||
#define TRACE() DEBUG_LOG("\n")
|
||||
|
||||
#endif /* _DARWIN_H */
|
||||
|
|
|
@ -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;
|
||||
|
||||
TRACE();
|
||||
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||
pWin = LookupWindow (stuff->window, client);
|
||||
if (!pWin)
|
||||
|
@ -204,6 +217,8 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
|
|||
xPanoramiXGetScreenCountReply rep;
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||
pWin = LookupWindow (stuff->window, client);
|
||||
if (!pWin)
|
||||
|
@ -230,6 +245,8 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client)
|
|||
xPanoramiXGetScreenSizeReply rep;
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||
pWin = LookupWindow (stuff->window, client);
|
||||
if (!pWin)
|
||||
|
@ -259,6 +276,8 @@ static int ProcPseudoramiXIsActive(ClientPtr client)
|
|||
/* REQUEST(xXineramaIsActiveReq); */
|
||||
xXineramaIsActiveReply rep;
|
||||
|
||||
TRACE();
|
||||
|
||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||
|
||||
rep.type = X_Reply;
|
||||
|
@ -282,6 +301,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;
|
||||
|
@ -324,6 +345,7 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client)
|
|||
// was PanoramiX
|
||||
static int ProcPseudoramiXDispatch (ClientPtr client)
|
||||
{ REQUEST(xReq);
|
||||
TRACE();
|
||||
switch (stuff->data)
|
||||
{
|
||||
case X_PanoramiXQueryVersion:
|
||||
|
@ -350,6 +372,8 @@ SProcPseudoramiXQueryVersion (ClientPtr client)
|
|||
REQUEST(xPanoramiXQueryVersionReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps(&stuff->length,n);
|
||||
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
||||
return ProcPseudoramiXQueryVersion(client);
|
||||
|
@ -361,6 +385,8 @@ SProcPseudoramiXGetState(ClientPtr client)
|
|||
REQUEST(xPanoramiXGetStateReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||
return ProcPseudoramiXGetState(client);
|
||||
|
@ -372,6 +398,8 @@ SProcPseudoramiXGetScreenCount(ClientPtr client)
|
|||
REQUEST(xPanoramiXGetScreenCountReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||
return ProcPseudoramiXGetScreenCount(client);
|
||||
|
@ -383,6 +411,8 @@ SProcPseudoramiXGetScreenSize(ClientPtr client)
|
|||
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||
return ProcPseudoramiXGetScreenSize(client);
|
||||
|
@ -395,6 +425,8 @@ SProcPseudoramiXIsActive(ClientPtr client)
|
|||
REQUEST(xXineramaIsActiveReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||
return ProcPseudoramiXIsActive(client);
|
||||
|
@ -407,6 +439,8 @@ SProcPseudoramiXQueryScreens(ClientPtr client)
|
|||
REQUEST(xXineramaQueryScreensReq);
|
||||
register int n;
|
||||
|
||||
TRACE();
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
||||
return ProcPseudoramiXQueryScreens(client);
|
||||
|
@ -416,6 +450,9 @@ SProcPseudoramiXQueryScreens(ClientPtr client)
|
|||
static int
|
||||
SProcPseudoramiXDispatch (ClientPtr client)
|
||||
{ REQUEST(xReq);
|
||||
|
||||
TRACE();
|
||||
|
||||
switch (stuff->data)
|
||||
{
|
||||
case X_PanoramiXQueryVersion:
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
|
||||
#include "pseudoramiX.h"
|
||||
|
||||
extern void FatalError(const char *, ...);
|
||||
extern char *display;
|
||||
extern int noPanoramiXExtension;
|
||||
|
|
Loading…
Reference in New Issue
Block a user