prevent WM_DISPLAYCHANGE sent if ChangeDisplaySettings called with current display settings

chris morgan cmorgan at
Wed Apr 2 19:04:05 CDT 2008


The following patch prevents a WM_DISPLAYCHANGE message being sent when
ChangeDisplaySettingsEx is called with the current display settings.
Such a call would not result in any change to the display settings and
so no WM_DISPLAYCHANGE would be expected and indeed this is the case in

The patch adds a new global variable to track the current colour depth
as a result of successive calls to ChangeDisplaySettingsEx - this will
not necessarily be the same as the current screen colour depth as on X11
driver a successful call to ChangeDisplaySettingsEx changing just the
current colour depth does nothing. However the display has changed from
the point of view of the caller and any wine clients so a
WM_DISPLAYCHANGE message should be sent.

The patch includes an additional conformance/regression test so this
behaviour can be verified as the correct behaviour on different versions
of Windows.

   dlls/user32/tests/sysparams.c  |   34 ++++++++++++++++++++++------------
   dlls/winex11.drv/desktop.c     |   12 +++++++++++-
   dlls/winex11.drv/event.c       |    1 +
   dlls/winex11.drv/winpos.c      |    4 ++--
   dlls/winex11.drv/x11drv.h      |    1 +
   dlls/winex11.drv/x11drv_main.c |    3 ++-
   dlls/winex11.drv/xrandr.c      |   12 +++++++++++-
   7 files changed, 50 insertions(+), 17 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: d857df2e4ec2db97b8ef34661dc31afb8e0508f3.diff
Type: text/x-patch
Size: 7586 bytes
Desc: not available
Url : 

More information about the wine-patches mailing list