xorg: work on randr

ulab-original
Jay Sorg 13 years ago
parent 35bc7a1588
commit e075b8cc5d

@ -36,7 +36,6 @@ Bool noXFree86BigfontExtension = FALSE;
rdpScreenInfoRec g_rdpScreen; /* the one screen */ rdpScreenInfoRec g_rdpScreen; /* the one screen */
ScreenPtr g_pScreen = 0; ScreenPtr g_pScreen = 0;
//int g_rdpGCIndex = -1;
DevPrivateKeyRec g_rdpGCIndex; DevPrivateKeyRec g_rdpGCIndex;
DeviceIntPtr g_pointer = 0; DeviceIntPtr g_pointer = 0;
@ -326,7 +325,6 @@ rdpScreenInit(int index, ScreenPtr pScreen, int argc, char** argv)
fbPictureInit(pScreen, 0, 0); fbPictureInit(pScreen, 0, 0);
} }
//if (!miAllocateGCPrivate(pScreen, g_rdpGCIndex, sizeof(rdpGCRec)))
if (!dixRegisterPrivateKey(&g_rdpGCIndex, PRIVATE_GC, sizeof(rdpGCRec))) if (!dixRegisterPrivateKey(&g_rdpGCIndex, PRIVATE_GC, sizeof(rdpGCRec)))
{ {
FatalError("rdpScreenInit: miAllocateGCPrivate failed\n"); FatalError("rdpScreenInit: miAllocateGCPrivate failed\n");
@ -340,8 +338,6 @@ rdpScreenInit(int index, ScreenPtr pScreen, int argc, char** argv)
g_rdpScreen.CreatePixmap = pScreen->CreatePixmap; g_rdpScreen.CreatePixmap = pScreen->CreatePixmap;
g_rdpScreen.DestroyPixmap = pScreen->DestroyPixmap; g_rdpScreen.DestroyPixmap = pScreen->DestroyPixmap;
/* Window Procedures */ /* Window Procedures */
//g_rdpScreen.PaintWindowBackground = pScreen->PaintWindowBackground;
//g_rdpScreen.PaintWindowBorder = pScreen->PaintWindowBorder;
g_rdpScreen.CopyWindow = pScreen->CopyWindow; g_rdpScreen.CopyWindow = pScreen->CopyWindow;
g_rdpScreen.ClearToBackground = pScreen->ClearToBackground; g_rdpScreen.ClearToBackground = pScreen->ClearToBackground;
/* Backing store procedures */ /* Backing store procedures */
@ -372,8 +368,6 @@ rdpScreenInit(int index, ScreenPtr pScreen, int argc, char** argv)
/* pScreen->CreatePixmap = rdpCreatePixmap; */ /* pScreen->CreatePixmap = rdpCreatePixmap; */
/* pScreen->DestroyPixmap = rdpDestroyPixmap; */ /* pScreen->DestroyPixmap = rdpDestroyPixmap; */
/* Window Procedures */ /* Window Procedures */
//pScreen->PaintWindowBackground = rdpPaintWindowBackground;
//pScreen->PaintWindowBorder = rdpPaintWindowBorder;
pScreen->CopyWindow = rdpCopyWindow; pScreen->CopyWindow = rdpCopyWindow;
pScreen->ClearToBackground = rdpClearToBackground; pScreen->ClearToBackground = rdpClearToBackground;
/* Backing store procedures */ /* Backing store procedures */
@ -435,6 +429,7 @@ rdpScreenInit(int index, ScreenPtr pScreen, int argc, char** argv)
else else
{ {
pRRScrPriv = rrGetScrPriv(pScreen); pRRScrPriv = rrGetScrPriv(pScreen);
ErrorF("pRRScrPriv %p\n", pRRScrPriv);
pRRScrPriv->rrGetInfo = rdpRandRGetInfo; pRRScrPriv->rrGetInfo = rdpRandRGetInfo;
pRRScrPriv->rrSetConfig = rdpRandRSetConfig; pRRScrPriv->rrSetConfig = rdpRandRSetConfig;
} }
@ -551,11 +546,6 @@ InitOutput(ScreenInfo* screenInfo, int argc, char** argv)
{ {
screenInfo->formats[i] = g_formats[i]; screenInfo->formats[i] = g_formats[i];
} }
//g_rdpGCIndex = miAllocateGCPrivateIndex();
//if (g_rdpGCIndex < 0)
//{
// FatalError("InitOutput: miAllocateGCPrivateIndex failed\n");
//}
if (!AddCallback(&ClientStateCallback, rdpClientStateChange, NULL)) if (!AddCallback(&ClientStateCallback, rdpClientStateChange, NULL))
{ {
rdpLog("InitOutput: AddCallback failed\n"); rdpLog("InitOutput: AddCallback failed\n");
@ -616,7 +606,6 @@ void
ProcessInputEvents(void) ProcessInputEvents(void)
{ {
mieqProcessInputEvents(); mieqProcessInputEvents();
//miPointerUpdate();
} }
/******************************************************************************/ /******************************************************************************/
@ -804,7 +793,7 @@ rdpInvalidateArea(ScreenPtr pScreen, int x, int y, int cx, int cy)
Mask mask; Mask mask;
DEBUG_OUT(("rdpInvalidateArea:\n")); DEBUG_OUT(("rdpInvalidateArea:\n"));
rootWindow = 0; // GetCurrentRootWindow(); rootWindow = GetCurrentRootWindow(g_keyboard);
if (rootWindow != 0) if (rootWindow != 0)
{ {
mask = 0; mask = 0;
@ -846,6 +835,7 @@ rdpRandRSetConfig(ScreenPtr pScreen, Rotation rotateKind, int rate,
WindowPtr rootWindow; WindowPtr rootWindow;
BoxRec box; BoxRec box;
ErrorF("rdpRandRSetConfig:\n");
if ((pSize->width < 1) || (pSize->height < 1)) if ((pSize->width < 1) || (pSize->height < 1))
{ {
ErrorF("rdpRandRSetConfig: error width %d height %d\n", ErrorF("rdpRandRSetConfig: error width %d height %d\n",
@ -887,7 +877,7 @@ rdpRandRSetConfig(ScreenPtr pScreen, Rotation rotateKind, int rate,
screenPixmap->drawable.width, screenPixmap->drawable.height)); screenPixmap->drawable.width, screenPixmap->drawable.height));
/* memset(g_rdpScreen.pfbMemory, 0xff, 2048 * 2048 * 4); */ /* memset(g_rdpScreen.pfbMemory, 0xff, 2048 * 2048 * 4); */
} }
rootWindow = 0; // GetCurrentRootWindow(); rootWindow = GetCurrentRootWindow(g_keyboard);
if (rootWindow != 0) if (rootWindow != 0)
{ {
DEBUG_OUT(("rdpRandRSetConfig: rootWindow %p\n", (void*)rootWindow)); DEBUG_OUT(("rdpRandRSetConfig: rootWindow %p\n", (void*)rootWindow));

@ -282,10 +282,10 @@ rdpup_recv_msg(struct stream* s)
static int static int
process_screen_size_msg(int width, int height, int bpp) process_screen_size_msg(int width, int height, int bpp)
{ {
//RRScreenSizePtr pSize; RRScreenSizePtr pSize;
int mmwidth; int mmwidth;
int mmheight; int mmheight;
//int error; int error;
ErrorF("process_screen_size_msg: set width %d height %d bpp %d\n", ErrorF("process_screen_size_msg: set width %d height %d bpp %d\n",
width, height, bpp); width, height, bpp);
@ -314,16 +314,22 @@ process_screen_size_msg(int width, int height, int bpp)
} }
mmwidth = PixelToMM(width); mmwidth = PixelToMM(width);
mmheight = PixelToMM(height); mmheight = PixelToMM(height);
//pSize = RRRegisterSize(g_pScreen, width, height, mmwidth, mmheight);
//RRSetCurrentConfig(g_pScreen, RR_Rotate_0, 0, pSize); return 0;
pSize = RRRegisterSize(g_pScreen, width, height, mmwidth, mmheight);
RRSetCurrentConfig(g_pScreen, RR_Rotate_0, 0, pSize);
if ((g_rdpScreen.width != width) || (g_rdpScreen.height != height)) if ((g_rdpScreen.width != width) || (g_rdpScreen.height != height))
{ {
ErrorF(" calling ProcRRSetScreenConfig\n");
error = 0;
//error = ProcRRSetScreenConfig(serverClient);
//error = RRSetScreenConfig(g_pScreen, RR_Rotate_0, 0, pSize); //error = RRSetScreenConfig(g_pScreen, RR_Rotate_0, 0, pSize);
//if (error == BadImplementation) if (error == BadImplementation)
//{ {
// ErrorF("process_screen_size_msg: RRSetScreenConfig returned " ErrorF("process_screen_size_msg: RRSetScreenConfig returned "
// "BadImplementation\n"); "BadImplementation\n");
//} }
} }
return 0; return 0;
} }
@ -928,6 +934,7 @@ get_single_color(int x, int y, int w, int h)
unsigned short* i16; unsigned short* i16;
unsigned int* i32; unsigned int* i32;
p = 0;
rv = -1; rv = -1;
if (g_Bpp == 1) if (g_Bpp == 1)
{ {

Loading…
Cancel
Save