"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "module/rdpRandR.c" between
xorgxrdp-0.2.11.tar.gz and xorgxrdp-0.2.12.tar.gz

About: xorgxrdp is a collection of modules to be used with a pre-existing X.Org install to make the X server act like X11rdp (requires "xrdp").

rdpRandR.c  (xorgxrdp-0.2.11):rdpRandR.c  (xorgxrdp-0.2.12)
skipping to change at line 51 skipping to change at line 51
#include <fb.h> #include <fb.h>
#include <micmap.h> #include <micmap.h>
#include <mi.h> #include <mi.h>
#include "rdp.h" #include "rdp.h"
#include "rdpDraw.h" #include "rdpDraw.h"
#include "rdpReg.h" #include "rdpReg.h"
#include "rdpMisc.h" #include "rdpMisc.h"
#include "rdpRandR.h" #include "rdpRandR.h"
#if defined(XORGXRDP_GLAMOR)
#include <glamor.h>
#endif
static int g_panning = 0; static int g_panning = 0;
/******************************************************************************/ /******************************************************************************/
#define LOG_LEVEL 1 #define LOG_LEVEL 1
#define LLOGLN(_level, _args) \ #define LLOGLN(_level, _args) \
do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0) do { if (_level < LOG_LEVEL) { ErrorF _args ; ErrorF("\n"); } } while (0)
/******************************************************************************/ /******************************************************************************/
Bool Bool
rdpRRRegisterSize(ScreenPtr pScreen, int width, int height) rdpRRRegisterSize(ScreenPtr pScreen, int width, int height)
skipping to change at line 95 skipping to change at line 99
/******************************************************************************/ /******************************************************************************/
Bool Bool
rdpRRGetInfo(ScreenPtr pScreen, Rotation *pRotations) rdpRRGetInfo(ScreenPtr pScreen, Rotation *pRotations)
{ {
LLOGLN(0, ("rdpRRGetInfo:")); LLOGLN(0, ("rdpRRGetInfo:"));
*pRotations = RR_Rotate_0; *pRotations = RR_Rotate_0;
return TRUE; return TRUE;
} }
#if defined(XORGXRDP_GLAMOR)
/*****************************************************************************/
static int
rdpRRSetPixmapVisitWindow(WindowPtr window, void *data)
{
ScreenPtr screen;
LLOGLN(10, ("rdpRRSetPixmapVisitWindow:"));
screen = window->drawable.pScreen;
if (screen->GetWindowPixmap(window) == data)
{
screen->SetWindowPixmap(window, screen->GetScreenPixmap(screen));
return WT_WALKCHILDREN;
}
return WT_DONTWALKCHILDREN;
}
#endif
/******************************************************************************/ /******************************************************************************/
Bool Bool
rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
CARD32 mmWidth, CARD32 mmHeight) CARD32 mmWidth, CARD32 mmHeight)
{ {
WindowPtr root; WindowPtr root;
PixmapPtr screenPixmap; PixmapPtr screenPixmap;
BoxRec box; BoxRec box;
rdpPtr dev; rdpPtr dev;
LLOGLN(0, ("rdpRRScreenSetSize: width %d height %d mmWidth %d mmHeight %d", LLOGLN(0, ("rdpRRScreenSetSize: width %d height %d mmWidth %d mmHeight %d",
width, height, (int)mmWidth, (int)mmHeight)); width, height, (int)mmWidth, (int)mmHeight));
dev = rdpGetDevFromScreen(pScreen); dev = rdpGetDevFromScreen(pScreen);
if (dev->allow_screen_resize == 0)
{
LLOGLN(0, ("rdpRRScreenSetSize: not allowing resize"));
return FALSE;
}
root = rdpGetRootWindowPtr(pScreen); root = rdpGetRootWindowPtr(pScreen);
if ((width < 1) || (height < 1)) if ((width < 1) || (height < 1))
{ {
LLOGLN(10, (" error width %d height %d", width, height)); LLOGLN(10, (" error width %d height %d", width, height));
return FALSE; return FALSE;
} }
dev->width = width; dev->width = width;
dev->height = height; dev->height = height;
dev->paddedWidthInBytes = PixmapBytePad(dev->width, dev->depth); dev->paddedWidthInBytes = PixmapBytePad(dev->width, dev->depth);
dev->sizeInBytes = dev->paddedWidthInBytes * dev->height; dev->sizeInBytes = dev->paddedWidthInBytes * dev->height;
pScreen->width = width; pScreen->width = width;
pScreen->height = height; pScreen->height = height;
pScreen->mmWidth = mmWidth; pScreen->mmWidth = mmWidth;
pScreen->mmHeight = mmHeight; pScreen->mmHeight = mmHeight;
screenPixmap = pScreen->GetScreenPixmap(pScreen); screenPixmap = dev->screenSwPixmap;
free(dev->pfbMemory_alloc); free(dev->pfbMemory_alloc);
dev->pfbMemory_alloc = g_new0(uint8_t, dev->sizeInBytes + 16); dev->pfbMemory_alloc = g_new0(uint8_t, dev->sizeInBytes + 16);
dev->pfbMemory = (uint8_t *) RDPALIGN(dev->pfbMemory_alloc, 16); dev->pfbMemory = (uint8_t *) RDPALIGN(dev->pfbMemory_alloc, 16);
if (screenPixmap != 0) pScreen->ModifyPixmapHeader(screenPixmap, width, height,
-1, -1,
dev->paddedWidthInBytes,
dev->pfbMemory);
if (dev->glamor)
{ {
pScreen->ModifyPixmapHeader(screenPixmap, width, height, #if defined(XORGXRDP_GLAMOR)
-1, -1, PixmapPtr old_screen_pixmap;
dev->paddedWidthInBytes, uint32_t screen_tex;
dev->pfbMemory); old_screen_pixmap = pScreen->GetScreenPixmap(pScreen);
screenPixmap = pScreen->CreatePixmap(pScreen,
pScreen->width,
pScreen->height,
pScreen->rootDepth,
GLAMOR_CREATE_NO_LARGE);
if (screenPixmap == NULL)
{
return FALSE;
}
screen_tex = glamor_get_pixmap_texture(screenPixmap);
LLOGLN(0, ("rdpRRScreenSetSize: screen_tex 0x%8.8x", screen_tex));
pScreen->SetScreenPixmap(screenPixmap);
if ((pScreen->root != NULL) && (pScreen->SetWindowPixmap != NULL))
{
TraverseTree(pScreen->root, rdpRRSetPixmapVisitWindow, old_screen_pi
xmap);
}
pScreen->DestroyPixmap(old_screen_pixmap);
#endif
} }
box.x1 = 0; box.x1 = 0;
box.y1 = 0; box.y1 = 0;
box.x2 = width; box.x2 = width;
box.y2 = height; box.y2 = height;
rdpRegionInit(&root->winSize, &box, 1); rdpRegionInit(&root->winSize, &box, 1);
rdpRegionInit(&root->borderSize, &box, 1); rdpRegionInit(&root->borderSize, &box, 1);
rdpRegionReset(&root->borderClip, &box); rdpRegionReset(&root->borderClip, &box);
rdpRegionBreak(&root->clipList); rdpRegionBreak(&root->clipList);
root->drawable.width = width; root->drawable.width = width;
 End of changes. 6 change blocks. 
6 lines changed or deleted 56 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)