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
July
June
May
April
March
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
July 2018
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
405 discussions
Start a n
N
ew thread
Nikolay Sivov : comctl32/taskdialog: Use per-window dpi settings.
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: 6292c0abdcb7b710914fe731c96eff6c6c219f17 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6292c0abdcb7b710914fe731…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jul 17 14:13:06 2018 +0300 comctl32/taskdialog: Use per-window dpi settings. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/taskdialog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c index 4631899..856a0b3 100644 --- a/dlls/comctl32/taskdialog.c +++ b/dlls/comctl32/taskdialog.c @@ -316,8 +316,8 @@ static void taskdialog_get_radio_button_size(struct taskdialog_info *dialog_info hfont = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0); old_hfont = SelectObject(hdc, hfont); - radio_box_width = 12 * GetDeviceCaps(hdc, LOGPIXELSX) / 96 + 1; - radio_box_height = 12 * GetDeviceCaps(hdc, LOGPIXELSY) / 96 + 1; + radio_box_width = 12 * GetDpiForWindow(hwnd) / 96 + 1; + radio_box_height = 12 * GetDpiForWindow(hwnd) / 96 + 1; GetCharWidthW(hdc, '0', '0', &text_offset); text_offset /= 2;
1
0
0
0
Nikolay Sivov : comctl32/button: Use per-window dpi settings.
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: 40298cc69a9966b678ec45ad4d9ca1aea55d33a5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=40298cc69a9966b678ec45ad…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jul 17 14:13:05 2018 +0300 comctl32/button: Use per-window dpi settings. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 507820c..56968f9 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -1092,8 +1092,8 @@ static void CB_Paint( const BUTTON_INFO *infoPtr, HDC hDC, UINT action ) GetClientRect(infoPtr->hwnd, &client); rbox = rtext = client; - checkBoxWidth = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1; - checkBoxHeight = 12 * GetDeviceCaps( hDC, LOGPIXELSY ) / 96 + 1; + checkBoxWidth = 12 * GetDpiForWindow( infoPtr->hwnd ) / 96 + 1; + checkBoxHeight = 12 * GetDpiForWindow( infoPtr->hwnd ) / 96 + 1; if ((hFont = infoPtr->font)) SelectObject( hDC, hFont ); GetCharWidthW( hDC, '0', '0', &text_offset );
1
0
0
0
Nikolay Sivov : user32/button: Use per-window dpi settings.
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: 85d159a408b80613ea1d02a63ac3f908dcf0ee56 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=85d159a408b80613ea1d02a6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jul 17 14:13:04 2018 +0300 user32/button: Use per-window dpi settings. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/button.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/button.c b/dlls/user32/button.c index 7684e7f..9255a46 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -842,8 +842,8 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action ) GetClientRect(hwnd, &client); rbox = rtext = client; - checkBoxWidth = 12 * GetDeviceCaps( hDC, LOGPIXELSX ) / 96 + 1; - checkBoxHeight = 12 * GetDeviceCaps( hDC, LOGPIXELSY ) / 96 + 1; + checkBoxWidth = 12 * GetDpiForWindow( hwnd ) / 96 + 1; + checkBoxHeight = 12 * GetDpiForWindow( hwnd ) / 96 + 1; if ((hFont = get_button_font( hwnd ))) SelectObject( hDC, hFont ); GetCharWidthW( hDC, '0', '0', &text_offset );
1
0
0
0
Józef Kucia : vulkan-1/tests: Enumerate queue families.
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: adeeb0dc2173cfddab7c03b651b6b51647979ef7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=adeeb0dc2173cfddab7c03b6…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jul 17 15:05:53 2018 +0200 vulkan-1/tests: Enumerate queue families. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vulkan-1/tests/vulkan.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/dlls/vulkan-1/tests/vulkan.c b/dlls/vulkan-1/tests/vulkan.c index bf83a28..1d2f66f 100644 --- a/dlls/vulkan-1/tests/vulkan.c +++ b/dlls/vulkan-1/tests/vulkan.c @@ -149,6 +149,28 @@ static void enumerate_physical_device(VkPhysicalDevice vk_physical_device) VK_VERSION_PATCH(properties.apiVersion)); } +static void enumerate_device_queues(VkPhysicalDevice vk_physical_device) +{ + VkPhysicalDeviceProperties device_properties; + VkQueueFamilyProperties *properties; + uint32_t i, count; + + vkGetPhysicalDeviceProperties(vk_physical_device, &device_properties); + + vkGetPhysicalDeviceQueueFamilyProperties(vk_physical_device, &count, NULL); + properties = heap_calloc(count, sizeof(*properties)); + ok(!!properties, "Failed to allocate memory.\n"); + vkGetPhysicalDeviceQueueFamilyProperties(vk_physical_device, &count, properties); + + for (i = 0; i < count; ++i) + { + trace("Device '%s', queue family %u: flags %#x count %u.\n", + device_properties.deviceName, i, properties[i].queueFlags, properties[i].queueCount); + } + + heap_free(properties); +} + static void test_physical_device_groups(void) { PFN_vkEnumeratePhysicalDeviceGroupsKHR vkEnumeratePhysicalDeviceGroupsKHR; @@ -248,5 +270,6 @@ START_TEST(vulkan) { test_instance_version(); for_each_device(enumerate_physical_device); + for_each_device(enumerate_device_queues); test_physical_device_groups(); }
1
0
0
0
Józef Kucia : winevulkan: Avoid FIXMEs for unsupported Vulkan functions.
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: a77416c47a3dc61b5553d310e1b0f87ffb7a605f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a77416c47a3dc61b5553d310…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jul 17 10:40:18 2018 +0200 winevulkan: Avoid FIXMEs for unsupported Vulkan functions. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/vulkan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 5c156c1..0bb68c2 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -935,7 +935,7 @@ PFN_vkVoidFunction WINAPI wine_vkGetDeviceProcAddr(VkDevice device, const char * return func; } - TRACE("Function %s not found.\n", debugstr_a(name)); + WARN("Unsupported device function: %s.\n", debugstr_a(name)); return NULL; } @@ -970,7 +970,7 @@ PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance instance, const { void *func; - TRACE("%p %s\n", instance, debugstr_a(name)); + TRACE("%p, %s\n", instance, debugstr_a(name)); if (!name) return NULL; @@ -985,7 +985,7 @@ PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance instance, const } if (!instance) { - FIXME("Global function %s not found.\n", debugstr_a(name)); + WARN("Global function %s not found.\n", debugstr_a(name)); return NULL; } @@ -996,13 +996,13 @@ PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance instance, const func = wine_vk_get_device_proc_addr(name); if (func) return func; - FIXME("Unsupported device or instance function: %s.\n", debugstr_a(name)); + WARN("Unsupported device or instance function: %s.\n", debugstr_a(name)); return NULL; } void * WINAPI wine_vk_icdGetInstanceProcAddr(VkInstance instance, const char *name) { - TRACE("%p %s\n", instance, debugstr_a(name)); + TRACE("%p, %s\n", instance, debugstr_a(name)); /* Initial version of the Vulkan ICD spec required vkGetInstanceProcAddr to be * exported. vk_icdGetInstanceProcAddr was added later to separate ICD calls from
1
0
0
0
Alexandre Julliard : user32: Take DPI awareness into account in GetDpiForMonitorInternal().
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: 898f4b6c6a20cc3800bd38142da1d02d5a6a948e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=898f4b6c6a20cc3800bd3814…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 17 13:54:40 2018 +0200 user32: Take DPI awareness into account in GetDpiForMonitorInternal(). Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 34 +++++++++++++++++++++++++++------- dlls/user32/tests/sysparams.c | 22 ++++++++++++++++++++++ dlls/user32/win.c | 8 ++++++-- dlls/user32/win.h | 3 ++- 4 files changed, 57 insertions(+), 10 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index e1044e94..c92d9af 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -39,6 +39,7 @@ #include "winerror.h" #include "controls.h" +#include "win.h" #include "user_private.h" #include "wine/gdi_driver.h" #include "wine/unicode.h" @@ -3192,7 +3193,16 @@ BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum, /********************************************************************** * get_monitor_dpi */ -UINT get_monitor_dpi( HWND hwnd ) +UINT get_monitor_dpi( HMONITOR monitor ) +{ + /* FIXME: use the monitor DPI instead */ + return system_dpi; +} + +/********************************************************************** + * get_win_monitor_dpi + */ +UINT get_win_monitor_dpi( HWND hwnd ) { /* FIXME: use the monitor DPI instead */ return system_dpi; @@ -3324,12 +3334,22 @@ UINT WINAPI GetDpiForSystem(void) */ BOOL WINAPI GetDpiForMonitorInternal( HMONITOR monitor, UINT type, UINT *x, UINT *y ) { - UINT dpi = system_dpi; - - WARN( "(%p, %u, %p, %p): semi-stub\n", monitor, type, x, y ); - - if (x) *x = dpi; - if (y) *y = dpi; + if (type > 2) + { + SetLastError( ERROR_BAD_ARGUMENTS ); + return FALSE; + } + if (!x || !y) + { + SetLastError( ERROR_INVALID_ADDRESS ); + return FALSE; + } + switch (GetAwarenessFromDpiAwarenessContext( GetThreadDpiAwarenessContext() )) + { + case DPI_AWARENESS_UNAWARE: *x = *y = USER_DEFAULT_SCREEN_DPI; break; + case DPI_AWARENESS_SYSTEM_AWARE: *x = *y = system_dpi; break; + default: *x = *y = get_monitor_dpi( monitor ); break; + } return TRUE; } diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index fec37b6..7903c9a 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -46,6 +46,7 @@ static BOOL (WINAPI *pGetProcessDpiAwarenessInternal)(HANDLE,DPI_AWARENESS*); static BOOL (WINAPI *pSetProcessDpiAwarenessInternal)(DPI_AWARENESS); static UINT (WINAPI *pGetDpiForSystem)(void); static UINT (WINAPI *pGetDpiForWindow)(HWND); +static BOOL (WINAPI *pGetDpiForMonitorInternal)(HMONITOR,UINT,UINT*,UINT*); static DPI_AWARENESS_CONTEXT (WINAPI *pGetThreadDpiAwarenessContext)(void); static DPI_AWARENESS_CONTEXT (WINAPI *pSetThreadDpiAwarenessContext)(DPI_AWARENESS_CONTEXT); static DPI_AWARENESS_CONTEXT (WINAPI *pGetWindowDpiAwarenessContext)(HWND); @@ -3549,6 +3550,26 @@ static void test_dpi_window(void) dpi = pGetDpiForWindow( hwnd ); ok( dpi == (i == DPI_AWARENESS_UNAWARE ? USER_DEFAULT_SCREEN_DPI : real_dpi), "%lu: got %u / %u\n", i, dpi, real_dpi ); + if (pGetDpiForMonitorInternal) + { + BOOL res; + SetLastError( 0xdeadbeef ); + res = pGetDpiForMonitorInternal( MonitorFromWindow( hwnd, 0 ), 0, &dpi, NULL ); + ok( !res, "succeeded\n" ); + ok( GetLastError() == ERROR_INVALID_ADDRESS, "wrong error %u\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + res = pGetDpiForMonitorInternal( MonitorFromWindow( hwnd, 0 ), 3, &dpi, &dpi ); + ok( !res, "succeeded\n" ); + ok( GetLastError() == ERROR_BAD_ARGUMENTS, "wrong error %u\n", GetLastError() ); + SetLastError( 0xdeadbeef ); + res = pGetDpiForMonitorInternal( MonitorFromWindow( hwnd, 0 ), 3, &dpi, NULL ); + ok( !res, "succeeded\n" ); + ok( GetLastError() == ERROR_BAD_ARGUMENTS, "wrong error %u\n", GetLastError() ); + res = pGetDpiForMonitorInternal( MonitorFromWindow( hwnd, 0 ), 0, &dpi, &dpi ); + ok( res, "failed err %u\n", GetLastError() ); + ok( dpi == (i == DPI_AWARENESS_UNAWARE ? USER_DEFAULT_SCREEN_DPI : real_dpi), + "%lu: got %u / %u\n", i, dpi, real_dpi ); + } msg.hwnd = hwnd; for (j = DPI_AWARENESS_UNAWARE; j <= DPI_AWARENESS_PER_MONITOR_AWARE; j++) { @@ -3660,6 +3681,7 @@ START_TEST(sysparams) pSetProcessDPIAware = (void*)GetProcAddress(hdll, "SetProcessDPIAware"); pGetDpiForSystem = (void*)GetProcAddress(hdll, "GetDpiForSystem"); pGetDpiForWindow = (void*)GetProcAddress(hdll, "GetDpiForWindow"); + pGetDpiForMonitorInternal = (void*)GetProcAddress(hdll, "GetDpiForMonitorInternal"); pSetProcessDpiAwarenessContext = (void*)GetProcAddress(hdll, "SetProcessDpiAwarenessContext"); pGetProcessDpiAwarenessInternal = (void*)GetProcAddress(hdll, "GetProcessDpiAwarenessInternal"); pSetProcessDpiAwarenessInternal = (void*)GetProcAddress(hdll, "SetProcessDpiAwarenessInternal"); diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 28bc1f6..5f2ac4e 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -2240,11 +2240,15 @@ UINT WINAPI GetDpiForWindow( HWND hwnd ) SetLastError( ERROR_INVALID_WINDOW_HANDLE ); return 0; } - if (win == WND_DESKTOP) return get_monitor_dpi( GetDesktopWindow() ); + if (win == WND_DESKTOP) + { + POINT pt = { 0, 0 }; + return get_monitor_dpi( MonitorFromPoint( pt, MONITOR_DEFAULTTOPRIMARY )); + } if (win != WND_OTHER_PROCESS) { ret = win->dpi; - if (!ret) ret = get_monitor_dpi( hwnd ); + if (!ret) ret = get_win_monitor_dpi( hwnd ); WIN_ReleasePtr( win ); } else diff --git a/dlls/user32/win.h b/dlls/user32/win.h index 15331c3..b6c162a 100644 --- a/dlls/user32/win.h +++ b/dlls/user32/win.h @@ -128,7 +128,8 @@ extern void WINPOS_ActivateOtherWindow( HWND hwnd ) DECLSPEC_HIDDEN; extern UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect ) DECLSPEC_HIDDEN; extern void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam ) DECLSPEC_HIDDEN; -extern UINT get_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN; +extern UINT get_monitor_dpi( HMONITOR monitor ) DECLSPEC_HIDDEN; +extern UINT get_win_monitor_dpi( HWND hwnd ) DECLSPEC_HIDDEN; extern BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags, const RECT *window_rect, const RECT *client_rect, const RECT *valid_rects ) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : user32: Implement monitor rectangle filtering on the user32 side.
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: aac37e8d0b64f487c9fcf538a1a1a73e9cfb8669 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aac37e8d0b64f487c9fcf538…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 17 13:50:26 2018 +0200 user32: Implement monitor rectangle filtering on the user32 side. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/sysparams.c | 75 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 53 insertions(+), 22 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 67eb90a..e1044e94 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -21,6 +21,7 @@ #include "config.h" #include <assert.h> +#include <limits.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -3562,49 +3563,79 @@ BOOL WINAPI GetMonitorInfoW( HMONITOR monitor, LPMONITORINFO info ) return ret; } -#ifdef __i386__ -/* Some apps pass a non-stdcall callback to EnumDisplayMonitors, - * so we need a small assembly wrapper to call it. - * MJ's Help Diagnostic expects that %ecx contains the address to the rect. - */ -struct enumdisplaymonitors_lparam +struct enum_mon_data { MONITORENUMPROC proc; LPARAM lparam; + HDC hdc; + POINT origin; + RECT limit; }; -extern BOOL CALLBACK enumdisplaymonitors_callback_wrapper(HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lparam); -__ASM_STDCALL_FUNC( enumdisplaymonitors_callback_wrapper, 16, +#ifdef __i386__ +/* Some apps pass a non-stdcall callback to EnumDisplayMonitors, + * so we need a small assembly wrapper to call it. + * MJ's Help Diagnostic expects that %ecx contains the address to the rect. + */ +extern BOOL enum_mon_callback_wrapper( HMONITOR monitor, LPRECT rect, struct enum_mon_data *data ); +__ASM_GLOBAL_FUNC( enum_mon_callback_wrapper, "pushl %ebp\n\t" __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") "movl %esp,%ebp\n\t" __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "subl $8,%esp\n\t" - "movl 20(%ebp),%eax\n\t" /* struct enumdisplaymonitors_lparam *orig = (struct enumdisplaymonitors_lparam*)lparam */ - "pushl 4(%eax)\n\t" /* push orig->lparam */ - "pushl 16(%ebp)\n\t" - "pushl 12(%ebp)\n\t" - "pushl 8(%ebp)\n\t" - "movl 16(%ebp),%ecx\n\t" - "call *(%eax)\n\t" /* call orig->proc */ + "movl 16(%ebp),%eax\n\t" /* data */ + "movl 12(%ebp),%ecx\n\t" /* rect */ + "pushl 4(%eax)\n\t" /* data->lparam */ + "pushl %ecx\n\t" /* rect */ + "pushl 8(%eax)\n\t" /* data->hdc */ + "pushl 8(%ebp)\n\t" /* monitor */ + "call *(%eax)\n\t" /* data->proc */ "leave\n\t" __ASM_CFI(".cfi_def_cfa %esp,4\n\t") __ASM_CFI(".cfi_same_value %ebp\n\t") - "ret $16" ) + "ret" ) #endif /* __i386__ */ +static BOOL CALLBACK enum_mon_callback( HMONITOR monitor, HDC hdc, LPRECT rect, LPARAM lp ) +{ + struct enum_mon_data *data = (struct enum_mon_data *)lp; + RECT monrect = *rect; + + OffsetRect( &monrect, -data->origin.x, -data->origin.y ); + if (!IntersectRect( &monrect, &monrect, &data->limit )) return TRUE; +#ifdef __i386__ + return enum_mon_callback_wrapper( monitor, &monrect, data ); +#else + return data->proc( monitor, data->hdc, &monrect, data->lparam ); +#endif +} + /*********************************************************************** * EnumDisplayMonitors (USER32.@) */ BOOL WINAPI EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp ) { -#ifdef __i386__ - struct enumdisplaymonitors_lparam orig = { proc, lp }; - proc = enumdisplaymonitors_callback_wrapper; - lp = (LPARAM)&orig; -#endif - return USER_Driver->pEnumDisplayMonitors( hdc, rect, proc, lp ); + struct enum_mon_data data; + + data.proc = proc; + data.lparam = lp; + data.hdc = hdc; + + if (hdc) + { + if (!GetDCOrgEx( hdc, &data.origin )) return FALSE; + if (GetClipBox( hdc, &data.limit ) == ERROR) return FALSE; + } + else + { + data.origin.x = data.origin.y = 0; + data.limit.left = data.limit.top = INT_MIN; + data.limit.right = data.limit.bottom = INT_MAX; + } + if (rect && !IntersectRect( &data.limit, &data.limit, rect )) return TRUE; + return USER_Driver->pEnumDisplayMonitors( 0, NULL, enum_mon_callback, (LPARAM)&data ); }
1
0
0
0
Alexandre Julliard : user32: Move monitor functions to sysparams.c.
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: 2be5b054d3dd48be8105be62b78dab40e1d46cad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2be5b054d3dd48be8105be62…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jul 17 13:49:03 2018 +0200 user32: Move monitor functions to sysparams.c. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/misc.c | 208 ------------------------------------------------ dlls/user32/sysparams.c | 205 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 205 insertions(+), 208 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2be5b054d3dd48be8105…
1
0
0
0
Zhiyi Zhang : user32: Return FALSE for invalid handle in IsWindowEnabled() .
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: bfe6826a16f5997a8ee119b191874ad077c3d4e7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfe6826a16f5997a8ee119b1…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jul 16 11:27:47 2018 +0800 user32: Return FALSE for invalid handle in IsWindowEnabled(). GetWindowLong() returns 0 if passed an invalid window handle, causing IsWindowEnabled() to incorrectly report TRUE. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/win.c | 22 ++++++++++++++++++++++ dlls/user32/win.c | 8 ++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c index d7f8843..94eff5e 100644 --- a/dlls/user32/tests/win.c +++ b/dlls/user32/tests/win.c @@ -10700,6 +10700,27 @@ static void test_destroy_quit(void) CloseHandle( thread1 ); } +static void test_IsWindowEnabled(void) +{ + BOOL ret; + HWND hwnd; + + ret = IsWindowEnabled(NULL); + ok(!ret, "Expect IsWindowEnabled() return FALSE\n"); + + hwnd = GetDesktopWindow(); + ret = IsWindowEnabled(hwnd); + ok(ret, "Expect IsWindowEnabled() return TRUE\n"); + + hwnd = create_tool_window(WS_CHILD | WS_VISIBLE, hwndMain); + ret = IsWindowEnabled(hwnd); + ok(ret, "Expect IsWindowEnabled() return TRUE\n"); + EnableWindow(hwnd, FALSE); + ret = IsWindowEnabled(hwnd); + ok(!ret, "Expect IsWindowEnabled() return FALSE\n"); + DestroyWindow(hwnd); +} + START_TEST(win) { char **argv; @@ -10856,6 +10877,7 @@ START_TEST(win) test_hide_window(); test_minimize_window(hwndMain); test_destroy_quit(); + test_IsWindowEnabled(); /* add the tests above this line */ if (hhook) UnhookWindowsHookEx(hhook); diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 3535c1b..28bc1f6 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -2157,9 +2157,13 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable ) */ BOOL WINAPI IsWindowEnabled(HWND hWnd) { - return !(GetWindowLongW( hWnd, GWL_STYLE ) & WS_DISABLED); -} + LONG ret; + SetLastError(NO_ERROR); + ret = GetWindowLongW( hWnd, GWL_STYLE ); + if (!ret && GetLastError() != NO_ERROR) return FALSE; + return !(ret & WS_DISABLED); +} /*********************************************************************** * IsWindowUnicode (USER32.@)
1
0
0
0
Zhiyi Zhang : user32/tests: Sleep when sending mouse clicks too fast.
by Alexandre Julliard
17 Jul '18
17 Jul '18
Module: wine Branch: master Commit: 0b69359a24f91122eef330d537350d9f51ed87ea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0b69359a24f91122eef330d5…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Jul 16 23:05:14 2018 +0800 user32/tests: Sleep when sending mouse clicks too fast. A thread is used to send test data. If the thread sends mouse clicks before pop-up menu initialization, it would report send input failure and skip the tests. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/menu.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c index 6a4990f..de08283 100644 --- a/dlls/user32/tests/menu.c +++ b/dlls/user32/tests/menu.c @@ -2253,7 +2253,7 @@ static struct menu_mouse_tests_s { { INPUT_MOUSE, {{1, 0}, {2, 0}, {0}}, {0}, TRUE, FALSE }, { INPUT_MOUSE, {{3, 0}, {0}}, {0}, FALSE, FALSE }, { INPUT_MOUSE, {{1, 0}, {2, 0}, {0}}, {0}, TRUE, FALSE }, - { INPUT_MOUSE, {{3, 1}, {0}}, {0}, TRUE, TRUE }, + { INPUT_MOUSE, {{3, 1}, {0}}, {0}, TRUE, FALSE }, { INPUT_MOUSE, {{1, 1}, {0}}, {0}, FALSE, FALSE }, { -1 } }; @@ -2307,7 +2307,7 @@ static DWORD WINAPI test_menu_input_thread(LPVOID lpParameter) for (i = 0; menu_tests[i].type != -1; i++) { BOOL ret = TRUE; - int elapsed = 0; + int elapsed; got_input = i && menu_tests[i-1].bMenuVisible; @@ -2316,7 +2316,16 @@ static DWORD WINAPI test_menu_input_thread(LPVOID lpParameter) send_key(menu_tests[i].wVk[j]); else for (j = 0; menu_tests[i].menu_item_pairs[j].uMenu != 0; j++) - if (!(ret = click_menu(hWnd, &menu_tests[i].menu_item_pairs[j]))) break; + { + /* Maybe clicking too fast before menu is initialized. Sleep 100 ms and retry */ + elapsed = 0; + while (!(ret = click_menu(hWnd, &menu_tests[i].menu_item_pairs[j]))) + { + if (elapsed > 1000) break; + elapsed += 100; + Sleep(100); + } + } if (!ret) { @@ -2324,6 +2333,8 @@ static DWORD WINAPI test_menu_input_thread(LPVOID lpParameter) PostMessageA( hWnd, WM_CANCELMODE, 0, 0 ); return 0; } + + elapsed = 0; while (menu_tests[i].bMenuVisible != bMenuVisible) { if (elapsed > 200)
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
41
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
Results per page:
10
25
50
100
200