winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2013
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
498 discussions
Start a n
N
ew thread
Ken Thomases : winemac: By default, make full-screen windows not float when not the active app.
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: c3d2e4306095b99d8078f3ce6a8a8f3e45a37e1a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3d2e4306095b99d8078f3ce6…
Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed May 29 09:21:25 2013 -0500 winemac: By default, make full-screen windows not float when not the active app. Added a registry setting to control the behavior: WindowsFloatWhenInactive with possible values "none", "all, and "nonfullscreen" which is the default. --- dlls/winemac.drv/cocoa_window.m | 13 +++++--- dlls/winemac.drv/macdrv_cocoa.h | 7 ++++ dlls/winemac.drv/macdrv_main.c | 66 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 5 deletions(-) diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index d2b2547..a47715a 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -577,20 +577,23 @@ static inline void fix_generic_modifiers_by_device(NSUInteger* modifiers) - (NSInteger) minimumLevelForActive:(BOOL)active { + NSScreen* screen; + BOOL fullscreen; NSInteger level; - if (self.floating) + screen = screen_covered_by_rect([self frame], [NSScreen screens]); + fullscreen = (screen != nil); + + if (self.floating && (active || topmost_float_inactive == TOPMOST_FLOAT_INACTIVE_ALL || + (topmost_float_inactive == TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN && !fullscreen))) level = NSFloatingWindowLevel; else level = NSNormalWindowLevel; if (active) { - BOOL fullscreen, captured; - NSScreen* screen; + BOOL captured; - screen = screen_covered_by_rect([self frame], [NSScreen screens]); - fullscreen = (screen != nil); captured = (screen || [self screen]) && [[WineApplicationController sharedController] areDisplaysCaptured]; if (captured || fullscreen) diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h index 905738f..e7e2c4c 100644 --- a/dlls/winemac.drv/macdrv_cocoa.h +++ b/dlls/winemac.drv/macdrv_cocoa.h @@ -111,6 +111,12 @@ enum { DRAG_OP_EVERY = UINT32_MAX }; +enum { + TOPMOST_FLOAT_INACTIVE_NONE, + TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN, + TOPMOST_FLOAT_INACTIVE_ALL, +}; + typedef struct macdrv_opaque_window* macdrv_window; typedef struct macdrv_opaque_event_queue* macdrv_event_queue; @@ -129,6 +135,7 @@ struct macdrv_display { /* main */ extern int macdrv_err_on; +extern int topmost_float_inactive DECLSPEC_HIDDEN; extern int macdrv_start_cocoa_app(unsigned long long tickcount) DECLSPEC_HIDDEN; extern void macdrv_window_rejected_focus(const struct macdrv_event *event) DECLSPEC_HIDDEN; diff --git a/dlls/winemac.drv/macdrv_main.c b/dlls/winemac.drv/macdrv_main.c index 501b7d5..cf036c4 100644 --- a/dlls/winemac.drv/macdrv_main.c +++ b/dlls/winemac.drv/macdrv_main.c @@ -26,6 +26,7 @@ #include "macdrv.h" #include "winuser.h" +#include "winreg.h" #include "wine/server.h" WINE_DEFAULT_DEBUG_CHANNEL(macdrv); @@ -41,6 +42,8 @@ C_ASSERT(NUM_EVENT_TYPES <= sizeof(macdrv_event_mask) * 8); DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES; +int topmost_float_inactive = TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN; + /************************************************************************** * debugstr_cf @@ -91,6 +94,67 @@ static void set_app_icon(void) /*********************************************************************** + * get_config_key + * + * Get a config key from either the app-specific or the default config + */ +static inline DWORD get_config_key(HKEY defkey, HKEY appkey, const char *name, + char *buffer, DWORD size) +{ + if (appkey && !RegQueryValueExA(appkey, name, 0, NULL, (LPBYTE)buffer, &size)) return 0; + if (defkey && !RegQueryValueExA(defkey, name, 0, NULL, (LPBYTE)buffer, &size)) return 0; + return ERROR_FILE_NOT_FOUND; +} + + +/*********************************************************************** + * setup_options + * + * Set up the Mac driver options. + */ +static void setup_options(void) +{ + char buffer[MAX_PATH + 16]; + HKEY hkey, appkey = 0; + DWORD len; + + /* @@ Wine registry key: HKCU\Software\Wine\Mac Driver */ + if (RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Mac Driver", &hkey)) hkey = 0; + + /* open the app-specific key */ + + len = GetModuleFileNameA(0, buffer, MAX_PATH); + if (len && len < MAX_PATH) + { + HKEY tmpkey; + char *p, *appname = buffer; + if ((p = strrchr(appname, '/'))) appname = p + 1; + if ((p = strrchr(appname, '\\'))) appname = p + 1; + strcat(appname, "\\Mac Driver"); + /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\Mac Driver */ + if (!RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\AppDefaults", &tmpkey)) + { + if (RegOpenKeyA(tmpkey, appname, &appkey)) appkey = 0; + RegCloseKey(tmpkey); + } + } + + if (!get_config_key(hkey, appkey, "WindowsFloatWhenInactive", buffer, sizeof(buffer))) + { + if (!strcmp(buffer, "none")) + topmost_float_inactive = TOPMOST_FLOAT_INACTIVE_NONE; + else if (!strcmp(buffer, "all")) + topmost_float_inactive = TOPMOST_FLOAT_INACTIVE_ALL; + else + topmost_float_inactive = TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN; + } + + if (appkey) RegCloseKey(appkey); + if (hkey) RegCloseKey(hkey); +} + + +/*********************************************************************** * process_attach */ static BOOL process_attach(void) @@ -102,6 +166,8 @@ static BOOL process_attach(void) if (status != noErr || !(attributes & sessionHasGraphicAccess)) return FALSE; + setup_options(); + if ((thread_data_tls_index = TlsAlloc()) == TLS_OUT_OF_INDEXES) return FALSE; macdrv_err_on = ERR_ON(macdrv);
1
0
0
0
Sergey Guralnik : user32/tests: Fix a typo.
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: e3219fa426f141098558dcb069cf7c96b2584bca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3219fa426f141098558dcb06…
Author: Sergey Guralnik <serhio(a)etersoft.ru> Date: Wed May 29 10:56:17 2013 +0300 user32/tests: Fix a typo. --- dlls/user32/tests/win.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index 37d210e..20d8d9f 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -7353,12 +7353,12 @@ static void test_update_region(void) rgn1 = CreateRectRgn(0, 0, 0, 0); ok(GetUpdateRgn(parent, rgn1, FALSE) == NULLREGION, - "has invalid area after ValidRgn(NULL)\n"); + "has invalid area after ValidateRgn(NULL)\n"); GetUpdateRgn(hwnd, rgn1, FALSE); rgn2 = CreateRectRgnIndirect(&rc); ok(EqualRgn(rgn1, rgn2), "assigned and retrieved update regions are different\n"); ok(GetUpdateRgn(child, rgn2, FALSE) == NULLREGION, - "has invalid area after ValidRgn(NULL)\n"); + "has invalid area after ValidateRgn(NULL)\n"); SetWindowPos(hwnd, 0, wnd_orig.x, wnd_orig.y, 0, 0, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
1
0
0
0
Aric Stewart : gdi32/tests: Do not try to test OS/ 2 win metrics on non-windows fonts.
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: 3108f3cf3d99aac1983cc5256afa87752899275e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3108f3cf3d99aac1983cc5256…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed May 29 06:53:51 2013 -0500 gdi32/tests: Do not try to test OS/2 win metrics on non-windows fonts. --- dlls/gdi32/tests/font.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index fdb6451..b57a630 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -3077,19 +3077,13 @@ static void test_text_metrics(const LOGFONT *lf, const NEWTEXTMETRIC *ntm) ret = GetFontData(hdc, MS_OS2_TAG, 0, &tt_os2, size); ok(ret == size, "GetFontData should return %u not %u\n", size, ret); - ascent = GET_BE_WORD(tt_os2.usWinAscent); - descent = GET_BE_WORD(tt_os2.usWinDescent); - cell_height = ascent + descent; - ok(ntm->ntmCellHeight == cell_height, "%s: ntmCellHeight %u != %u, os2.usWinAscent/os2.usWinDescent %u/%u\n", - font_name, ntm->ntmCellHeight, cell_height, ascent, descent); - SetLastError(0xdeadbeef); ret = GetTextMetricsA(hdc, &tmA); ok(ret, "GetTextMetricsA error %u\n", GetLastError()); if(!get_first_last_from_cmap(hdc, &cmap_first, &cmap_last, &cmap_type)) { - skip("Unable to retrieve first and last glyphs from cmap\n"); + skip("%s is not a Windows font, OS/2 metrics may be invalid.\n",font_name); } else { @@ -3099,6 +3093,12 @@ static void test_text_metrics(const LOGFONT *lf, const NEWTEXTMETRIC *ntm) USHORT version; TEXTMETRICW tmW; + ascent = GET_BE_WORD(tt_os2.usWinAscent); + descent = GET_BE_WORD(tt_os2.usWinDescent); + cell_height = ascent + descent; + ok(ntm->ntmCellHeight == cell_height, "%s: ntmCellHeight %u != %u, os2.usWinAscent/os2.usWinDescent %u/%u\n", + font_name, ntm->ntmCellHeight, cell_height, ascent, descent); + version = GET_BE_WORD(tt_os2.version); os2_first_char = GET_BE_WORD(tt_os2.usFirstCharIndex);
1
0
0
0
Hans Leidekker : wbemprox: Add a partial implementation of Win32_Directory.
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: 074e6c74542e5aeef26a68a0ac1b274e66ce4a6d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=074e6c74542e5aeef26a68a0a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed May 29 12:16:44 2013 +0200 wbemprox: Add a partial implementation of Win32_Directory. --- dlls/wbemprox/builtin.c | 256 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 250 insertions(+), 6 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=074e6c74542e5aeef26a6…
1
0
0
0
Hans Leidekker : msi: Remove an unused parameter from action_type_matches_script.
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: 1be1b8433a6ccdf26e6bf6f8f8b8c236ac23e35e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1be1b8433a6ccdf26e6bf6f8f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed May 29 12:16:17 2013 +0200 msi: Remove an unused parameter from action_type_matches_script. --- dlls/msi/custom.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 5b58976..33be99b 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -1118,7 +1118,7 @@ static UINT HANDLE_CustomType53_54( MSIPACKAGE *package, const WCHAR *source, co return wait_thread_handle( info ); } -static BOOL action_type_matches_script( MSIPACKAGE *package, UINT type, UINT script ) +static BOOL action_type_matches_script( UINT type, UINT script ) { switch (script) { @@ -1212,7 +1212,7 @@ UINT ACTION_CustomAction(MSIPACKAGE *package, LPCWSTR action, UINT script, BOOL if (type & msidbCustomActionTypeNoImpersonate) WARN("msidbCustomActionTypeNoImpersonate not handled\n"); - if (!execute || !action_type_matches_script( package, type, script )) + if (!execute || !action_type_matches_script( type, script )) { rc = defer_custom_action( package, action, type ); goto end;
1
0
0
0
Hans Leidekker : msi: The UI sequence exists if there are runnable actions in the InstallUISequence table .
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: 74aa47fa8e3fbb7541723b1fcb051cc4ed0ad268 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74aa47fa8e3fbb7541723b1fc…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed May 29 12:15:39 2013 +0200 msi: The UI sequence exists if there are runnable actions in the InstallUISequence table. --- dlls/msi/action.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index e6422a7..1fa065b 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -409,18 +409,16 @@ static BOOL ui_sequence_exists( MSIPACKAGE *package ) static const WCHAR query [] = { 'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ', '`','I','n','s','t','a','l','l','U','I','S','e','q','u','e','n','c','e','`',' ', - 'W','H','E','R','E',' ','`','S','e','q','u','e','n','c','e','`',' ','>',' ','0',' ', - 'O','R','D','E','R',' ','B','Y',' ','`','S','e','q','u','e','n','c','e','`',0}; + 'W','H','E','R','E',' ','`','S','e','q','u','e','n','c','e','`',' ','>',' ','0',0}; MSIQUERY *view; - UINT rc; + DWORD count = 0; - rc = MSI_DatabaseOpenViewW(package->db, query, &view); - if (rc == ERROR_SUCCESS) + if (!(MSI_DatabaseOpenViewW( package->db, query, &view ))) { - msiobj_release(&view->hdr); - return TRUE; + MSI_IterateRecords( view, &count, NULL, package ); + msiobj_release( &view->hdr ); } - return FALSE; + return count != 0; } UINT msi_set_sourcedir_props(MSIPACKAGE *package, BOOL replace)
1
0
0
0
Alexandre Julliard : shell32: Forward font messages to the listview window.
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: ba486ca1b4abe8f81f81527647f90f85f91f1336 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba486ca1b4abe8f81f8152764…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 29 17:59:43 2013 +0200 shell32: Forward font messages to the listview window. --- dlls/shell32/shlview.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 7738694..2cdd160 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -1717,6 +1717,8 @@ static LRESULT CALLBACK ShellView_WndProc(HWND hWnd, UINT uMessage, WPARAM wPara break; case WM_GETDLGCODE: return SendMessageW(pThis->hWndList, uMessage, 0, 0); + case WM_SETFONT: return SendMessageW(pThis->hWndList, WM_SETFONT, wParam, lParam); + case WM_GETFONT: return SendMessageW(pThis->hWndList, WM_GETFONT, wParam, lParam); case WM_DESTROY: RevokeDragDrop(pThis->hWnd);
1
0
0
0
Alexandre Julliard : comdlg32: Scale the shell folder list in the open dialog with the font size.
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: 6a40d65ba83bb5f7f230538e051813e0d0baffeb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6a40d65ba83bb5f7f230538e0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 29 16:17:48 2013 +0200 comdlg32: Scale the shell folder list in the open dialog with the font size. --- dlls/comdlg32/filedlg.c | 56 ++++++++++++++++++++------------------- dlls/comdlg32/filedlgbrowser.c | 1 + 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 9481517..c08e8d4 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -110,7 +110,6 @@ typedef struct tagLookInInfo */ /* Draw item constant */ -#define ICONWIDTH 18 #define XTEXTOFFSET 3 /* AddItem flags*/ @@ -3182,7 +3181,8 @@ static void FILEDLG95_LOOKIN_Init(HWND hwndCombo) IShellFolder *psfRoot, *psfDrives; IEnumIDList *lpeRoot, *lpeDrives; LPITEMIDLIST pidlDrives, pidlTmp, pidlTmp1, pidlAbsTmp; - + HDC hdc; + TEXTMETRICW tm; LookInInfos *liInfos = MemAlloc(sizeof(LookInInfos)); TRACE("\n"); @@ -3191,10 +3191,15 @@ static void FILEDLG95_LOOKIN_Init(HWND hwndCombo) SetPropA(hwndCombo, LookInInfosStr, liInfos); + hdc = GetDC( hwndCombo ); + SelectObject( hdc, (HFONT)SendMessageW( hwndCombo, WM_GETFONT, 0, 0 )); + GetTextMetricsW( hdc, &tm ); + ReleaseDC( hwndCombo, hdc ); + /* set item height for both text field and listbox */ - CBSetItemHeight(hwndCombo,-1,GetSystemMetrics(SM_CYSMICON)); - CBSetItemHeight(hwndCombo,0,GetSystemMetrics(SM_CYSMICON)); - + CBSetItemHeight( hwndCombo, -1, max( tm.tmHeight, GetSystemMetrics(SM_CYSMICON) )); + CBSetItemHeight( hwndCombo, 0, max( tm.tmHeight, GetSystemMetrics(SM_CYSMICON) )); + /* Turn on the extended UI for the combo box like Windows does */ CBSetExtendedUI(hwndCombo, TRUE); @@ -3269,6 +3274,8 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct) TEXTMETRICW tm; LPSFOLDER tmpFolder; LookInInfos *liInfos = GetPropA(pDIStruct->hwndItem,LookInInfosStr); + UINT shgfi_flags = SHGFI_PIDL | SHGFI_OPENICON | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME; + UINT icon_width, icon_height; TRACE("\n"); @@ -3280,25 +3287,24 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct) return 0; + icon_width = GetSystemMetrics(SM_CXICON); + icon_height = GetSystemMetrics(SM_CYICON); + if (pDIStruct->rcItem.bottom - pDIStruct->rcItem.top < icon_height) + { + icon_width = GetSystemMetrics(SM_CXSMICON); + icon_height = GetSystemMetrics(SM_CYSMICON); + shgfi_flags |= SHGFI_SMALLICON; + } + if(pDIStruct->itemID == liInfos->uSelectedItem) { ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem, - 0, - &sfi, - sizeof (sfi), - SHGFI_PIDL | SHGFI_SMALLICON | - SHGFI_OPENICON | SHGFI_SYSICONINDEX | - SHGFI_DISPLAYNAME ); + 0, &sfi, sizeof (sfi), shgfi_flags ); } else { ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem, - 0, - &sfi, - sizeof (sfi), - SHGFI_PIDL | SHGFI_SMALLICON | - SHGFI_SYSICONINDEX | - SHGFI_DISPLAYNAME); + 0, &sfi, sizeof (sfi), shgfi_flags ); } /* Is this item selected ? */ @@ -3320,11 +3326,7 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct) { iIndentation = 0; ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem, - 0, - &sfi, - sizeof (sfi), - SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_OPENICON - | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME ); + 0, &sfi, sizeof (sfi), shgfi_flags ); } else @@ -3334,17 +3336,17 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct) /* Draw text and icon */ /* Initialise the icon display area */ - rectIcon.left = pDIStruct->rcItem.left + ICONWIDTH/2 * iIndentation; - rectIcon.top = pDIStruct->rcItem.top; - rectIcon.right = rectIcon.left + ICONWIDTH; - rectIcon.bottom = pDIStruct->rcItem.bottom; + rectIcon.left = pDIStruct->rcItem.left + 1 + icon_width/2 * iIndentation; + rectIcon.top = (pDIStruct->rcItem.top + pDIStruct->rcItem.bottom - icon_height) / 2; + rectIcon.right = rectIcon.left + icon_width + XTEXTOFFSET; + rectIcon.bottom = (pDIStruct->rcItem.top + pDIStruct->rcItem.bottom + icon_height) / 2; /* Initialise the text display area */ GetTextMetricsW(pDIStruct->hDC, &tm); rectText.left = rectIcon.right; rectText.top = (pDIStruct->rcItem.top + pDIStruct->rcItem.bottom - tm.tmHeight) / 2; - rectText.right = pDIStruct->rcItem.right + XTEXTOFFSET; + rectText.right = pDIStruct->rcItem.right; rectText.bottom = (pDIStruct->rcItem.top + pDIStruct->rcItem.bottom + tm.tmHeight) / 2; diff --git a/dlls/comdlg32/filedlgbrowser.c b/dlls/comdlg32/filedlgbrowser.c index ffe65c9..499ebb7 100644 --- a/dlls/comdlg32/filedlgbrowser.c +++ b/dlls/comdlg32/filedlgbrowser.c @@ -452,6 +452,7 @@ static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, /* Set view window control id to 5002 */ SetWindowLongPtrW(hwndView, GWLP_ID, lst2); + SendMessageW( hwndView, WM_SETFONT, SendMessageW( GetParent(hwndView), WM_GETFONT, 0, 0 ), FALSE ); /* Select the new folder in the Look In combo box of the Open file dialog */ FILEDLG95_LOOKIN_SelectItem(fodInfos->DlgInfos.hwndLookInCB,fodInfos->ShellInfos.pidlAbsCurrent);
1
0
0
0
Alexandre Julliard : comdlg32: Scale the listboxes in the font dialog with the font size.
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: 60b5ae785a850ee94cdff6254ec6be5abfc28936 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60b5ae785a850ee94cdff6254…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 29 16:28:48 2013 +0200 comdlg32: Scale the listboxes in the font dialog with the font size. --- dlls/comdlg32/fontdlg.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/comdlg32/fontdlg.c b/dlls/comdlg32/fontdlg.c index 25dc1e4..e5b87bf 100644 --- a/dlls/comdlg32/fontdlg.c +++ b/dlls/comdlg32/fontdlg.c @@ -782,7 +782,7 @@ static LRESULT CFn_WMMeasureItem(HWND hDlg, LPARAM lParam) /* use MAX of bitmap height and tm.tmHeight .*/ hdc=GetDC(hDlg); if(!hdc) return 0; - hfontprev = SelectObject( hdc, GetStockObject( DEFAULT_GUI_FONT ) ); + hfontprev = SelectObject( hdc, (HFONT)SendMessageW( hDlg, WM_GETFONT, 0, 0 )); GetTextMetricsW(hdc, &tm); if( tm.tmHeight > lpmi->itemHeight) lpmi->itemHeight = tm.tmHeight; SelectObject(hdc, hfontprev); @@ -801,7 +801,7 @@ static LRESULT CFn_WMDrawItem(LPARAM lParam) COLORREF cr, oldText=0, oldBk=0; RECT rect; int nFontType; - int idx; + int cx, cy, idx; LPDRAWITEMSTRUCT lpdi = (LPDRAWITEMSTRUCT)lParam; if (lpdi->itemID == (UINT)-1) /* got no items */ @@ -830,9 +830,10 @@ static LRESULT CFn_WMDrawItem(LPARAM lParam) { case cmb1: /* TRACE(commdlg,"WM_Drawitem cmb1\n"); */ + ImageList_GetIconSize( himlTT, &cx, &cy); SendMessageW(lpdi->hwndItem, CB_GETLBTEXT, lpdi->itemID, (LPARAM)buffer); - TextOutW(lpdi->hDC, lpdi->rcItem.left + TTBITMAP_XSIZE + 10, + TextOutW(lpdi->hDC, lpdi->rcItem.left + cx + 4, lpdi->rcItem.top, buffer, lstrlenW(buffer)); nFontType = SendMessageW(lpdi->hwndItem, CB_GETITEMDATA, lpdi->itemID,0L); idx = -1; @@ -848,7 +849,7 @@ static LRESULT CFn_WMDrawItem(LPARAM lParam) idx = 1; /* picture: printer */ if( idx >= 0) ImageList_Draw( himlTT, idx, lpdi->hDC, lpdi->rcItem.left, - lpdi->rcItem.top, ILD_TRANSPARENT); + (lpdi->rcItem.top + lpdi->rcItem.bottom - cy) / 2, ILD_TRANSPARENT); break; case cmb2: case cmb3:
1
0
0
0
Alexandre Julliard : comctl32/comboex: Add support for setting the font.
by Alexandre Julliard
29 May '13
29 May '13
Module: wine Branch: master Commit: 3e33f61c562a53c62d2e66ab5abfb9c26f6237c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e33f61c562a53c62d2e66ab5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 29 15:55:32 2013 +0200 comctl32/comboex: Add support for setting the font. --- dlls/comctl32/comboex.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c index 244cc95..f1acc7d 100644 --- a/dlls/comctl32/comboex.c +++ b/dlls/comctl32/comboex.c @@ -1607,6 +1607,15 @@ static LRESULT COMBOEX_Size (COMBOEX_INFO *infoPtr, INT width, INT height) return 0; } +static LRESULT COMBOEX_SetFont( COMBOEX_INFO *infoPtr, HFONT font, BOOL redraw ) +{ + infoPtr->font = font; + SendMessageW( infoPtr->hwndCombo, WM_SETFONT, (WPARAM)font, 0 ); + if (infoPtr->hwndEdit) SendMessageW( infoPtr->hwndEdit, WM_SETFONT, (WPARAM)font, 0 ); + COMBOEX_ReSize( infoPtr ); + if (redraw) InvalidateRect( infoPtr->hwndCombo, NULL, TRUE ); + return 0; +} static LRESULT COMBOEX_SetRedraw(const COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { @@ -2136,6 +2145,12 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_SIZE: return COMBOEX_Size (infoPtr, LOWORD(lParam), HIWORD(lParam)); + case WM_GETFONT: + return (LRESULT)infoPtr->font; + + case WM_SETFONT: + return COMBOEX_SetFont( infoPtr, (HFONT)wParam, LOWORD(lParam) != 0 ); + case WM_SETREDRAW: return COMBOEX_SetRedraw(infoPtr, wParam, lParam);
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
50
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200