diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 19:39:46 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 19:39:46 +0000 |
commit | 4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (patch) | |
tree | c1e02b9d3509aa97703aa4b540d4cd22ec4600ed /xorg-server/hw/kdrive/ephyr/ephyr.c | |
parent | dc3c299dd0995549e2a6973ca0f25b254afd38a5 (diff) | |
download | vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.gz vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.bz2 vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.zip |
Added xorg-server-1.6.2.tar.gz
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr/ephyr.c')
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyr.c | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c index b02f9903c..ab8459cfc 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.c +++ b/xorg-server/hw/kdrive/ephyr/ephyr.c @@ -32,11 +32,11 @@ #include "scrnintstr.h" #include "ephyrlog.h" -#ifdef XEPHYR_DRI +#ifdef XF86DRI #include "ephyrdri.h" #include "ephyrdriext.h" #include "ephyrglxext.h" -#endif /*XEPHYR_DRI*/ +#endif /* XF86DRI */ extern int KdTsPhyScreen; #ifdef GLXEXT @@ -91,7 +91,7 @@ Bool ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv) { int width = 640, height = 480; - unsigned long redMask, greenMask, blueMask; + CARD32 redMask, greenMask, blueMask; if (hostx_want_screen_size(screen, &width, &height) || !screen->width || !screen->height) @@ -150,11 +150,22 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv) screen->fb[0].depth = 16; screen->fb[0].bitsPerPixel = 16; } - else + else if (screen->fb[0].depth <= 24) { screen->fb[0].depth = 24; screen->fb[0].bitsPerPixel = 32; } + else if (screen->fb[0].depth <= 30) + { + screen->fb[0].depth = 30; + screen->fb[0].bitsPerPixel = 32; + } + else + { + ErrorF("\nXephyr: Unsupported screen depth %d\n", + screen->fb[0].depth); + return FALSE; + } hostx_get_visual_masks (screen, &redMask, &greenMask, &blueMask); @@ -174,12 +185,11 @@ ephyrScreenInit (KdScreenInfo *screen) { EphyrScrPriv *scrpriv; - scrpriv = xalloc (sizeof (EphyrScrPriv)); + scrpriv = xcalloc (1, sizeof (EphyrScrPriv)); if (!scrpriv) return FALSE; - memset (scrpriv, 0, sizeof (EphyrScrPriv)); screen->driver = scrpriv; if (!ephyrScreenInitialize (screen, scrpriv)) @@ -515,8 +525,6 @@ ephyrRandRSetConfig (ScreenPtr pScreen, scrpriv->randr = KdAddRotation (screen->randr, randr); - KdOffscreenSwapOut (screen->pScreen); - ephyrUnmapFramebuffer (screen); screen->width = newwidth; @@ -631,7 +639,7 @@ ephyrInitScreen (ScreenPtr pScreen) } #endif /*XV*/ -#ifdef XEPHYR_DRI +#ifdef XF86DRI if (!ephyrNoDRI && !hostx_has_dri ()) { EPHYR_LOG ("host x does not support DRI. Disabling DRI forwarding\n") ; ephyrNoDRI = TRUE ; @@ -826,11 +834,11 @@ ephyrCrossScreen (ScreenPtr pScreen, Bool entering) int ephyrCurScreen; /*current event screen*/ static void -ephyrWarpCursor (ScreenPtr pScreen, int x, int y) +ephyrWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { ephyrBlockSigio (); ephyrCurScreen = pScreen->myNum; - miPointerWarpCursor (pScreen, x, y); + miPointerWarpCursor (inputInfo.pointer, pScreen, x, y); ephyrUnblockSigio (); } @@ -838,10 +846,12 @@ miPointerScreenFuncRec ephyrPointerScreenFuncs = { ephyrCursorOffScreen, ephyrCrossScreen, - ephyrWarpCursor + ephyrWarpCursor, + NULL, + NULL }; -#ifdef XEPHYR_DRI +#ifdef XF86DRI /** * find if the remote window denoted by a_remote * is paired with an internal Window within the Xephyr server. @@ -873,7 +883,7 @@ ephyrExposePairedWindow (int a_remote) screen->WindowExposures (pair->local, ®, NullRegion); REGION_UNINIT (screen, ®); } -#endif /*XEPHYR_DRI*/ +#endif /* XF86DRI */ void ephyrPoll(void) @@ -900,7 +910,7 @@ ephyrPoll(void) if (ev.data.mouse_motion.screen >= 0) { ephyrWarpCursor - (screenInfo.screens[ev.data.mouse_motion.screen], + (inputInfo.pointer, screenInfo.screens[ev.data.mouse_motion.screen], ev.data.mouse_motion.x, ev.data.mouse_motion.y ); } @@ -908,14 +918,14 @@ ephyrPoll(void) else { int x=0, y=0; -#ifdef XEPHYR_DRI +#ifdef XF86DRI EphyrWindowPair *pair = NULL; #endif EPHYR_LOG ("enqueuing mouse motion:%d\n", ephyrCurScreen) ; x = ev.data.mouse_motion.x; y = ev.data.mouse_motion.y; EPHYR_LOG ("initial (x,y):(%d,%d)\n", x, y) ; -#ifdef XEPHYR_DRI +#ifdef XF86DRI EPHYR_LOG ("is this window peered by a gl drawable ?\n") ; if (findWindowPairFromRemote (ev.data.mouse_motion.window, &pair)) @@ -972,7 +982,7 @@ ephyrPoll(void) KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE); break; -#ifdef XEPHYR_DRI +#ifdef XF86DRI case EPHYR_EV_EXPOSE: /* * We only receive expose events when the expose event have @@ -982,7 +992,7 @@ ephyrPoll(void) */ ephyrExposePairedWindow (ev.data.expose.window); break; -#endif /*XEPHYR_DRI*/ +#endif /* XF86DRI */ default: break; |