Example #1
0
void
winSetShapeRootless(WindowPtr pWin, int kind)
{
    ScreenPtr pScreen = pWin->drawable.pScreen;

    winScreenPriv(pScreen);

  winDebug ("winSetShapeRootless (%p, %i)\n", pWin, kind);

    WIN_UNWRAP(SetShape);
    (*pScreen->SetShape) (pWin, kind);
    WIN_WRAP(SetShape, winSetShapeRootless);

    winReshapeRootless(pWin);
    winUpdateRgnRootless(pWin);

    return;
}
Example #2
0
Bool
winChangeWindowAttributesRootless(WindowPtr pWin, unsigned long mask)
{
    Bool fResult = FALSE;
    ScreenPtr pScreen = pWin->drawable.pScreen;

    winScreenPriv(pScreen);

  winDebug ("winChangeWindowAttributesRootless (%p)\n", pWin);

    WIN_UNWRAP(ChangeWindowAttributes);
    fResult = (*pScreen->ChangeWindowAttributes) (pWin, mask);
    WIN_WRAP(ChangeWindowAttributes, winChangeWindowAttributesRootless);

    winUpdateRgnRootless(pWin);

    return fResult;
}
Example #3
0
Bool
winDestroyWindowNativeGDI (WindowPtr pWin)
{
  Bool			fResult = TRUE;
  ScreenPtr		pScreen = pWin->drawable.pScreen;
  winWindowPriv(pWin);
  winScreenPriv(pScreen);

#if CYGDEBUG
  winTrace ("winDestroyWindowNativeGDI (%p)\n", pWin);
#endif

  WIN_UNWRAP(DestroyWindow); 
  fResult = (*pScreen->DestroyWindow)(pWin);
  WIN_WRAP(DestroyWindow, winDestroyWindowNativeGDI);

  return fResult;
}
Example #4
0
static Bool
winCreateScreenResources(ScreenPtr pScreen)
{
    winScreenPriv(pScreen);
    Bool result;

    result = pScreenPriv->pwinCreateScreenResources(pScreen);

    /* Now the screen bitmap has been wrapped in a pixmap,
       add that to the Shadow framebuffer */
    if (!shadowAdd(pScreen, pScreen->devPrivate,
                   pScreenPriv->pwinShadowUpdate, NULL, 0, 0)) {
        ErrorF("winCreateScreenResources - shadowAdd () failed\n");
        return FALSE;
    }

    return result;
}
Example #5
0
Bool
winPositionWindowRootless(WindowPtr pWin, int x, int y)
{
    Bool fResult = FALSE;
    ScreenPtr pScreen = pWin->drawable.pScreen;

    winScreenPriv(pScreen);

    winDebug ("winPositionWindowRootless (%p)\n", pWin);

    WIN_UNWRAP(PositionWindow);
    fResult = (*pScreen->PositionWindow) (pWin, x, y);
    WIN_WRAP(PositionWindow, winPositionWindowRootless);

    winUpdateRgnRootless(pWin);

    return fResult;
}
Example #6
0
Bool
winPositionWindowNativeGDI (WindowPtr pWin, int x, int y)
{
  Bool			fResult = TRUE;
  ScreenPtr		pScreen = pWin->drawable.pScreen;
  winWindowPriv(pWin);
  winScreenPriv(pScreen);

#if CYGDEBUG
  winTrace ("winPositionWindowNativeGDI (%p)\n", pWin);
#endif

  WIN_UNWRAP(PositionWindow);
  fResult = (*pScreen->PositionWindow)(pWin, x, y);
  WIN_WRAP(PositionWindow, winPositionWindowNativeGDI);

  return fResult;
}
Example #7
0
void
winDoRandRScreenSetSize(ScreenPtr pScreen,
                        CARD16 width,
                        CARD16 height, CARD32 mmWidth, CARD32 mmHeight)
{
    winScreenPriv(pScreen);
    winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
    WindowPtr pRoot = pScreen->root;

    // Prevent screen updates while we change things around
    SetRootClip(pScreen, FALSE);

    /* Update the screen size as requested */
    pScreenInfo->dwWidth = width;
    pScreenInfo->dwHeight = height;

    /* Reallocate the framebuffer used by the drawing engine */
    (*pScreenPriv->pwinFreeFB) (pScreen);
    if (!(*pScreenPriv->pwinAllocateFB) (pScreen)) {
        ErrorF("winDoRandRScreenSetSize - Could not reallocate framebuffer\n");
    }

    pScreen->width = width;
    pScreen->height = height;
    pScreen->mmWidth = mmWidth;
    pScreen->mmHeight = mmHeight;

    /* Update the screen pixmap to point to the new framebuffer */
    winUpdateFBPointer(pScreen, pScreenInfo->pfb);

    // pScreen->devPrivate == pScreen->GetScreenPixmap(screen) ?
    // resize the root window
    //pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);
    // does this emit a ConfigureNotify??

    // Restore the ability to update screen, now with new dimensions
    SetRootClip(pScreen, TRUE);

    // and arrange for it to be repainted
    pScreen->PaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);

    /* Indicate that a screen size change took place */
    RRScreenSizeNotify(pScreen);
}
Example #8
0
Bool
qtRealizeInstalledPaletteShadow (ScreenPtr pScreen)
{
#if 0	/* ### NOT YET */
	winScreenPriv(pScreen);
	winPrivCmapPtr	pCmapPriv = NULL;

#if QTDEBUG
	ErrorF ("qtRealizeInstalledPaletteShadow\n");
#endif

	/* Don't do anything if there is not a colormap */
	if (pScreenPriv->pcmapInstalled == NULL)
	{
#if QTDEBUG
		ErrorF ("qtRealizeInstalledPaletteShadow - No colormap "
			"installed\n");
#endif
		return TRUE;
	}

	pCmapPriv = winGetCmapPriv (pScreenPriv->pcmapInstalled);
  
	/* Realize our palette for the screen */
	if (RealizePalette (pScreenPriv->hdcScreen) == _ERROR)
	{
		ErrorF ("qtRealizeInstalledPaletteShadow - RealizePalette () "
			"failed\n");
		return FALSE;
	}
  
	/* Set the DIB color table */
	if (SetDIBColorTable (pScreenPriv->hdcShadow,
			      0,
			      WIN_NUM_PALETTE_ENTRIES,
			      pCmapPriv->rgbColors) == 0)
	{
		ErrorF ("qtRealizeInstalledPaletteShadow - SetDIBColorTable () "
			"failed\n");
		return FALSE;
	}
#endif  
	return TRUE;
}
Example #9
0
static Bool
winDestroyColormapShadowGDI(ColormapPtr pColormap)
{
    winScreenPriv(pColormap->pScreen);
    winCmapPriv(pColormap);

    /*
     * Is colormap to be destroyed the default?
     *
     * Non-default colormaps should have had winUninstallColormap
     * called on them before we get here.  The default colormap
     * will not have had winUninstallColormap called on it.  Thus,
     * we need to handle the default colormap in a special way.
     */
    if (pColormap->flags & IsDefault) {
#if CYGDEBUG
        winDebug("winDestroyColormapShadowGDI - Destroying default "
                 "colormap\n");
#endif

        /*
         * FIXME: Walk the list of all screens, popping the default
         * palette out of each screen device context.
         */

        /* Pop the palette out of the device context */
        SelectPalette(pScreenPriv->hdcScreen,
                      GetStockObject(DEFAULT_PALETTE), FALSE);

        /* Clear our private installed colormap pointer */
        pScreenPriv->pcmapInstalled = NULL;
    }

    /* Try to delete the logical palette */
    if (DeleteObject(pCmapPriv->hPalette) == 0) {
        ErrorF("winDestroyColormap - DeleteObject () failed\n");
        return FALSE;
    }

    /* Invalidate the colormap privates */
    pCmapPriv->hPalette = NULL;

    return TRUE;
}
Example #10
0
Bool
winCreateWindowRootless(WindowPtr pWin)
{
    Bool fResult = FALSE;
    ScreenPtr pScreen = pWin->drawable.pScreen;

    winWindowPriv(pWin);
    winScreenPriv(pScreen);

  winDebug ("winCreateWindowRootless (%p)\n", pWin);

    WIN_UNWRAP(CreateWindow);
    fResult = (*pScreen->CreateWindow) (pWin);
    WIN_WRAP(CreateWindow, winCreateWindowRootless);

    pWinPriv->hRgn = NULL;

    return fResult;
}
void
winReparentWindowMultiWindow (WindowPtr pWin, WindowPtr pPriorParent)
{
  ScreenPtr		pScreen = pWin->drawable.pScreen;
  winWindowPriv(pWin);
  winScreenPriv(pScreen);

#if CYGMULTIWINDOW_DEBUG
  ErrorF ("winReparentMultiWindow - pWin: %08x\n", pWin);
#endif

  WIN_UNWRAP(ReparentWindow);
  if (pScreen->ReparentWindow) 
    (*pScreen->ReparentWindow)(pWin, pPriorParent);
  WIN_WRAP(ReparentWindow, winReparentWindowMultiWindow);
  
  /* Update the Windows window associated with this X window */
  winUpdateWindowsWindow (pWin);
}
Example #12
0
static void
winPointerWarpCursor (ScreenPtr pScreen, int x, int y)
{
  winScreenPriv(pScreen);
  RECT			rcClient;
  static Bool		s_fInitialWarp = TRUE;

  /* Discard first warp call */
  if (s_fInitialWarp)
    {
      /* First warp moves mouse to center of window, just ignore it */

      /* Don't ignore subsequent warps */
      s_fInitialWarp = FALSE;

      winErrorFVerb (2, "winPointerWarpCursor - Discarding first warp: %d %d\n",
	      x, y);
      
      return;
    }

  /* Only update the Windows cursor position if we are active */
  if (pScreenPriv->hwndScreen == GetForegroundWindow ())
    {
      /* Get the client area coordinates */
      GetClientRect (pScreenPriv->hwndScreen, &rcClient);
      
      /* Translate the client area coords to screen coords */
      MapWindowPoints (pScreenPriv->hwndScreen,
		       HWND_DESKTOP,
		       (LPPOINT)&rcClient,
		       2);
      
      /* 
       * Update the Windows cursor position so that we don't
       * immediately warp back to the current position.
       */
      SetCursorPos (rcClient.left + x, rcClient.top + y);
    }

  /* Call the mi warp procedure to do the actual warping in X. */
  miPointerWarpCursor (pScreen, x, y);
}
Example #13
0
Bool
winMapWindowNativeGDI(WindowPtr pWin)
{
    Bool fResult = TRUE;
    ScreenPtr pScreen = pWin->drawable.pScreen;

    winScreenPriv(pScreen);

#if CYGDEBUG
    winTrace("winMapWindowNativeGDI (%p)\n", pWin);
#endif

    WIN_UNWRAP(RealizeWindow);
    fResult = (*pScreen->RealizeWindow) (pWin);
    WIN_WRAP(RealizeWindow, winMapWindowMultiWindow);

    return fResult;

}
void
winSetShapeMultiWindow(WindowPtr pWin, int kind)
{
    ScreenPtr pScreen = pWin->drawable.pScreen;

    winScreenPriv(pScreen);

  winDebug ("winSetShapeMultiWindow - pWin: %p kind: %i\n", pWin, kind);

    WIN_UNWRAP(SetShape);
    (*pScreen->SetShape) (pWin, kind);
    WIN_WRAP(SetShape, winSetShapeMultiWindow);

    /* Update the Windows window's shape */
    winReshapeMultiWindow(pWin);
    winUpdateRgnMultiWindow(pWin);

    return;
}
Example #15
0
static Bool
winRealizeInstalledPaletteShadowGDI (ScreenPtr pScreen)
{
  winScreenPriv(pScreen);
  winPrivCmapPtr	pCmapPriv = NULL;

#if CYGDEBUG
  winDebug ("winRealizeInstalledPaletteShadowGDI\n");
#endif

  /* Don't do anything if there is not a colormap */
  if (pScreenPriv->pcmapInstalled == NULL)
    {
#if CYGDEBUG
      winDebug ("winRealizeInstalledPaletteShadowGDI - No colormap "
	      "installed\n");
#endif
      return TRUE;
    }

  pCmapPriv = winGetCmapPriv (pScreenPriv->pcmapInstalled);
  
  /* Realize our palette for the screen */
  if (RealizePalette (pScreenPriv->hdcScreen) == GDI_ERROR)
    {
      ErrorF ("winRealizeInstalledPaletteShadowGDI - RealizePalette () "
	      "failed\n");
      return FALSE;
    }
  
  /* Set the DIB color table */
  if (SetDIBColorTable (pScreenPriv->hdcShadow,
			0,
			WIN_NUM_PALETTE_ENTRIES,
			pCmapPriv->rgbColors) == 0)
    {
      ErrorF ("winRealizeInstalledPaletteShadowGDI - SetDIBColorTable () "
	      "failed\n");
      return FALSE;
    }
  
  return TRUE;
}
static void
winFreeFBShadowDDNL(ScreenPtr pScreen)
{
  winScreenPriv(pScreen);
  winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;

  /* Free the shadow surface, if there is one */
  if (pScreenPriv->pddsShadow4)
    {
      IDirectDrawSurface4_Release (pScreenPriv->pddsShadow4);
      free (pScreenInfo->pfb);
      pScreenInfo->pfb = NULL;
      pScreenPriv->pddsShadow4 = NULL;
    }

  /* Detach the clipper from the primary surface and release the primary surface, if there is one */
  winReleasePrimarySurfaceShadowDDNL(pScreen);

  /* Release the clipper object */
  if (pScreenPriv->pddcPrimary)
    {
      IDirectDrawClipper_Release (pScreenPriv->pddcPrimary);
      pScreenPriv->pddcPrimary = NULL;
    }

  /* Free the DirectDraw4 object, if there is one */
  if (pScreenPriv->pdd4)
    {
      IDirectDraw4_RestoreDisplayMode (pScreenPriv->pdd4);
      IDirectDraw4_Release (pScreenPriv->pdd4);
      pScreenPriv->pdd4 = NULL;
    }

  /* Free the DirectDraw object, if there is one */
  if (pScreenPriv->pdd)
    {
      IDirectDraw_Release (pScreenPriv->pdd);
      pScreenPriv->pdd = NULL;
    }

  /* Invalidate the ScreenInfo's fb pointer */
  pScreenInfo->pfb = NULL;
}
Example #17
0
static Bool
winActivateAppShadowGDI (ScreenPtr pScreen)
{
  winScreenPriv(pScreen);
  winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;

  /*
   * 2004/04/12 - Harold - We perform the restoring or minimizing
   * manually for ShadowGDI in fullscreen modes so that this engine
   * will perform just like ShadowDD and ShadowDDNL in fullscreen mode;
   * if we do not do this then our fullscreen window will appear in the
   * z-order when it is deactivated and it can be uncovered by resizing
   * or minimizing another window that is on top of it, which is not how
   * the DirectDraw engines work.  Therefore we keep this code here to
   * make sure that all engines work the same in fullscreen mode.
   */

  /*
   * Are we active?
   * Are we fullscreen?
   */
  if (pScreenPriv->fActive
      && pScreenInfo->fFullScreen)
    {
      /*
       * Activating, attempt to bring our window 
       * to the top of the display
       */
      ShowWindow (pScreenPriv->hwndScreen, SW_RESTORE);
    }
  else if (!pScreenPriv->fActive
	   && pScreenInfo->fFullScreen)
    {
      /*
       * Deactivating, stuff our window onto the
       * task bar.
       */
      ShowWindow (pScreenPriv->hwndScreen, SW_MINIMIZE);
    }

  return TRUE;
}
Example #18
0
static Bool
winRedrawScreenShadowDD (ScreenPtr pScreen)
{
  winScreenPriv(pScreen);
  winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;
  HRESULT		ddrval = DD_OK;
  RECT			rcSrc, rcDest;
  POINT			ptOrigin;

  /* Get the origin of the window in the screen coords */
  ptOrigin.x = pScreenInfo->dwXOffset;
  ptOrigin.y = pScreenInfo->dwYOffset;
  MapWindowPoints (pScreenPriv->hwndScreen,
		   HWND_DESKTOP,
		   (LPPOINT)&ptOrigin, 1);
  rcDest.left = ptOrigin.x;
  rcDest.right = ptOrigin.x + pScreenInfo->dwWidth;
  rcDest.top = ptOrigin.y;
  rcDest.bottom = ptOrigin.y + pScreenInfo->dwHeight;

  /* Source can be entire shadow surface, as Blt should clip for us */
  rcSrc.left = 0;
  rcSrc.top = 0;
  rcSrc.right = pScreenInfo->dwWidth;
  rcSrc.bottom = pScreenInfo->dwHeight;

  /* Redraw the whole window, to take account for the new colors */
  ddrval = IDirectDrawSurface2_Blt (pScreenPriv->pddsPrimary,
				    &rcDest,
				    pScreenPriv->pddsShadow,
				    &rcSrc,
				    DDBLT_WAIT,
				    NULL);
  if (FAILED (ddrval))
    {
      ErrorF ("winRedrawScreenShadowDD - IDirectDrawSurface_Blt () "
	      "failed: %08x\n",
	      (unsigned int) ddrval);
    }

  return TRUE;
}
Example #19
0
Bool
winSetEngineFunctionsShadowGDI(ScreenPtr pScreen)
{
    winScreenPriv(pScreen);
    winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;

    /* Set our pointers */
    pScreenPriv->pwinAllocateFB = winAllocateFBShadowGDI;
    pScreenPriv->pwinFreeFB = winFreeFBShadowGDI;
    pScreenPriv->pwinShadowUpdate = winShadowUpdateGDI;
    pScreenPriv->pwinInitScreen = winInitScreenShadowGDI;
    pScreenPriv->pwinCloseScreen = winCloseScreenShadowGDI;
    pScreenPriv->pwinInitVisuals = winInitVisualsShadowGDI;
    pScreenPriv->pwinAdjustVideoMode = winAdjustVideoModeShadowGDI;
    if (pScreenInfo->fFullScreen)
        pScreenPriv->pwinCreateBoundingWindow =
            winCreateBoundingWindowFullScreen;
    else
        pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed;
    pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB;
    pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowGDI;
    pScreenPriv->pwinActivateApp = winActivateAppShadowGDI;
    pScreenPriv->pwinRedrawScreen = winRedrawScreenShadowGDI;
    pScreenPriv->pwinRealizeInstalledPalette =
        winRealizeInstalledPaletteShadowGDI;
    pScreenPriv->pwinInstallColormap = winInstallColormapShadowGDI;
    pScreenPriv->pwinStoreColors = winStoreColorsShadowGDI;
    pScreenPriv->pwinCreateColormap = winCreateColormapShadowGDI;
    pScreenPriv->pwinDestroyColormap = winDestroyColormapShadowGDI;
    pScreenPriv->pwinHotKeyAltTab =
        (winHotKeyAltTabProcPtr) (void (*)(void)) NoopDDA;
    pScreenPriv->pwinCreatePrimarySurface =
        (winCreatePrimarySurfaceProcPtr) (void (*)(void)) NoopDDA;
    pScreenPriv->pwinReleasePrimarySurface =
        (winReleasePrimarySurfaceProcPtr) (void (*)(void)) NoopDDA;
#ifdef XWIN_MULTIWINDOW
    pScreenPriv->pwinFinishCreateWindowsWindow =
        (winFinishCreateWindowsWindowProcPtr) (void (*)(void)) NoopDDA;
#endif

    return TRUE;
}
Example #20
0
static Bool
winActivateAppShadowDD (ScreenPtr pScreen)
{
  winScreenPriv(pScreen);

  /*
   * Do we have a surface?
   * Are we active?
   * Are we fullscreen?
   */
  if (pScreenPriv != NULL
      && pScreenPriv->pddsPrimary != NULL
      && pScreenPriv->fActive)
    {
      /* Primary surface was lost, restore it */
      IDirectDrawSurface2_Restore (pScreenPriv->pddsPrimary);
    }

  return TRUE;
}
Example #21
0
Bool
winMapWindowRootless(WindowPtr pWin)
{
    Bool fResult = FALSE;
    ScreenPtr pScreen = pWin->drawable.pScreen;

    winScreenPriv(pScreen);

  winDebug ("winMapWindowRootless (%p)\n", pWin);

    WIN_UNWRAP(RealizeWindow);
    fResult = (*pScreen->RealizeWindow) (pWin);
    WIN_WRAP(RealizeWindow, winMapWindowRootless);

    winReshapeRootless(pWin);

    winUpdateRgnRootless(pWin);

    return fResult;
}
Example #22
0
static Bool
winRedrawScreenShadowGDI(ScreenPtr pScreen)
{
    winScreenPriv(pScreen);
    winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;

    /* Redraw the whole window, to take account for the new colors */
    BitBlt(pScreenPriv->hdcScreen,
           0, 0,
           pScreenInfo->dwWidth, pScreenInfo->dwHeight,
           pScreenPriv->hdcShadow, 0, 0, SRCCOPY);

#ifdef XWIN_MULTIWINDOW
    /* Redraw all windows */
    if (pScreenInfo->fMultiWindow)
        EnumThreadWindows(g_dwCurrentThreadID, winRedrawAllProcShadowGDI, 0);
#endif

    return TRUE;
}
Example #23
0
Bool
winChangeWindowAttributesNativeGDI(WindowPtr pWin, unsigned long mask)
{
    Bool fResult = TRUE;
    ScreenPtr pScreen = pWin->drawable.pScreen;

    winScreenPriv(pScreen);

  winDebug ("winChangeWindowAttributesNativeGDI (%p)\n", pWin);

    WIN_UNWRAP(ChangeWindowAttributes);
    fResult = (*pScreen->ChangeWindowAttributes) (pWin, mask);
    WIN_WRAP(ChangeWindowAttributes, winChangeWindowAttributesNativeGDI);

    /*
     * NOTE: We do not currently need to do anything here.
     */

    return fResult;
}
Example #24
0
void
winSetShapeRootless (WindowPtr pWin)
{
  ScreenPtr		pScreen = pWin->drawable.pScreen;
  winWindowPriv(pWin);
  winScreenPriv(pScreen);

#if CYGDEBUG
  winTrace ("winSetShapeRootless (%p)\n", pWin);
#endif

  WIN_UNWRAP(SetShape); 
  (*pScreen->SetShape)(pWin);
  WIN_WRAP(SetShape, winSetShapeRootless);
  
  winReshapeRootless (pWin);
  winUpdateRgnRootless (pWin);
  
  return;
}
Example #25
0
static Bool
winBltExposedRegionsShadowGDI (ScreenPtr pScreen)
{
  winScreenPriv(pScreen);
  winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;
  winPrivCmapPtr	pCmapPriv = NULL;
  HDC			hdcUpdate;
  PAINTSTRUCT		ps;

  /* BeginPaint gives us an hdc that clips to the invalidated region */
  hdcUpdate = BeginPaint (pScreenPriv->hwndScreen, &ps);

  /* Realize the palette, if we have one */
  if (pScreenPriv->pcmapInstalled != NULL)
    {
      pCmapPriv = winGetCmapPriv (pScreenPriv->pcmapInstalled);
      
      SelectPalette (hdcUpdate, pCmapPriv->hPalette, FALSE);
      RealizePalette (hdcUpdate);
    }

  /* Our BitBlt will be clipped to the invalidated region */
  BitBlt (hdcUpdate,
	  0, 0,
	  pScreenInfo->dwWidth, pScreenInfo->dwHeight,
	  pScreenPriv->hdcShadow,
	  0, 0,
	  SRCCOPY);

  /* EndPaint frees the DC */
  EndPaint (pScreenPriv->hwndScreen, &ps);

#ifdef XWIN_MULTIWINDOW
  /* Redraw all windows */
  if (pScreenInfo->fMultiWindow)
    EnumThreadWindows(g_dwCurrentThreadID, winRedrawAllProcShadowGDI, 
            (LPARAM)pScreenPriv->hwndScreen);
#endif

  return TRUE;
}
Example #26
0
Bool
winActivateAppShadow (ScreenPtr pScreen)
{
#if 0	/* ### NOT YET */
	winScreenPriv(pScreen);
	winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;

#if QTDEBUG
	ErrorF ("qtActivateAppShadow\n");
#endif

	/*
	 * Are we active?
	 * Are we fullscreen?
	 */
	if (pScreenPriv->fActive
	    && pScreenInfo->fFullScreen)
	{
		/*
		 * Activating, attempt to bring our window 
		 * to the top of the display
		 */
		ShowWindow (pScreenPriv->hwndScreen, SW_RESTORE);
	}
	else if (!pScreenPriv->fActive
		 && pScreenInfo->fFullScreen)
	{
		/*
		 * Deactivating, stuff our window onto the
		 * task bar.
		 */
		ShowWindow (pScreenPriv->hwndScreen, SW_MINIMIZE);
	}

#if QTDEBUG
	ErrorF ("qtActivateAppShadow - Returning\n");
#endif

#endif
	return TRUE;
}
Example #27
0
File: winlayer.c Project: aosm/X11
Bool
winRandRGetInfo (ScreenPtr pScreen, Rotation *pRotations)
{
  winScreenPriv(pScreen);
  winScreenInfo			*pScreenInfo = pScreenPriv->pScreenInfo;
  int				n;
  Rotation			rotateKind;
  RRScreenSizePtr		pSize;

  ErrorF ("winRandRGetInfo ()\n");

  /* Don't support rotations, yet */
  *pRotations = RR_Rotate_0; /* | RR_Rotate_90 | RR_Rotate_180 | ... */
  
#if 0
  /* Check for something naughty.  Don't know what exactly... */
  for (n = 0; n < pScreen->numDepths; n++)
    if (pScreen->allowedDepths[n].numVids)
      break;
  if (n == pScreen->numDepths)
    return FALSE;
#endif
  
  /*
   * Register supported sizes.  This can be called many times, but
   * we only support one size for now.
   */
  pSize = RRRegisterSize (pScreen,
			  pScreenInfo->dwWidth,
			  pScreenInfo->dwHeight,
			  pScreenInfo->dwWidth_mm,
			  pScreenInfo->dwHeight_mm);
  
  /* Only one allowed rotation for now */
  rotateKind = RR_Rotate_0;

  /* Tell RandR what the current config is */
  RRSetCurrentConfig (pScreen, rotateKind, pSize);
  
  return TRUE;
}
void
winSetShapeMultiWindow (WindowPtr pWin)
{
  ScreenPtr		pScreen = pWin->drawable.pScreen;
  winWindowPriv(pWin);
  winScreenPriv(pScreen);

#if CYGMULTIWINDOW_DEBUG
  ErrorF ("winSetShapeMultiWindow - pWin: %08x\n", pWin);
#endif
  
  WIN_UNWRAP(SetShape); 
  (*pScreen->SetShape)(pWin);
  WIN_WRAP(SetShape, winSetShapeMultiWindow);
  
  /* Update the Windows window's shape */
  winReshapeMultiWindow (pWin);
  winUpdateRgnMultiWindow (pWin);

  return;
}
Example #29
0
static Bool
winCreateColormapShadowDDNL(ColormapPtr pColormap)
{
    HRESULT ddrval = DD_OK;
    ScreenPtr pScreen = pColormap->pScreen;

    winScreenPriv(pScreen);
    winCmapPriv(pColormap);

    /* Create a DirectDraw palette */
    ddrval = IDirectDraw4_CreatePalette(pScreenPriv->pdd4,
                                        DDPCAPS_8BIT | DDPCAPS_ALLOW256,
                                        pCmapPriv->peColors,
                                        &pCmapPriv->lpDDPalette, NULL);
    if (FAILED(ddrval)) {
        ErrorF("winCreateColormapShadowDDNL - CreatePalette failed\n");
        return FALSE;
    }

    return TRUE;
}
Example #30
0
/*
 * We wrap whatever CloseScreen procedure was specified by fb;
 * a pointer to said procedure is stored in our privates.
 */
Bool
winCloseScreenNativeGDI (int nIndex, ScreenPtr pScreen)
{
  winScreenPriv(pScreen);
  winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;

  ErrorF ("winCloseScreenNativeGDI - Freeing screen resources\n");

  /* Flag that the screen is closed */
  pScreenPriv->fClosed = TRUE;
  pScreenPriv->fActive = FALSE;

  /* 
   * NOTE: mi doesn't use a CloseScreen procedure, so we do not
   * need to call a wrapped procedure here.
   */

  /* Delete the window property */
  RemoveProp (pScreenPriv->hwndScreen, WIN_SCR_PROP);
  
  ErrorF ("winCloseScreenNativeGDI - Destroying window\n");
  
  /* Kill our window */
  if (pScreenPriv->hwndScreen)
    {
      DestroyWindow (pScreenPriv->hwndScreen);
      pScreenPriv->hwndScreen = NULL;
    }

  /* Invalidate our screeninfo's pointer to the screen */
  pScreenInfo->pScreen = NULL;

  /* Free the screen privates for this screen */
  free (pScreenPriv);

  ErrorF ("winCloseScreenNativeGDI - Returning\n");

  return TRUE;
}