I'm trying to enable support of the multimonitor configurations for my
mirror driver. I had modified mirror driver loading code to bind it to
the properly initialized DEVMODE (dmPosition etc), so mirror driver
binds to the entire virtual screen.
Firstly, i had configured my test system with dual monitor in this
way:
|0,0----------------1024,0--------------|
| M1 (primary) | M2 |
| | |
|0,768------------1024,768-----------|
In this configuration all works fine - all gdi calls correctly
mirrored to the mirror driver back buffer.
Next, i tried to move M2 just before M1, so virtual display origin in
X becomes negative:
|(-1024,0)--------0,0------------------|
| M2 | M1 (primary) |
| | |
|(-1024,768)----0,768---------------|
At this point most of the mirrored gdi calls draws in the back surface
incorrectly - as if there is no negative origin, how i can feel it.
I tried to debug this - parameters to the DrvBitBlt/DrvCopyBits seems
to be quite correct (all back surf coordinates mapped to the (0,0)
origin). And more - blits from the back surf to the back surf (for
example, when moving window) are not performed correctly. But some gdi
calls, that can't use back surface as source (f.e., DrvTextOut) are
performed quite well.
Mirror driver is very simple:
1. DrvEnableSurface: EngCreateDeviceSurface, EngAssociateSurface.
2. DrvEscape(start): EngCreateBitmap, EngAssociateSurface,
EngLockSurface.
3. All hooked DrvXxx calls back to the EngXxx, replacing surface,
created at the step 1 by surface, created at the step 2.
As I understand XPDM, there is no sense to the mirror driver on his
origin - gdi should map coordinates by itself. Or there is a necessity
of the "magical steps" to get this working all together?
Thanks!