XQuartz: Added some pseudoramiX debug traces
(cherry picked from commit 5bee1585a3
)
This commit is contained in:
parent
0209e46249
commit
b9ca789635
|
@ -130,4 +130,6 @@ extern FILE *debug_log_fp;
|
||||||
#define DEBUG_LOG(msg, args...)
|
#define DEBUG_LOG(msg, args...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define TRACE() DEBUG_LOG("\n")
|
||||||
|
|
||||||
#endif /* _DARWIN_H */
|
#endif /* _DARWIN_H */
|
||||||
|
|
|
@ -37,6 +37,7 @@ Equipment Corporation.
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "darwin.h"
|
||||||
#include "pseudoramiX.h"
|
#include "pseudoramiX.h"
|
||||||
#include "extnsionst.h"
|
#include "extnsionst.h"
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
|
@ -99,6 +100,8 @@ PseudoramiXAddScreen(int x, int y, int w, int h)
|
||||||
sizeof(PseudoramiXScreenRec));
|
sizeof(PseudoramiXScreenRec));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUG_LOG("x: %d, y: %d, w: %d, h: %d\n", x, y, w, h);
|
||||||
|
|
||||||
s = &pseudoramiXScreens[pseudoramiXNumScreens++];
|
s = &pseudoramiXScreens[pseudoramiXNumScreens++];
|
||||||
s->x = x;
|
s->x = x;
|
||||||
s->y = y;
|
s->y = y;
|
||||||
|
@ -116,6 +119,8 @@ void PseudoramiXExtensionInit(int argc, char *argv[])
|
||||||
|
|
||||||
if (noPseudoramiXExtension) return;
|
if (noPseudoramiXExtension) return;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
/* Even with only one screen we need to enable PseudoramiX to allow
|
/* Even with only one screen we need to enable PseudoramiX to allow
|
||||||
dynamic screen configuration changes. */
|
dynamic screen configuration changes. */
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -153,12 +158,16 @@ void PseudoramiXExtensionInit(int argc, char *argv[])
|
||||||
|
|
||||||
void PseudoramiXResetScreens(void)
|
void PseudoramiXResetScreens(void)
|
||||||
{
|
{
|
||||||
|
TRACE();
|
||||||
|
|
||||||
pseudoramiXNumScreens = 0;
|
pseudoramiXNumScreens = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void PseudoramiXResetProc(ExtensionEntry *extEntry)
|
static void PseudoramiXResetProc(ExtensionEntry *extEntry)
|
||||||
{
|
{
|
||||||
|
TRACE();
|
||||||
|
|
||||||
PseudoramiXResetScreens();
|
PseudoramiXResetScreens();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,6 +175,8 @@ static void PseudoramiXResetProc(ExtensionEntry *extEntry)
|
||||||
// was PanoramiX
|
// was PanoramiX
|
||||||
static int ProcPseudoramiXQueryVersion(ClientPtr client)
|
static int ProcPseudoramiXQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
TRACE();
|
||||||
|
|
||||||
return ProcPanoramiXQueryVersion(client);
|
return ProcPanoramiXQueryVersion(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,6 +189,8 @@ static int ProcPseudoramiXGetState(ClientPtr client)
|
||||||
xPanoramiXGetStateReply rep;
|
xPanoramiXGetStateReply rep;
|
||||||
register int n, rc;
|
register int n, rc;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -205,6 +218,8 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client)
|
||||||
xPanoramiXGetScreenCountReply rep;
|
xPanoramiXGetScreenCountReply rep;
|
||||||
register int n, rc;
|
register int n, rc;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -232,6 +247,8 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client)
|
||||||
xPanoramiXGetScreenSizeReply rep;
|
xPanoramiXGetScreenSizeReply rep;
|
||||||
register int n, rc;
|
register int n, rc;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
@ -262,6 +279,8 @@ static int ProcPseudoramiXIsActive(ClientPtr client)
|
||||||
/* REQUEST(xXineramaIsActiveReq); */
|
/* REQUEST(xXineramaIsActiveReq); */
|
||||||
xXineramaIsActiveReply rep;
|
xXineramaIsActiveReply rep;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
@ -285,6 +304,8 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client)
|
||||||
/* REQUEST(xXineramaQueryScreensReq); */
|
/* REQUEST(xXineramaQueryScreensReq); */
|
||||||
xXineramaQueryScreensReply rep;
|
xXineramaQueryScreensReply rep;
|
||||||
|
|
||||||
|
DEBUG_LOG("noPseudoramiXExtension=%d, pseudoramiXNumScreens=%d\n", noPseudoramiXExtension, pseudoramiXNumScreens);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
||||||
|
|
||||||
rep.type = X_Reply;
|
rep.type = X_Reply;
|
||||||
|
@ -327,6 +348,7 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client)
|
||||||
// was PanoramiX
|
// was PanoramiX
|
||||||
static int ProcPseudoramiXDispatch (ClientPtr client)
|
static int ProcPseudoramiXDispatch (ClientPtr client)
|
||||||
{ REQUEST(xReq);
|
{ REQUEST(xReq);
|
||||||
|
TRACE();
|
||||||
switch (stuff->data)
|
switch (stuff->data)
|
||||||
{
|
{
|
||||||
case X_PanoramiXQueryVersion:
|
case X_PanoramiXQueryVersion:
|
||||||
|
@ -353,6 +375,8 @@ SProcPseudoramiXQueryVersion (ClientPtr client)
|
||||||
REQUEST(xPanoramiXQueryVersionReq);
|
REQUEST(xPanoramiXQueryVersionReq);
|
||||||
register int n;
|
register int n;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
swaps(&stuff->length,n);
|
swaps(&stuff->length,n);
|
||||||
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
|
||||||
return ProcPseudoramiXQueryVersion(client);
|
return ProcPseudoramiXQueryVersion(client);
|
||||||
|
@ -364,6 +388,8 @@ SProcPseudoramiXGetState(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetStateReq);
|
REQUEST(xPanoramiXGetStateReq);
|
||||||
register int n;
|
register int n;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps (&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
|
||||||
return ProcPseudoramiXGetState(client);
|
return ProcPseudoramiXGetState(client);
|
||||||
|
@ -375,6 +401,8 @@ SProcPseudoramiXGetScreenCount(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenCountReq);
|
REQUEST(xPanoramiXGetScreenCountReq);
|
||||||
register int n;
|
register int n;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps (&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
|
||||||
return ProcPseudoramiXGetScreenCount(client);
|
return ProcPseudoramiXGetScreenCount(client);
|
||||||
|
@ -386,6 +414,8 @@ SProcPseudoramiXGetScreenSize(ClientPtr client)
|
||||||
REQUEST(xPanoramiXGetScreenSizeReq);
|
REQUEST(xPanoramiXGetScreenSizeReq);
|
||||||
register int n;
|
register int n;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps (&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
|
||||||
return ProcPseudoramiXGetScreenSize(client);
|
return ProcPseudoramiXGetScreenSize(client);
|
||||||
|
@ -398,6 +428,8 @@ SProcPseudoramiXIsActive(ClientPtr client)
|
||||||
REQUEST(xXineramaIsActiveReq);
|
REQUEST(xXineramaIsActiveReq);
|
||||||
register int n;
|
register int n;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps (&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
|
||||||
return ProcPseudoramiXIsActive(client);
|
return ProcPseudoramiXIsActive(client);
|
||||||
|
@ -410,6 +442,8 @@ SProcPseudoramiXQueryScreens(ClientPtr client)
|
||||||
REQUEST(xXineramaQueryScreensReq);
|
REQUEST(xXineramaQueryScreensReq);
|
||||||
register int n;
|
register int n;
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
swaps (&stuff->length, n);
|
swaps (&stuff->length, n);
|
||||||
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
|
||||||
return ProcPseudoramiXQueryScreens(client);
|
return ProcPseudoramiXQueryScreens(client);
|
||||||
|
@ -419,6 +453,9 @@ SProcPseudoramiXQueryScreens(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
SProcPseudoramiXDispatch (ClientPtr client)
|
SProcPseudoramiXDispatch (ClientPtr client)
|
||||||
{ REQUEST(xReq);
|
{ REQUEST(xReq);
|
||||||
|
|
||||||
|
TRACE();
|
||||||
|
|
||||||
switch (stuff->data)
|
switch (stuff->data)
|
||||||
{
|
{
|
||||||
case X_PanoramiXQueryVersion:
|
case X_PanoramiXQueryVersion:
|
||||||
|
|
|
@ -44,8 +44,6 @@
|
||||||
|
|
||||||
#include "darwin.h"
|
#include "darwin.h"
|
||||||
|
|
||||||
#include "pseudoramiX.h"
|
|
||||||
|
|
||||||
extern void FatalError(const char *, ...);
|
extern void FatalError(const char *, ...);
|
||||||
extern char *display;
|
extern char *display;
|
||||||
extern int noPanoramiXExtension;
|
extern int noPanoramiXExtension;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user