Prev: ksthunk.sys in 64bit Windows
Next: StorPortAllocatePool
From: Ivan Brugiolo [MSFT] on 12 Dec 2007 19:30 Do you implement DrvSetPointerShape and/or DrvAplhaBlend, with the propert CAPS2 flags ? Certain kind of Software Cursors are implemented as a Gdi-Sprite that is alphablended over the destination surface. -- -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "jrb1400" <jrb1400(a)discussions.microsoft.com> wrote in message news:2223A99E-C2BB-4E25-92C6-7AF1715C4B61(a)microsoft.com... > Hi all, > > We are using a Mirror Driver to track window configurations. We are also > running some third-party software that draws custom cursors. Whenever > the > mouse pointer is in its drawing window, the third party application > changes > the cursor set. When the Mirror Driver is active, the cursors do not > operate correctly. > > > We have duplicated this problem with the Mirror Driver Sample and Windows > XP > SP2. > > We built the Mirror Driver Sample directly from the source in the 6000 > WDK, > and installed it. The Mirror Driver Sample comes with a test > application, > "ddmlapp". > > To duplicate the problem: >> ddmlapp -e (enable - seems to attach to the Display) > > Now, using Control Panel, open up the Mouse property sheets. On the > Pointers tab, there is a pull down list. Select a different scheme such > as > 3D-Bronze and hit Apply. From that point on, the cursors behave rather > strangely. The cursors don't necessarily change to the new set. Also, > cursor chapes may not be changed when the pointer is moved across window > borders and regions that would normally change the cursor shapes (Resize, > Pointer, I-bar, etc). Some seem to have effect and some do not. To > restore proper operation, re-run ddmlapp: > >> ddmlapp -d (disable) > > Now the cursor set operation appears to be normal. Cursor shapes are > displayed using the newly selected set and behave properly when crossing > window borders and regions. > > Is there something we can add to the Mirror Driver that would prevent > this? > Does anyone have any ideas on what I should try next? > > Thanks in advance for any help you can offer. > > Jay >
From: jrb1400 on 13 Dec 2007 19:18 Hi, I'm still having problems with cursor shapes and the mirror driver - here is an update. I went back to the Mirror Driver Sample Code and added routines to support DrvSetPointerShape DrvMovePointer DrvAlphaBlend All these routines do is pass their received parameters down to EngSetPointerShape, EngMovePointer, and EngAlphaBlend. Debug messages are printed out. (the code is posted below). I never saw EngAlphaBlend fail. EngSetPointerShape always returns SPS_ACCEPT_NOEXCLUDE. -- the doc says it will be SPS_ACCEPT_EXCLUDE or SPS_ERROR. I use the Sample Mirror Driver test app to enable the surface. > ddmlapp –e (enable) With this enabled, I get Mirror driver debug messages at the appropriate times – for example when the pointer should change to a resize handle, I get a debug printout at DrvSetPointerShape, and the cursor shape changes. This works consistently as one would expect. If I then use the mouse property sheets from the control panel to change the mouse schemes things usually fail. I get three or four calls to DrvSetPointerShape, but then no more. The pointer frequently changes to an hourglass and the stays that way. The mouse actions and clicks work normally so it is useable. I can move the mouse across all window borders, titlebars. corners, etc - no more calls to DrvSetPointerShape. The exception to this is when the mouse scheme is changed to one of these four schemes: (none), Default, Variations, or Inverted. With these four selections, the calls to DrvSetPointerShape resume as expected, and the pointer images also behave normally. Most (perhaps all) of the others exhibit the failure. I can run the test app to disconnect the mirror driver > ddmlapp –d (disable) When I do this, all mouse pointer changes work, but of course I get no further debug messages for DrvXxxx routines. Code added to Mirror Sample Driver.... ULONG DrvSetPointerShape( IN SURFOBJ *pso, IN SURFOBJ *psoMask, IN SURFOBJ *psoColor, IN XLATEOBJ *pxlo, IN LONG xHot, IN LONG yHot, IN LONG x, IN LONG y, IN RECTL *prcl, IN FLONG fl ) { ULONG status; DISPDBG((0,"DrvSetPointerShape\n")); status = EngSetPointerShape(pso, psoMask, psoColor, pxlo, xHot, yHot, x, y, prcl, fl); if (status == SPS_ERROR) { DISPDBG((0,"-- SPS_ERROR\n")); } else if (status == SPS_DECLINE) { DISPDBG((0,"-- SPS_DECLINE\n")); } else if (status == SPS_ACCEPT_NOEXCLUDE) { DISPDBG((0,"-- SPS_ACCEPT_NOEXCLUDE\n")); } else if (status == SPS_ACCEPT_EXCLUDE) { DISPDBG((0,"-- SPS_ACCEPT_EXCLUDE\n")); } else if (status == SPS_ACCEPT_SYNCHRONOUS) { DISPDBG((0,"-- SPS_ACCEPT_SYNCHRONOUS\n")); } else { DISPDBG((0,"-- UNKNOWN ERROR [%d]\n", status)); } DISPDBG((0,"-- pso[%p] psoMask[%p] psoColor[%p] pxlo[%p]\n", pso, psoMask, psoColor, pxlo )); DISPDBG((0,"-- xHot[%p] yHot[%p] x[%d] y[%d] prcl[%p] fl[%d]\n", xHot, yHot, x, y, prcl, fl)); return(status); } VOID DrvMovePointer( IN SURFOBJ *pso, IN LONG x, IN LONG y, IN RECTL *prcl ) { DISPDBG((1,"DrvMovePointer\n")); EngMovePointer(pso, x, y, prcl); } BOOL DrvAlphaBlend( IN SURFOBJ *psoDest, IN SURFOBJ *psoSrc, IN CLIPOBJ *pco, IN XLATEOBJ *pxlo, IN RECTL *prclDest, IN RECTL *prclSrc, IN BLENDOBJ *pBlendObj ) { BOOL status; DISPDBG((1,"DrvAlphaBlend\n")); status = EngAlphaBlend(psoDest,psoSrc,pco,pxlo,prclDest,prclSrc,pBlendObj); if (!status) { DISPDBG((0,"-- FAILED\n")); } return (status); }
From: Ivan Brugiolo [MSFT] on 13 Dec 2007 21:52 Do you support GCAPS2_ALPHACURSOR ? -- -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "jrb1400" <jrb1400(a)discussions.microsoft.com> wrote in message news:6B42CC78-85E6-4278-AF1C-BAB8906F999C(a)microsoft.com... > Hi, > > I'm still having problems with cursor shapes and the mirror driver - here > is an update. > > I went back to the Mirror Driver Sample Code and added routines to support > DrvSetPointerShape > DrvMovePointer > DrvAlphaBlend > > All these routines do is pass their received parameters down to > EngSetPointerShape, EngMovePointer, and EngAlphaBlend. Debug messages > are > printed out. (the code is posted below). > > I never saw EngAlphaBlend fail. > EngSetPointerShape always returns SPS_ACCEPT_NOEXCLUDE. -- the doc says > it > will be SPS_ACCEPT_EXCLUDE or SPS_ERROR. > > I use the Sample Mirror Driver test app to enable the surface. >> ddmlapp -e (enable) > > With this enabled, I get Mirror driver debug messages at the appropriate > times - for example when the pointer should change to a resize handle, I > get > a debug printout at DrvSetPointerShape, and the cursor shape changes. > This > works consistently as one would expect. > > If I then use the mouse property sheets from the control panel to change > the > mouse schemes things usually fail. I get three or four calls to > DrvSetPointerShape, but then no more. The pointer frequently changes to > an > hourglass and the stays that way. The mouse actions and clicks work > normally > so it is useable. I can move the mouse across all window borders, > titlebars. > corners, etc - no more calls to DrvSetPointerShape. > > The exception to this is when the mouse scheme is changed to one of these > four schemes: (none), Default, Variations, or Inverted. With these > four > selections, the calls to DrvSetPointerShape resume as expected, and the > pointer images also behave normally. Most (perhaps all) of the others > exhibit the failure. > > I can run the test app to disconnect the mirror driver >> ddmlapp -d (disable) > When I do this, all mouse pointer changes work, but of course I get no > further debug messages for DrvXxxx routines. > > > Code added to Mirror Sample Driver.... > > > ULONG > DrvSetPointerShape( > IN SURFOBJ *pso, > IN SURFOBJ *psoMask, > IN SURFOBJ *psoColor, > IN XLATEOBJ *pxlo, > IN LONG xHot, > IN LONG yHot, > IN LONG x, > IN LONG y, > IN RECTL *prcl, > IN FLONG fl > ) > { > ULONG status; > DISPDBG((0,"DrvSetPointerShape\n")); > status = EngSetPointerShape(pso, psoMask, psoColor, pxlo, xHot, yHot, > x, > y, prcl, fl); > if (status == SPS_ERROR) { > DISPDBG((0,"-- SPS_ERROR\n")); > } > else if (status == SPS_DECLINE) { > DISPDBG((0,"-- SPS_DECLINE\n")); > } > else if (status == SPS_ACCEPT_NOEXCLUDE) { > DISPDBG((0,"-- SPS_ACCEPT_NOEXCLUDE\n")); > } > else if (status == SPS_ACCEPT_EXCLUDE) { > DISPDBG((0,"-- SPS_ACCEPT_EXCLUDE\n")); > } > else if (status == SPS_ACCEPT_SYNCHRONOUS) { > DISPDBG((0,"-- SPS_ACCEPT_SYNCHRONOUS\n")); > } > else { > DISPDBG((0,"-- UNKNOWN ERROR [%d]\n", status)); > } > DISPDBG((0,"-- pso[%p] psoMask[%p] psoColor[%p] pxlo[%p]\n", pso, > psoMask, psoColor, pxlo )); > DISPDBG((0,"-- xHot[%p] yHot[%p] x[%d] y[%d] prcl[%p] fl[%d]\n", xHot, > yHot, x, y, prcl, fl)); > > return(status); > } > > VOID > DrvMovePointer( > IN SURFOBJ *pso, > IN LONG x, > IN LONG y, > IN RECTL *prcl > ) > { > DISPDBG((1,"DrvMovePointer\n")); > EngMovePointer(pso, x, y, prcl); > } > > BOOL > DrvAlphaBlend( > IN SURFOBJ *psoDest, > IN SURFOBJ *psoSrc, > IN CLIPOBJ *pco, > IN XLATEOBJ *pxlo, > IN RECTL *prclDest, > IN RECTL *prclSrc, > IN BLENDOBJ *pBlendObj > ) > { > BOOL status; > DISPDBG((1,"DrvAlphaBlend\n")); > status = > EngAlphaBlend(psoDest,psoSrc,pco,pxlo,prclDest,prclSrc,pBlendObj); > if (!status) { > DISPDBG((0,"-- FAILED\n")); > } > return (status); > } > > >
From: jrb1400 on 15 Dec 2007 17:05 "Ivan Brugiolo [MSFT]" wrote: > Do you support GCAPS2_ALPHACURSOR ? > > -- > Hi Ivan, Thanks for the responses. I added the advertisement of GCAPS2_ALPHACURSOR to the Mirror Sample driver and verified it with a Debug Printout before returning from DrvEnablePDEV. It didn't help any. The calls to DrvSetPointerShape cease as described in the earlier post. I'm not sure what you mean by "do you support GCAPS2_ALPHACURSOR ?" The mirror sample driver does not really draw anything, it just provides the hooks so one could draw something if desired. The code now just returns a good status (SPS_ACCEPT_NOEXCLUDE) from DrvSetPointerShape and does not punt the operation down to EngSetPointerShape (just like all the other mirror driver sample routines). From your earlier responses it seems like you think that the other layers of graphics software will not call the mirror driver to set pointer shapes if the GCAPS2_ALPHACURSOR is not supported - Is that right ? Where can I find out what needs to be done to support GCAPS2_ALPHACURSOR, and whether it should be supported? My mirror driver also does not need to draw anyting either. I just want to track window changes - that function is already implemented and working using DrvEscape and Window Object Callbacks. I just have to get the mouse pointer shapes working again, so the shapes change with the mirror driver enabled in the same way the shapes change when the mirror driver is not enabled. By the way, It also looks like one "should" be able to remove some or all of the flHooks as defined in calls to EngAssociateSurface and then not get unnecessary calls when there is nothing special implemented in the mirror driver. Unfortunately when I tried that I just got bugchhecks some where in the stack below EngAlphaBlend and EngCopyBits -- EngAlphaBlend was called from somewhere outside the mirror driver. As you can see I'm quite stumped on this one, any further help would be very much appreciated. Thank you very much, Jay
From: Sasha Bublyk on 16 Dec 2007 15:18
> I'm not sure what you mean by "do you support GCAPS2_ALPHACURSOR ?" Look at your mirror's DrvEnablePDEV and DEVINFO structure which it returns. Set flag GCAPS2_ALPHACURSOR in DEVINFO.flGraphicsCaps2. --- Sasha Bublyk www.sycorelogic.com |