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
August 2018
----- 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
618 discussions
Start a n
N
ew thread
Alexandre Julliard : gdi32: Fall back to GetSystemMetrics() for the virtual desktop size.
by Alexandre Julliard
22 Aug '18
22 Aug '18
Module: wine Branch: master Commit: d0579649c1fb725b2bc1d15b7dbee866ffb44ebf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d0579649c1fb725b2bc1d15b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 22 12:56:53 2018 +0200 gdi32: Fall back to GetSystemMetrics() for the virtual desktop size. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/driver.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 4a5058e..6580008 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -63,6 +63,7 @@ static CRITICAL_SECTION driver_section = { &critsect_debug, -1, 0, 0, 0, 0 }; static typeof(GetDesktopWindow) *pGetDesktopWindow; static typeof(GetSystemMetrics) *pGetSystemMetrics; +static typeof(SetThreadDpiAwarenessContext) *pSetThreadDpiAwarenessContext; /********************************************************************** * create_driver @@ -182,6 +183,7 @@ void CDECL __wine_set_display_driver( HMODULE module ) user32 = LoadLibraryA( "user32.dll" ); pGetSystemMetrics = (void *)GetProcAddress( user32, "GetSystemMetrics" ); + pSetThreadDpiAwarenessContext = (void *)GetProcAddress( user32, "SetThreadDpiAwarenessContext" ); } @@ -352,8 +354,28 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap ) case SCALINGFACTORX: return 0; case SCALINGFACTORY: return 0; case VREFRESH: return GetDeviceCaps( dev->hdc, TECHNOLOGY ) == DT_RASDISPLAY ? 1 : 0; - case DESKTOPVERTRES: return GetDeviceCaps( dev->hdc, VERTRES ); - case DESKTOPHORZRES: return GetDeviceCaps( dev->hdc, HORZRES ); + case DESKTOPHORZRES: + if (pGetSystemMetrics) + { + DPI_AWARENESS_CONTEXT context; + UINT ret; + context = pSetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ); + ret = pGetSystemMetrics( SM_CXVIRTUALSCREEN ); + pSetThreadDpiAwarenessContext( context ); + return ret; + } + return GetDeviceCaps( dev->hdc, HORZRES ); + case DESKTOPVERTRES: + if (pGetSystemMetrics) + { + DPI_AWARENESS_CONTEXT context; + UINT ret; + context = pSetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ); + ret = pGetSystemMetrics( SM_CYVIRTUALSCREEN ); + pSetThreadDpiAwarenessContext( context ); + return ret; + } + return GetDeviceCaps( dev->hdc, VERTRES ); case BLTALIGNMENT: return 0; case SHADEBLENDCAPS: return 0; case COLORMGMTCAPS: return 0;
1
0
0
0
Alexandre Julliard : gdi32: Fall back to GetSystemMetrics() for the screen size.
by Alexandre Julliard
22 Aug '18
22 Aug '18
Module: wine Branch: master Commit: 6d395fcca4ae825afa481890b148ca73fd0db375 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6d395fcca4ae825afa481890…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 22 11:21:05 2018 +0200 gdi32: Fall back to GetSystemMetrics() for the screen size. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/driver.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index c81a2e1..4a5058e 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -30,6 +30,7 @@ #include "winbase.h" #include "ddrawgdi.h" #include "wine/winbase16.h" +#include "winuser.h" #include "winternl.h" #include "gdi_private.h" @@ -60,6 +61,9 @@ static CRITICAL_SECTION_DEBUG critsect_debug = }; static CRITICAL_SECTION driver_section = { &critsect_debug, -1, 0, 0, 0, 0 }; +static typeof(GetDesktopWindow) *pGetDesktopWindow; +static typeof(GetSystemMetrics) *pGetSystemMetrics; + /********************************************************************** * create_driver * @@ -97,7 +101,7 @@ static const struct gdi_dc_funcs *get_display_driver(void) if (!display_driver) { HMODULE user32 = LoadLibraryA( "user32.dll" ); - HWND (WINAPI *pGetDesktopWindow)(void) = (void *)GetProcAddress( user32, "GetDesktopWindow" ); + pGetDesktopWindow = (void *)GetProcAddress( user32, "GetDesktopWindow" ); if (!pGetDesktopWindow() || !display_driver) { @@ -166,6 +170,7 @@ done: void CDECL __wine_set_display_driver( HMODULE module ) { struct graphics_driver *driver; + HMODULE user32; if (!(driver = create_driver( module ))) { @@ -174,6 +179,9 @@ void CDECL __wine_set_display_driver( HMODULE module ) } if (InterlockedCompareExchangePointer( (void **)&display_driver, driver, NULL )) HeapFree( GetProcessHeap(), 0, driver ); + + user32 = LoadLibraryA( "user32.dll" ); + pGetSystemMetrics = (void *)GetProcAddress( user32, "GetSystemMetrics" ); } @@ -308,8 +316,8 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap ) GetDeviceCaps( dev->hdc, LOGPIXELSX ) * 10 ); case VERTSIZE: return MulDiv( GetDeviceCaps( dev->hdc, VERTRES ), 254, GetDeviceCaps( dev->hdc, LOGPIXELSY ) * 10 ); - case HORZRES: return 640; - case VERTRES: return 480; + case HORZRES: return pGetSystemMetrics ? pGetSystemMetrics( SM_CXSCREEN ) : 640; + case VERTRES: return pGetSystemMetrics ? pGetSystemMetrics( SM_CYSCREEN ) : 480; case BITSPIXEL: return 32; case PLANES: return 1; case NUMBRUSHES: return -1;
1
0
0
0
Alexandre Julliard : user32/tests: Add tests for window rectangles and DPI scaling.
by Alexandre Julliard
22 Aug '18
22 Aug '18
Module: wine Branch: master Commit: f49227db6094be917057f7f9d54b832dc3743bc8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f49227db6094be917057f7f9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 22 11:45:58 2018 +0200 user32/tests: Add tests for window rectangles and DPI scaling. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/sysparams.c | 191 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 171 insertions(+), 20 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f49227db6094be917057…
1
0
0
0
Alexandre Julliard : user32/tests: Add tests for desktop size and DPI scaling.
by Alexandre Julliard
22 Aug '18
22 Aug '18
Module: wine Branch: master Commit: 98146e1bce568b1755922d4840ae312ebc4480c1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=98146e1bce568b1755922d48…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Aug 22 11:43:08 2018 +0200 user32/tests: Add tests for desktop size and DPI scaling. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/sysparams.c | 48 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index 7903c9a..36a9ef8 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -3193,11 +3193,14 @@ static void scale_rect_dpi( RECT *rect, UINT src_dpi, UINT target_dpi ) static void test_dpi_mapping(void) { HWND hwnd; + HDC hdc; UINT win_dpi; POINT point; BOOL ret, todo; - RECT rect, orig, client, expect; + RECT rect, orig, client, desktop, expect; ULONG_PTR i, j; + HMONITOR monitor; + MONITORINFO mon_info; DPI_AWARENESS_CONTEXT context; if (!pLogicalToPhysicalPointForPerMonitorDPI) @@ -3205,7 +3208,48 @@ static void test_dpi_mapping(void) win_skip( "LogicalToPhysicalPointForPerMonitorDPI not supported\n" ); return; } - context = pGetThreadDpiAwarenessContext(); + context = pSetThreadDpiAwarenessContext( DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE ); + GetWindowRect( GetDesktopWindow(), &desktop ); + for (i = DPI_AWARENESS_UNAWARE; i <= DPI_AWARENESS_PER_MONITOR_AWARE; i++) + { + pSetThreadDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i ); + /* test desktop rect */ + GetWindowRect( GetDesktopWindow(), &rect ); + expect = desktop; + if (i == DPI_AWARENESS_UNAWARE) scale_rect_dpi( &expect, real_dpi, USER_DEFAULT_SCREEN_DPI ); + ok( EqualRect( &expect, &rect ), "%lu: wrong desktop rect %s expected %s\n", + i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); + SetRect( &rect, 0, 0, GetSystemMetrics( SM_CXSCREEN ), GetSystemMetrics( SM_CYSCREEN )); + ok( EqualRect( &expect, &rect ), "%lu: wrong desktop rect %s expected %s\n", + i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); + SetRect( &rect, 0, 0, GetSystemMetrics( SM_CXVIRTUALSCREEN ), GetSystemMetrics( SM_CYVIRTUALSCREEN )); + ok( EqualRect( &expect, &rect ), "%lu: wrong virt desktop rect %s expected %s\n", + i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); + SetRect( &rect, 0, 0, 1, 1 ); + monitor = MonitorFromRect( &rect, MONITOR_DEFAULTTOPRIMARY ); + ok( monitor != 0, "failed to get monitor\n" ); + mon_info.cbSize = sizeof(mon_info); + ok( GetMonitorInfoW( monitor, &mon_info ), "GetMonitorInfoExW failed\n" ); + ok( EqualRect( &expect, &mon_info.rcMonitor ), "%lu: wrong monitor rect %s expected %s\n", + i, wine_dbgstr_rect(&mon_info.rcMonitor), wine_dbgstr_rect(&expect) ); + hdc = CreateDCA( "display", NULL, NULL, NULL ); + SetRect( &rect, 0, 0, GetDeviceCaps( hdc, HORZRES ), GetDeviceCaps( hdc, VERTRES )); + ok( EqualRect( &expect, &rect ), "%lu: wrong caps desktop rect %s expected %s\n", + i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); + SetRect( &rect, 0, 0, GetDeviceCaps( hdc, DESKTOPHORZRES ), GetDeviceCaps( hdc, DESKTOPVERTRES )); + ok( EqualRect( &desktop, &rect ), "%lu: wrong caps virt desktop rect %s expected %s\n", + i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&desktop) ); + DeleteDC( hdc ); + /* test message window rect */ + hwnd = CreateWindowA( "SysParamsTestClass", "test", WS_CHILD, + 10, 10, 20, 20, HWND_MESSAGE, 0, GetModuleHandleA(0), NULL ); + GetWindowRect( GetAncestor( hwnd, GA_PARENT ), &rect ); + SetRect( &expect, 0, 0, 100, 100 ); + if (i == DPI_AWARENESS_UNAWARE) scale_rect_dpi( &expect, real_dpi, USER_DEFAULT_SCREEN_DPI ); + ok( EqualRect( &expect, &rect ), "%lu: wrong message rect %s expected %s\n", + i, wine_dbgstr_rect(&rect), wine_dbgstr_rect(&expect) ); + DestroyWindow( hwnd ); + } for (i = DPI_AWARENESS_UNAWARE; i <= DPI_AWARENESS_PER_MONITOR_AWARE; i++) { pSetThreadDpiAwarenessContext( (DPI_AWARENESS_CONTEXT)~i );
1
0
0
0
Francois Gouget : testbot/web: Add some </div> comments identifying the corresponding <div>.
by Alexandre Julliard
22 Aug '18
22 Aug '18
Module: tools Branch: master Commit: a0078ae5726a27ec5b701b18edfcd7a4883293ab URL:
https://source.winehq.org/git/tools.git/?a=commit;h=a0078ae5726a27ec5b701b1…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Aug 22 10:58:50 2018 +0200 testbot/web: Add some </div> comments identifying the corresponding <div>. This helps debug HTML tag balancing errors. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/ObjectModel/CGI/FormPage.pm | 4 ++-- testbot/lib/WineTestBot/CGI/PageBase.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testbot/lib/ObjectModel/CGI/FormPage.pm b/testbot/lib/ObjectModel/CGI/FormPage.pm index b3861dd..3a41fe0 100644 --- a/testbot/lib/ObjectModel/CGI/FormPage.pm +++ b/testbot/lib/ObjectModel/CGI/FormPage.pm @@ -128,8 +128,8 @@ sub GenerateBody($) { print "<p>$Text</p>\n"; } - print "</div>\n"; - print "</div>\n"; + print "</div><!--Content-->\n"; + print "</div><!--ItemBody-->\n"; } sub GenerateFormStart($) diff --git a/testbot/lib/WineTestBot/CGI/PageBase.pm b/testbot/lib/WineTestBot/CGI/PageBase.pm index 67e8fc8..e5b2f2d 100644 --- a/testbot/lib/WineTestBot/CGI/PageBase.pm +++ b/testbot/lib/WineTestBot/CGI/PageBase.pm @@ -327,10 +327,10 @@ sub GenerateFooter($) my ($self) = @_; print <<EOF; - </div> + </div><!--ContentContainer--> <b class="rbottom"><b class="r4"> </b><b class="r3"> </b><b class="r2"> </b><b class="r1"> </b></b> </div> -</div> +</div><!--main_content--> </body> </html>
1
0
0
0
Francois Gouget : testbot/web: Fix some HTML closing tags.
by Alexandre Julliard
22 Aug '18
22 Aug '18
Module: tools Branch: master Commit: 5860a0d1e71dff0c918d6519cdb18be043b4a622 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=5860a0d1e71dff0c918d651…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Aug 22 10:56:27 2018 +0200 testbot/web: Fix some HTML closing tags. Also call the parent GenerateFooter() method in the Activity page so the HTML page is terminated correctly. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/web/Activity.pl | 6 ++++-- testbot/web/Stats.pl | 1 + testbot/web/Submit.pl | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/testbot/web/Activity.pl b/testbot/web/Activity.pl index 5124017..fa842d9 100644 --- a/testbot/web/Activity.pl +++ b/testbot/web/Activity.pl @@ -94,7 +94,7 @@ sub GenerateBody($) # Generate a custom form to let the user specify the Hours field. $self->GenerateFormStart(); - print "<div class='ItemProperty'><label>Analyze the activity of the past <div class='ItemValue'><input type='text' name='Hours' maxlength='3' size='3' value='$self->{hours}'/></div> hours.</div>\n"; + print "<div class='ItemProperty'><label>Analyze the activity of the past <div class='ItemValue'><input type='text' name='Hours' maxlength='3' size='3' value='$self->{hours}'/></div> hours.</label></div>\n"; $self->GenerateFormEnd(); print "<h1>${ProjectName} Test Bot activity</h1>\n"; @@ -267,6 +267,7 @@ EOF ### Generate the table footer print "</tbody></table></div>\n"; + print "</div>\n"; } sub GenerateFooter($) @@ -294,8 +295,9 @@ sub GenerateFooter($) print "<span class='Record-deleted'>deletion</span>.</p>\n"; print "</td></tr></tbody>\n"; - print "</tbody></table></div>\n"; + print "</table></div>\n"; print "<p class='GeneralFooterText'>Generated in ", Elapsed($self->{start}), " s</p>\n"; + $self->SUPER::GenerateFooter(); } diff --git a/testbot/web/Stats.pl b/testbot/web/Stats.pl index 64f29bd..ccabb32 100644 --- a/testbot/web/Stats.pl +++ b/testbot/web/Stats.pl @@ -335,6 +335,7 @@ sub GenerateBody($) print "</tbody></table></div>\n"; print "<p class='GeneralFooterText'>Generated in ", Elapsed($self->{start}), " s</p>\n"; + print "</div>\n"; } diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl index 926fcb7..440bd8e 100644 --- a/testbot/web/Submit.pl +++ b/testbot/web/Submit.pl @@ -237,7 +237,7 @@ sub GenerateFields($) print "<thead><tr><th class='Record'></th>\n"; print "<th class='Record'>VM Name</th>\n"; print "<th class='Record'>Description</th>\n"; - print "</th><tbody>\n"; + print "</thead><tbody>\n"; my $VMs = CreateVMs(); if ($self->{FileType} eq "exe64") @@ -296,6 +296,7 @@ sub GenerateFields($) print "</tr>\n"; } print "</tbody></table>\n"; + print "</div><!--CollectionBlock-->\n"; } else {
1
0
0
0
Francois Gouget : testbot/build: Move the common build functions to Build: :Utils.
by Alexandre Julliard
22 Aug '18
22 Aug '18
Module: tools Branch: master Commit: f0bf350b420d1f521a1ff47b8e78217bda023590 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=f0bf350b420d1f521a1ff47…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Aug 22 10:18:58 2018 +0200 testbot/build: Move the common build functions to Build::Utils. This reduces the build scripts code duplication. A side-effect is that the status lines now all start with the 'Task:' prefix. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/bin/build/Build.pl | 89 +--------- testbot/bin/build/Reconfig.pl | 113 +----------- testbot/bin/build/WineReconfig.pl | 247 +++----------------------- testbot/bin/build/WineTest.pl | 111 ++---------- testbot/lib/Build/Utils.pm | 363 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 409 insertions(+), 514 deletions(-) Diff:
https://source.winehq.org/git/tools.git/?a=commitdiff;h=f0bf350b420d1f521a1…
1
0
0
0
Francois Gouget : testbot: Add helpers to build and sanitize the WineTest tag.
by Alexandre Julliard
22 Aug '18
22 Aug '18
Module: tools Branch: master Commit: 214a97ec36c7cfa79d8445ae9cc569d0fb5b8a28 URL:
https://source.winehq.org/git/tools.git/?a=commit;h=214a97ec36c7cfa79d8445a…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Aug 22 10:17:15 2018 +0200 testbot: Add helpers to build and sanitize the WineTest tag. Also fix the sanitation: WineTest allows dots and dashes in the tag. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/bin/WineRunTask.pl | 16 ++++++---------- testbot/bin/WineRunWineTest.pl | 6 ++---- testbot/bin/build/WineTest.pl | 3 ++- testbot/lib/WineTestBot/Utils.pm | 24 +++++++++++++++++++++++- 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index 27dd8e7..c602979 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -41,11 +41,12 @@ $Name0 =~ s+^.*/++; use WineTestBot::Config; +use WineTestBot::Engine::Notify; use WineTestBot::Jobs; -use WineTestBot::VMs; use WineTestBot::Log; use WineTestBot::LogUtils; -use WineTestBot::Engine::Notify; +use WineTestBot::Utils; +use WineTestBot::VMs; # @@ -455,18 +456,13 @@ elsif ($Step->Type eq "suite") { $Keepalive = 60; $Script .= "$FileName "; - my $Tag = lc($VM->Name); - $Tag =~ s/^$TagPrefix//; - $Tag =~ s/[^a-zA-Z0-9]/-/g; - if ($VM->Type eq "win64") - { - $Tag .= "-" . ($Step->FileType eq "exe64" ? "64" : "32"); - } if (defined($WebHostName)) { my $StepTask = 100 * $StepNo + $TaskNo; $Script .= "-u \"http://$WebHostName/JobDetails.pl?Key=$JobId&s$StepTask=1#k$StepTask\" "; } + my $Tag = $VM->Type ne "win64" ? "" : $Step->FileType eq "exe64" ? "64" : "32"; + $Tag = BuildTag($VM->Name, $Tag); my $Info = $VM->Description ? $VM->Description : ""; if ($VM->Details) { @@ -481,7 +477,7 @@ elsif ($Step->Type eq "suite") $Info =~ s/"/\\"/g; $Info =~ s/%/%%/g; $Info =~ s/%/%%/g; - $Script .= "-q -o $RptFileName -t $TagPrefix-$Tag -m \"$EMail\" -i \"$Info\"\r\n". + $Script .= "-q -o $RptFileName -t $Tag -m \"$EMail\" -i \"$Info\"\r\n". "$FileName -q -s $RptFileName\r\n"; } Debug(Elapsed($Start), " Sending the script: [$Script]\n"); diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl index ac55946..2168111 100755 --- a/testbot/bin/WineRunWineTest.pl +++ b/testbot/bin/WineRunWineTest.pl @@ -425,10 +425,8 @@ my $Script = "#!/bin/sh\n". " ../bin/build/WineTest.pl "; if ($Step->Type eq "suite") { - my $Tag = lc($VM->Name); - $Tag =~ s/^$TagPrefix//; - $Tag =~ s/[^a-zA-Z0-9]/-/g; - $Script .= "--winetest ". $Task->CmdLineArg ." $TagPrefix-$Tag "; + my $BaseTag = BuildTag($VM->Name); + $Script .= "--winetest ". $Task->CmdLineArg ." $BaseTag "; if (defined $WebHostName) { my $StepTask = 100 * $StepNo + $TaskNo; diff --git a/testbot/bin/build/WineTest.pl b/testbot/bin/build/WineTest.pl index 3310b4c..b29440e 100755 --- a/testbot/bin/build/WineTest.pl +++ b/testbot/bin/build/WineTest.pl @@ -181,8 +181,9 @@ sub DailyWineTest($$$$$) # Run WineTest. Ignore the exit code since it returns non-zero whenever # there are test failures. + my $Tag = SanitizeTag("$BaseTag-$Build"); RunWine($Build, "./programs/winetest/winetest.exe.so", - "-c -o '../$Build.report' -t $BaseTag-$Build ". ShArgv2Cmd(@$Args)); + "-c -o '../$Build.report' -t $Tag ". ShArgv2Cmd(@$Args)); if (!-f "$Build.report") { LogMsg "WineTest did not produce a report file\n"; diff --git a/testbot/lib/WineTestBot/Utils.pm b/testbot/lib/WineTestBot/Utils.pm index f64310b..6fa0ccc 100644 --- a/testbot/lib/WineTestBot/Utils.pm +++ b/testbot/lib/WineTestBot/Utils.pm @@ -1,5 +1,6 @@ # -*- Mode: Perl; perl-indent-level: 2; indent-tabs-mode: nil -*- # Copyright 2009 Ge van Geldorp +# Copyright 2012-2018 Francois Gouget # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -29,7 +30,7 @@ use Exporter 'import'; our @EXPORT = qw(MakeSecureURL SecureConnection GenerateRandomString OpenNewFile CreateNewFile CreateNewLink CreateNewDir DurationToString BuildEMailRecipient IsValidFileName - ShQuote ShArgv2Cmd); + BuildTag SanitizeTag ShQuote ShArgv2Cmd); use Fcntl; @@ -176,6 +177,27 @@ sub CreateNewDir($$) # +# WineTest helpers +# + +sub SanitizeTag($) +{ + my ($Tag) = @_; + $Tag =~ s/[^a-zA-Z0-9.-]/-/g; + return substr($Tag, 0, 30); +} + +sub BuildTag($;$) +{ + my ($VMName, $Tag) = @_; + + $Tag = $Tag ? "$VMName-$Tag" : $VMName; + $Tag =~ s/^$TagPrefix//; + return SanitizeTag("$TagPrefix-$Tag"); +} + + +# # Shell helpers #
1
0
0
0
Michael Stefaniuc : explorer: Use the ARRAY_SIZE() macro.
by Alexandre Julliard
21 Aug '18
21 Aug '18
Module: wine Branch: master Commit: 83e481fee20bc5c6598e65f8295be1b3f11fb70b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=83e481fee20bc5c6598e65f8…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Aug 21 23:10:20 2018 +0200 explorer: Use the ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/explorer/desktop.c | 8 ++++---- programs/explorer/explorer.c | 32 +++++++++++++++----------------- programs/explorer/systray.c | 8 ++++---- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 4f47ad0..ff58204 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -709,7 +709,7 @@ static const WCHAR *get_default_desktop_name(void) WCHAR *ret = NULL; HKEY hkey; - if (desk && GetUserObjectInformationW( desk, UOI_NAME, buffer, sizeof(buffer)/sizeof(WCHAR), NULL )) + if (desk && GetUserObjectInformationW( desk, UOI_NAME, buffer, ARRAY_SIZE( buffer ), NULL )) { if (strcmpiW( buffer, defaultW )) return buffer; } @@ -792,7 +792,7 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid ) static const WCHAR drv_formatW[] = {'w','i','n','e','%','s','.','d','r','v',0}; WCHAR buffer[MAX_PATH], libname[32], *name, *next; - WCHAR key[sizeof(device_keyW)/sizeof(WCHAR) + 39]; + WCHAR key[ARRAY_SIZE( device_keyW ) + 39]; HMODULE module = 0; HKEY hkey; char error[80]; @@ -809,7 +809,7 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid ) RegCloseKey( hkey ); } } - else lstrcpynW( buffer, driver, sizeof(buffer)/sizeof(WCHAR) ); + else lstrcpynW( buffer, driver, ARRAY_SIZE( buffer )); name = buffer; while (name) @@ -817,7 +817,7 @@ static HMODULE load_graphics_driver( const WCHAR *driver, const GUID *guid ) next = strchrW( name, ',' ); if (next) *next++ = 0; - snprintfW( libname, sizeof(libname)/sizeof(WCHAR), drv_formatW, name ); + snprintfW( libname, ARRAY_SIZE( libname ), drv_formatW, name ); if ((module = LoadLibraryW( libname )) != 0) break; switch (GetLastError()) { diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c index c509336..955678d 100644 --- a/programs/explorer/explorer.c +++ b/programs/explorer/explorer.c @@ -345,10 +345,8 @@ static void make_explorer_window(IShellFolder* startFolder) memset(nav_buttons,0,sizeof(nav_buttons)); - LoadStringW(explorer_hInstance,IDS_EXPLORER_TITLE,explorer_title, - sizeof(explorer_title)/sizeof(WCHAR)); - LoadStringW(explorer_hInstance,IDS_PATHBOX_LABEL,pathbox_label, - sizeof(pathbox_label)/sizeof(WCHAR)); + LoadStringW(explorer_hInstance,IDS_EXPLORER_TITLE,explorer_title, ARRAY_SIZE( explorer_title )); + LoadStringW(explorer_hInstance,IDS_PATHBOX_LABEL,pathbox_label, ARRAY_SIZE( pathbox_label )); hdc = GetDC(0); dpix = GetDeviceCaps(hdc, LOGPIXELSX); @@ -415,7 +413,7 @@ static void make_explorer_window(IShellFolder* startFolder) nav_buttons[2].fsState=TBSTATE_ENABLED; nav_buttons[2].fsStyle=BTNS_BUTTON|BTNS_AUTOSIZE; SendMessageW(nav_toolbar,TB_BUTTONSTRUCTSIZE,sizeof(TBBUTTON),0); - SendMessageW(nav_toolbar,TB_ADDBUTTONSW,sizeof(nav_buttons)/sizeof(TBBUTTON),(LPARAM)nav_buttons); + SendMessageW(nav_toolbar,TB_ADDBUTTONSW,ARRAY_SIZE( nav_buttons ),(LPARAM)nav_buttons); band_info.cbSize = sizeof(band_info); band_info.fMask = RBBIM_STYLE|RBBIM_CHILD|RBBIM_CHILDSIZE|RBBIM_SIZE; @@ -738,38 +736,38 @@ static void parse_command_line(LPWSTR commandline,parameters_struct *parameters) while (*p) { while (isspaceW(*p)) p++; - if (strncmpW(p, arg_n, sizeof(arg_n)/sizeof(WCHAR))==0) + if (strncmpW(p, arg_n, ARRAY_SIZE( arg_n ))==0) { parameters->explorer_mode = FALSE; - p += sizeof(arg_n)/sizeof(WCHAR); + p += ARRAY_SIZE( arg_n ); } - else if (strncmpW(p, arg_e, sizeof(arg_e)/sizeof(WCHAR))==0) + else if (strncmpW(p, arg_e, ARRAY_SIZE( arg_e ))==0) { parameters->explorer_mode = TRUE; - p += sizeof(arg_e)/sizeof(WCHAR); + p += ARRAY_SIZE( arg_e ); } - else if (strncmpW(p, arg_root, sizeof(arg_root)/sizeof(WCHAR))==0) + else if (strncmpW(p, arg_root, ARRAY_SIZE( arg_root ))==0) { - p += sizeof(arg_root)/sizeof(WCHAR); + p += ARRAY_SIZE( arg_root ); p = copy_path_string(parameters->root,p); } - else if (strncmpW(p, arg_select, sizeof(arg_select)/sizeof(WCHAR))==0) + else if (strncmpW(p, arg_select, ARRAY_SIZE( arg_select ))==0) { - p += sizeof(arg_select)/sizeof(WCHAR); + p += ARRAY_SIZE( arg_select ); p = copy_path_string(parameters->selection,p); if (!parameters->root[0]) copy_path_root(parameters->root, parameters->selection); } - else if (strncmpW(p, arg_desktop, sizeof(arg_desktop)/sizeof(WCHAR))==0) + else if (strncmpW(p, arg_desktop, ARRAY_SIZE( arg_desktop ))==0) { - p += sizeof(arg_desktop)/sizeof(WCHAR); + p += ARRAY_SIZE( arg_desktop ); manage_desktop( p ); /* the rest of the command line is handled by desktop mode */ } /* workaround for Worms Armageddon that hardcodes a /desktop option with quotes */ - else if (strncmpW(p, arg_desktop_quotes, sizeof(arg_desktop_quotes)/sizeof(WCHAR))==0) + else if (strncmpW(p, arg_desktop_quotes, ARRAY_SIZE( arg_desktop_quotes ))==0) { - p += sizeof(arg_desktop_quotes)/sizeof(WCHAR); + p += ARRAY_SIZE( arg_desktop_quotes ); manage_desktop( p ); /* the rest of the command line is handled by desktop mode */ } else diff --git a/programs/explorer/systray.c b/programs/explorer/systray.c index 9e58ad4..3d36f74 100644 --- a/programs/explorer/systray.c +++ b/programs/explorer/systray.c @@ -405,13 +405,13 @@ static BOOL modify_icon( struct icon *icon, NOTIFYICONDATAW *nid ) } if (nid->uFlags & NIF_TIP) { - lstrcpynW(icon->tiptext, nid->szTip, sizeof(icon->tiptext)/sizeof(WCHAR)); + lstrcpynW( icon->tiptext, nid->szTip, ARRAY_SIZE( icon->tiptext )); if (icon->display != -1) update_tooltip_text(icon); } if (nid->uFlags & NIF_INFO && nid->cbSize >= NOTIFYICONDATAA_V2_SIZE) { - lstrcpynW( icon->info_text, nid->szInfo, sizeof(icon->info_text)/sizeof(WCHAR) ); - lstrcpynW( icon->info_title, nid->szInfoTitle, sizeof(icon->info_title)/sizeof(WCHAR) ); + lstrcpynW( icon->info_text, nid->szInfo, ARRAY_SIZE( icon->info_text )); + lstrcpynW( icon->info_title, nid->szInfoTitle, ARRAY_SIZE( icon->info_title )); icon->info_flags = nid->dwInfoFlags; icon->info_timeout = max(min(nid->u.uTimeout, BALLOON_SHOW_MAX_TIMEOUT), BALLOON_SHOW_MIN_TIMEOUT); icon->info_icon = nid->hBalloonIcon; @@ -933,7 +933,7 @@ void initialize_systray( HMODULE graphics_driver, BOOL using_root, BOOL arg_enab return; } - LoadStringW( NULL, IDS_START_LABEL, start_label, sizeof(start_label)/sizeof(WCHAR) ); + LoadStringW( NULL, IDS_START_LABEL, start_label, ARRAY_SIZE( start_label )); add_taskbar_button( 0 );
1
0
0
0
Michael Stefaniuc : dxdiag: Use the ARRAY_SIZE() macro.
by Alexandre Julliard
21 Aug '18
21 Aug '18
Module: wine Branch: master Commit: e011370f1329be6ee1ee3b7db25d67b95807d225 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e011370f1329be6ee1ee3b7d…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Aug 21 23:10:19 2018 +0200 dxdiag: Use the ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/dxdiag/information.c | 6 +++--- programs/dxdiag/main.c | 10 +++++----- programs/dxdiag/output.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/programs/dxdiag/information.c b/programs/dxdiag/information.c index 5cc862b..ec2b2b5 100644 --- a/programs/dxdiag/information.c +++ b/programs/dxdiag/information.c @@ -156,7 +156,7 @@ static BOOL fill_system_information(IDxDiagContainer *container, struct dxdiag_i fill_system_property_list(dxdiag_info, property_list); - for (i = 0; i < sizeof(property_list)/sizeof(property_list[0]); i++) + for (i = 0; i < ARRAY_SIZE(property_list); i++) { if (!property_to_string(container, property_list[i].property_name, property_list[i].output)) { @@ -193,7 +193,7 @@ void free_dxdiag_information(struct dxdiag_information *system_info) if (!system_info) return; - for (i = 0; i < sizeof(filler_list)/sizeof(filler_list[0]); i++) + for (i = 0; i < ARRAY_SIZE(filler_list); i++) filler_list[i].free_function(system_info); HeapFree(GetProcessHeap(), 0, system_info); @@ -230,7 +230,7 @@ struct dxdiag_information *collect_dxdiag_information(BOOL whql_check) if (!ret) goto error; - for (i = 0; i < sizeof(filler_list)/sizeof(filler_list[0]); i++) + for (i = 0; i < ARRAY_SIZE(filler_list); i++) { IDxDiagContainer *child; BOOL success; diff --git a/programs/dxdiag/main.c b/programs/dxdiag/main.c index d7d430b..b073674 100644 --- a/programs/dxdiag/main.c +++ b/programs/dxdiag/main.c @@ -43,8 +43,8 @@ static void usage(void) WCHAR title[MAX_STRING_LEN]; WCHAR usage[MAX_STRING_LEN]; - LoadStringW(hInstance, STRING_DXDIAG_TOOL, title, sizeof(title)/sizeof(WCHAR)); - LoadStringW(hInstance, STRING_USAGE, usage, sizeof(usage)/sizeof(WCHAR)); + LoadStringW(hInstance, STRING_DXDIAG_TOOL, title, ARRAY_SIZE(title)); + LoadStringW(hInstance, STRING_USAGE, usage, ARRAY_SIZE(usage)); MessageBoxW(NULL, usage, title, MB_OK | MB_ICONWARNING); @@ -126,7 +126,7 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info { info->output_type = OUTPUT_TEXT; return process_file_name(cmdline, OUTPUT_TEXT, info->outfile, - sizeof(info->outfile)/sizeof(WCHAR)); + ARRAY_SIZE(info->outfile)); } cmdline++; @@ -137,12 +137,12 @@ static BOOL process_command_line(const WCHAR *cmdline, struct command_line_info case 't': info->output_type = OUTPUT_TEXT; return process_file_name(cmdline + 1, OUTPUT_TEXT, info->outfile, - sizeof(info->outfile)/sizeof(WCHAR)); + ARRAY_SIZE(info->outfile)); case 'X': case 'x': info->output_type = OUTPUT_XML; return process_file_name(cmdline + 1, OUTPUT_XML, info->outfile, - sizeof(info->outfile)/sizeof(WCHAR)); + ARRAY_SIZE(info->outfile)); case 'W': case 'w': if (strncmpiW(cmdline, whql_colonW, 5)) diff --git a/programs/dxdiag/output.c b/programs/dxdiag/output.c index c18c75d..b1e0f18 100644 --- a/programs/dxdiag/output.c +++ b/programs/dxdiag/output.c @@ -179,7 +179,7 @@ static BOOL output_text_information(struct dxdiag_information *dxdiag_info, cons return FALSE; } - for (i = 0; i < sizeof(output_table)/sizeof(output_table[0]); i++) + for (i = 0; i < ARRAY_SIZE(output_table); i++) { const struct text_information_field *fields = output_table[i].fields; unsigned int j; @@ -313,7 +313,7 @@ static BOOL output_xml_information(struct dxdiag_information *dxdiag_info, const if (FAILED(hr)) goto error; - for (i = 0; i < sizeof(output_table)/sizeof(output_table[0]); i++) + for (i = 0; i < ARRAY_SIZE(output_table); i++) { IXMLDOMElement *info_element = xml_create_element(xmldoc, output_table[i].tag_name); const struct xml_information_field *fields = output_table[i].fields; @@ -394,14 +394,14 @@ static struct output_backend const WCHAR *get_output_extension(enum output_type type) { - assert(type > OUTPUT_NONE && type <= sizeof(output_backends)/sizeof(output_backends[0])); + assert(type > OUTPUT_NONE && type <= ARRAY_SIZE(output_backends)); return output_backends[type - 1].filename_ext; } BOOL output_dxdiag_information(struct dxdiag_information *dxdiag_info, const WCHAR *filename, enum output_type type) { - assert(type > OUTPUT_NONE && type <= sizeof(output_backends)/sizeof(output_backends[0])); + assert(type > OUTPUT_NONE && type <= ARRAY_SIZE(output_backends)); return output_backends[type - 1].output_handler(dxdiag_info, filename); }
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
62
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
51
52
53
54
55
56
57
58
59
60
61
62
Results per page:
10
25
50
100
200