[1/2] explorer: Store current display mode in the registry on startup. Try 2.
Dmitry Timoshkov
dmitry at codeweavers.com
Tue Nov 6 08:01:27 CST 2007
Hello,
as suggested by Alexandre this version of the patch saves current display
mode only in the case of using X11 root window for now.
Changelog:
[1/2] explorer: Store current display mode in the registry on startup.
---
programs/explorer/desktop.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c
index 7f2e23f..7bc8568 100644
--- a/programs/explorer/desktop.c
+++ b/programs/explorer/desktop.c
@@ -38,7 +38,7 @@ static BOOL using_root;
/* window procedure for the desktop window */
static LRESULT WINAPI desktop_wnd_proc( HWND hwnd, UINT message, WPARAM wp, LPARAM lp )
{
- WINE_TRACE( "got msg %x wp %lx lp %lx\n", message, wp, lp );
+ WINE_TRACE( "got msg %04x wp %lx lp %lx\n", message, wp, lp );
switch(message)
{
@@ -174,6 +174,20 @@ void manage_desktop( char *arg )
initialize_diskarbitration();
initialize_hal();
initialize_systray();
+
+ if (using_root)
+ {
+ DEVMODEW dmW;
+ /* Store current display mode in the registry */
+ if (EnumDisplaySettingsExW( NULL, ENUM_CURRENT_SETTINGS, &dmW, 0 ))
+ {
+ WINE_TRACE( "Current display mode %ux%u %u bpp %u Hz\n", dmW.dmPelsWidth,
+ dmW.dmPelsHeight, dmW.dmBitsPerPel, dmW.dmDisplayFrequency );
+ ChangeDisplaySettingsExW( NULL, &dmW, 0,
+ CDS_GLOBAL | CDS_NORESET | CDS_UPDATEREGISTRY,
+ NULL );
+ }
+ }
}
else
{
--
1.5.3.4
More information about the wine-patches
mailing list