Mirror driver - icons aren't getting print in multi-monitor environment

Hi,

I developed a mirror driver which works great in a single monitor
environment. When I extend the desktop onto onother monitor (still mirroring
the primary monitor), some icons (e.g. on the desktop) are not getting print.
For example the icon of a RegistryFile, the ShortCut-icon of IrfanView or the
ShortCut-icon of WireShark are not getting print. Some desktop-icons are
getting print anyway, e.g. the “My Computer” icon or the “Recycle Bin” icon.
Do you have any suggestions for this problem?

Thanks in advance.

MaSe

Is it possible that the extended desktop is in another user’s account and
those disappeared icons are only in the user account which is used by the
primary desktop?

wrote in message news:xxxxx@ntdev…
> Hi,
>
> I developed a mirror driver which works great in a single monitor
> environment. When I extend the desktop onto onother monitor (still
> mirroring
> the primary monitor), some icons (e.g. on the desktop) are not getting
> print.
> For example the icon of a RegistryFile, the ShortCut-icon of IrfanView or
> the
> ShortCut-icon of WireShark are not getting print. Some desktop-icons are
> getting print anyway, e.g. the “My Computer” icon or the “Recycle Bin”
> icon.
> Do you have any suggestions for this problem?
>
> Thanks in advance.
>
> MaSe
>

Sorry, I do not really understand what you mean. There is only one user account configured on this machine and the icons are not getting print even if the user is already logged in and than loading the mirror driver.

Here are some more observations:
Clicking on an invisible icon let the icon appear. Clicking another icon or clicking on a empty part of the desktop let the icon disappear again. The text (name) of an invisible icon is still visible. When the invisble icon is a shortcut the little shortcut symbol (the little arrow in the lower left corner) is still visible too. The invisible part seams to be what is normally contained in the ico-resource of on application.

MaSe

Hmm…then my guess is wrong - sorry mate.

wrote in message news:xxxxx@ntdev…
> Sorry, I do not really understand what you mean. There is only one user
> account configured on this machine and the icons are not getting print
> even if the user is already logged in and than loading the mirror driver.
>
> Here are some more observations:
> Clicking on an invisible icon let the icon appear. Clicking another icon
> or clicking on a empty part of the desktop let the icon disappear again.
> The text (name) of an invisible icon is still visible. When the invisble
> icon is a shortcut the little shortcut symbol (the little arrow in the
> lower left corner) is still visible too. The invisible part seams to be
> what is normally contained in the ico-resource of on application.
>
> MaSe
>

Hi Markus,
hope this explanation helps u…(I am assuming that this is on XP)
There are 2 kinds of display surfaces, opaque and non-opaque. If display surface is non-opaque then DIB Engine directly draws on to the surface. This generally happens for drawing Icons on desktop. So in this case, I assume the engine is directly drawing on the surface and there are no matching calls in your mirror driver.

Sunil

xxxxx@yahoo.com wrote:

hope this explanation helps u…(I am assuming that this is on XP)
There are 2 kinds of display surfaces, opaque and non-opaque. If display surface is non-opaque then DIB Engine directly draws on to the surface. This generally happens for drawing Icons on desktop. So in this case, I assume the engine is directly drawing on the surface and there are no matching calls in your mirror driver.

No, this is wrong. The highest level GDI operations are sent to all
affected drivers, be they primary, secondary, or mirror. The
implementation in one driver does not impact the sending of APIs to the
other drivers. If that weren’t the case, mirror drivers would be kind
of useless.

If you aren’t a GDI-managed surface, icons are drawn in a somewhat
unusual way. It uses a monochrome blit with a mask to dig a “hole” for
the non-transparent pixels, then uses a blending color blit to merge in
the pixels of the icon itself. It’s possible the original poster is not
correctly handling these unusual blits.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for the correction Tim!
I faced a similar problem when I was implementing rotation in display driver.
For supporting rotation 2 surfaces were created. What ever was drawn on the first surface was rotated and drawn on the other. latter was copied to frame buffer. In this scenario when Surface 1 was not opaque, I faced the Icon problem. Making surface 1 opaque solved this.

Thanks,
Sunil

Hello and thank you for your answers!

Tim, you are right, the mirror driver runs on a XP (SP2) machine. :wink:

I don’t know what I am missing to implement or what I have done wrong so far. What is really confusing to me is that the mirror driver works fine if only the primary graphics device in enabled (and of course the mirror driver which mirrors the primary device). Attaching an other graphics device (extend the desktop) leads to the described problem (still mirroring the primary device).

My mirror driver is based on the Microsoft mirror driver sample:
In DrvEnableSurface() I create a surface using EngCreateDeviceSurface() and associate it by calling EngAssociateSurface() with all possible hook-flags set. In the DrvXxx() functions I punt the callbacks to GDI. Shouldn’t the mirror driver get called for any drawing operation?

Do you have any hints for me what I could do to solve this problem?

MaSe