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
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
March 2021
----- 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
1163 discussions
Start a n
N
ew thread
Francois Gouget : testbot/LogUtils: Simplify matching the WineRun* errors.
by Alexandre Julliard
05 Mar '21
05 Mar '21
Module: tools Branch: master Commit: 6b31b74e6e479348c1278f197da8b7dd14212a3a URL:
https://source.winehq.org/git/tools.git/?a=commit;h=6b31b74e6e479348c1278f1…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Mar 5 12:17:05 2021 +0100 testbot/LogUtils: Simplify matching the WineRun* errors. They now start with the script name and the ':error:' prefix. Remove the 'Could not create' regexp since it actually corresponds to a VM-side 'Task:' error which is already taken
…
[View More]
into account. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/lib/WineTestBot/LogUtils.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index bdba8da..4e9b733 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -106,11 +106,8 @@ sub GetLogLineCategory($) $Line =~ /^Task: / or # Typical perl errors _IsPerlError($Line) or - # The main testbot.log errors - $Line =~ /^An error occurred while / or - $Line =~ /^Could not create / or - $Line =~ /^Giving up after \d+ run\(s\)$/ or - $Line =~ /^The (?:build|task) timed out$/) + # The testbot.log errors + $Line =~ /:error: /) { return "error"; }
[View Less]
1
0
0
0
Rémi Bernon : widl: Add support for WinRT regscript generation.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 31af1aeb7895bddf59a73886b89759f76881bc9e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=31af1aeb7895bddf59a73886…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 4 15:02:56 2021 +0100 widl: Add support for WinRT regscript generation. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> ---
…
[View More]
tools/widl/register.c | 64 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 13 deletions(-) diff --git a/tools/widl/register.c b/tools/widl/register.c index c03ab3c56b1..76bfc3c715c 100644 --- a/tools/widl/register.c +++ b/tools/widl/register.c @@ -185,6 +185,22 @@ static void write_coclasses( const statement_list_t *stmts, const typelib_t *typ } } +static void write_runtimeclasses_registry( const statement_list_t *stmts ) +{ + const statement_t *stmt; + const type_t *type; + + if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry ) + { + if (stmt->type != STMT_TYPE) continue; + if (type_get_type((type = stmt->u.type)) != TYPE_RUNTIMECLASS) continue; + put_str( indent, "ForceRemove %s\n", format_namespace( type->namespace, "", ".", type->name, NULL ) ); + put_str( indent++, "{\n" ); + put_str( indent, "val 'DllPath' = s '%%MODULE%%'\n" ); + put_str( --indent, "}\n" ); + } +} + static int write_progid( const type_t *class ) { const UUID *uuid = get_attrp( class->attrs, ATTR_UUID ); @@ -236,22 +252,44 @@ void write_regscript( const statement_list_t *stmts ) init_output_buffer(); - put_str( indent, "HKCR\n" ); - put_str( indent++, "{\n" ); + if (winrt_mode) + { + put_str( indent, "HKLM\n" ); + put_str( indent++, "{\n" ); + put_str( indent, "NoRemove Software\n" ); + put_str( indent++, "{\n" ); + put_str( indent, "NoRemove Microsoft\n" ); + put_str( indent++, "{\n" ); + put_str( indent, "NoRemove WindowsRuntime\n" ); + put_str( indent++, "{\n" ); + put_str( indent, "NoRemove ActivatableClassId\n" ); + put_str( indent++, "{\n" ); + write_runtimeclasses_registry( stmts ); + put_str( --indent, "}\n" ); + put_str( --indent, "}\n" ); + put_str( --indent, "}\n" ); + put_str( --indent, "}\n" ); + put_str( --indent, "}\n" ); + } + else + { + put_str( indent, "HKCR\n" ); + put_str( indent++, "{\n" ); - put_str( indent, "NoRemove Interface\n" ); - put_str( indent++, "{\n" ); - ps_factory = find_ps_factory( stmts ); - if (ps_factory) write_interfaces( stmts, ps_factory ); - put_str( --indent, "}\n" ); + put_str( indent, "NoRemove Interface\n" ); + put_str( indent++, "{\n" ); + ps_factory = find_ps_factory( stmts ); + if (ps_factory) write_interfaces( stmts, ps_factory ); + put_str( --indent, "}\n" ); - put_str( indent, "NoRemove CLSID\n" ); - put_str( indent++, "{\n" ); - write_coclasses( stmts, NULL ); - put_str( --indent, "}\n" ); + put_str( indent, "NoRemove CLSID\n" ); + put_str( indent++, "{\n" ); + write_coclasses( stmts, NULL ); + put_str( --indent, "}\n" ); - write_progids( stmts ); - put_str( --indent, "}\n" ); + write_progids( stmts ); + put_str( --indent, "}\n" ); + } if (strendswith( regscript_name, ".res" )) /* create a binary resource file */ {
[View Less]
1
0
0
0
Rémi Bernon : user32: Only get input codepage when needed.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: cd1b87cd6696451ca98393ac3eb4a214d0e8e9b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cd1b87cd6696451ca98393ac…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Mar 4 09:42:27 2021 +0100 user32: Only get input codepage when needed. Calling get_input_codepage involves doing quite a lot of things, and doing it for every message type, when it's not needed, is inefficient. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.
…
[View More]
com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/message.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/user32/message.c b/dlls/user32/message.c index f7ce262f90d..def59998a52 100644 --- a/dlls/user32/message.c +++ b/dlls/user32/message.c @@ -602,7 +602,7 @@ BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping { char ch[2]; WCHAR wch[2]; - DWORD cp = get_input_codepage(); + DWORD cp; wch[0] = wch[1] = 0; switch(message) @@ -616,6 +616,7 @@ BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping { struct wm_char_mapping_data *data = get_user_thread_info()->wmchar_data; BYTE low = LOBYTE(*wparam); + cp = get_input_codepage(); if (HIBYTE(*wparam)) { @@ -662,12 +663,14 @@ BOOL map_wparam_AtoW( UINT message, WPARAM *wparam, enum wm_char_mapping mapping case WM_SYSCHAR: case WM_SYSDEADCHAR: case WM_MENUCHAR: + cp = get_input_codepage(); ch[0] = LOBYTE(*wparam); ch[1] = HIBYTE(*wparam); MultiByteToWideChar( cp, 0, ch, 2, wch, 2 ); *wparam = MAKEWPARAM(wch[0], wch[1]); break; case WM_IME_CHAR: + cp = get_input_codepage(); ch[0] = HIBYTE(*wparam); ch[1] = LOBYTE(*wparam); if (ch[0]) MultiByteToWideChar( cp, 0, ch, 2, wch, 2 ); @@ -689,13 +692,14 @@ static void map_wparam_WtoA( MSG *msg, BOOL remove ) BYTE ch[4]; WCHAR wch[2]; DWORD len; - DWORD cp = get_input_codepage(); + DWORD cp; switch(msg->message) { case WM_CHAR: if (!HIWORD(msg->wParam)) { + cp = get_input_codepage(); wch[0] = LOWORD(msg->wParam); ch[0] = ch[1] = 0; len = WideCharToMultiByte( cp, 0, wch, 1, (LPSTR)ch, 2, NULL, NULL ); @@ -723,6 +727,7 @@ static void map_wparam_WtoA( MSG *msg, BOOL remove ) case WM_SYSCHAR: case WM_SYSDEADCHAR: case WM_MENUCHAR: + cp = get_input_codepage(); wch[0] = LOWORD(msg->wParam); wch[1] = HIWORD(msg->wParam); ch[0] = ch[1] = 0; @@ -730,6 +735,7 @@ static void map_wparam_WtoA( MSG *msg, BOOL remove ) msg->wParam = MAKEWPARAM( ch[0] | (ch[1] << 8), 0 ); break; case WM_IME_CHAR: + cp = get_input_codepage(); wch[0] = LOWORD(msg->wParam); ch[0] = ch[1] = 0; len = WideCharToMultiByte( cp, 0, wch, 1, (LPSTR)ch, 2, NULL, NULL );
[View Less]
1
0
0
0
Zhiyi Zhang : comctl32/trackbar: Use correct state id for the focused thumb.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 52cdd22b529e3e452f9396dfaea3001ec4827032 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=52cdd22b529e3e452f9396df…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Mar 4 16:47:53 2021 +0800 comctl32/trackbar: Use correct state id for the focused thumb. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/trackbar.c | 2 ++ 1 file changed,
…
[View More]
2 insertions(+) diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index 353e359111f..66522fd8582 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -717,6 +717,8 @@ TRACKBAR_DrawThumb (TRACKBAR_INFO *infoPtr, HDC hdc) stateId = TUS_PRESSED; else if (infoPtr->flags & TB_THUMB_HOT) stateId = TUS_HOT; + else if (infoPtr->flags & TB_IS_FOCUSED) + stateId = TUS_FOCUSED; else stateId = TUS_NORMAL;
[View Less]
1
0
0
0
Zhiyi Zhang : comctl32/toolbar: Use correct state id for checked items.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: bde397d220861bf6d844121cc55b5b796d42e5c2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bde397d220861bf6d844121c…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Mar 4 16:47:44 2021 +0800 comctl32/toolbar: Use correct state id for checked items. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/toolbar.c | 4 ++-- 1 file changed, 2
…
[View More]
insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 248541aab2e..667a2f4c277 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -1078,7 +1078,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc, else if (tbcd.nmcd.uItemState & CDIS_SELECTED) stateId = TS_PRESSED; else if (tbcd.nmcd.uItemState & CDIS_CHECKED) - stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_HOT; + stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_CHECKED; else if ((tbcd.nmcd.uItemState & CDIS_HOT) || (drawSepDropDownArrow && btnPtr->bDropDownPressed)) stateId = TS_HOT; @@ -1099,7 +1099,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc, else if (btnPtr->bDropDownPressed || (tbcd.nmcd.uItemState & CDIS_SELECTED)) stateId = TS_PRESSED; else if (tbcd.nmcd.uItemState & CDIS_CHECKED) - stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_HOT; + stateId = (tbcd.nmcd.uItemState & CDIS_HOT) ? TS_HOTCHECKED : TS_CHECKED; else if (tbcd.nmcd.uItemState & CDIS_HOT) stateId = TS_HOT;
[View Less]
1
0
0
0
Zhiyi Zhang : comctl32/listview: Only draw themed frame when WS_EX_CLIENTEDGE is present.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: c703c96a7816852f39489d10bc0f7cc223791efa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c703c96a7816852f39489d10…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Mar 4 16:47:37 2021 +0800 comctl32/listview: Only draw themed frame when WS_EX_CLIENTEDGE is present. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/listview.c | 10 +++++-
…
[View More]
---- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index a62ac4398cc..150771b8937 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -10612,11 +10612,11 @@ static LRESULT LISTVIEW_Notify(LISTVIEW_INFO *infoPtr, NMHDR *lpnmhdr) * [I] region : update region * * RETURN: - * TRUE - frame was painted - * FALSE - call default window proc + * 0 - frame was painted */ -static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region) +static LRESULT LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region) { + LONG exstyle = GetWindowLongW (infoPtr->hwndSelf, GWL_EXSTYLE); HTHEME theme = GetWindowTheme (infoPtr->hwndSelf); HDC dc; RECT r; @@ -10624,7 +10624,7 @@ static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region) int cxEdge = GetSystemMetrics (SM_CXEDGE), cyEdge = GetSystemMetrics (SM_CYEDGE); - if (!theme) + if (!theme || !(exstyle & WS_EX_CLIENTEDGE)) return DefWindowProcW (infoPtr->hwndSelf, WM_NCPAINT, (WPARAM)region, 0); GetWindowRect(infoPtr->hwndSelf, &r); @@ -10646,7 +10646,7 @@ static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region) DefWindowProcW (infoPtr->hwndSelf, WM_NCPAINT, (WPARAM)cliprgn, 0); DeleteObject(cliprgn); - return FALSE; + return 0; } /***
[View Less]
1
0
0
0
Zhiyi Zhang : comctl32/hotkey: Implement themed frame painting.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 5ca79e66ad87966094b2ee4d70bad112b2702caa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5ca79e66ad87966094b2ee4d…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Mar 4 16:47:27 2021 +0800 comctl32/hotkey: Implement themed frame painting. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/hotkey.c | 48 ++++++++++++++++++++++++++++++++++
…
[View More]
++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c index 58717a2a493..7421ff6ef65 100644 --- a/dlls/comctl32/hotkey.c +++ b/dlls/comctl32/hotkey.c @@ -37,6 +37,7 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" +#include "uxtheme.h" #include "wine/debug.h" #include "wine/heap.h" @@ -423,6 +424,50 @@ HOTKEY_NCCreate (HWND hwnd, const CREATESTRUCTW *lpcs) return DefWindowProcW (infoPtr->hwndSelf, WM_NCCREATE, 0, (LPARAM)lpcs); } +static LRESULT +HOTKEY_NCPaint (HWND hwnd, HRGN region) +{ + INT cxEdge, cyEdge; + HRGN clipRgn; + HTHEME theme; + LONG exStyle; + RECT r; + HDC dc; + + theme = OpenThemeData(NULL, WC_EDITW); + if (!theme) + return DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)region, 0); + + exStyle = GetWindowLongW(hwnd, GWL_EXSTYLE); + if (!(exStyle & WS_EX_CLIENTEDGE)) + { + CloseThemeData(theme); + return DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)region, 0); + } + + cxEdge = GetSystemMetrics(SM_CXEDGE); + cyEdge = GetSystemMetrics(SM_CYEDGE); + GetWindowRect(hwnd, &r); + + /* New clipping region passed to default proc to exclude border */ + clipRgn = CreateRectRgn(r.left + cxEdge, r.top + cyEdge, r.right - cxEdge, r.bottom - cyEdge); + if (region != (HRGN)1) + CombineRgn(clipRgn, clipRgn, region, RGN_AND); + OffsetRect(&r, -r.left, -r.top); + + dc = GetDCEx(hwnd, region, DCX_WINDOW | DCX_INTERSECTRGN); + if (IsThemeBackgroundPartiallyTransparent(theme, 0, 0)) + DrawThemeParentBackground(hwnd, dc, &r); + DrawThemeBackground(theme, dc, 0, 0, &r, 0); + ReleaseDC(hwnd, dc); + CloseThemeData(theme); + + /* Call default proc to get the scrollbars etc. also painted */ + DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)clipRgn, 0); + DeleteObject(clipRgn); + return 0; +} + static LRESULT HOTKEY_SetFocus (HOTKEY_INFO *infoPtr) { @@ -516,6 +561,9 @@ HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_NCCREATE: return HOTKEY_NCCreate (hwnd, (LPCREATESTRUCTW)lParam); + case WM_NCPAINT: + return HOTKEY_NCPaint (hwnd, (HRGN)wParam); + case WM_PRINTCLIENT: case WM_PAINT: HOTKEY_Paint(infoPtr, (HDC)wParam);
[View Less]
1
0
0
0
Zhiyi Zhang : comctl32/datetime: Implement themed painting.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: 52992a99d602fd929aaeee24ffb977aaa50c4423 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=52992a99d602fd929aaeee24…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Thu Mar 4 16:45:57 2021 +0800 comctl32/datetime: Implement themed painting. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/datetime.c | 137 +++++++++++++++++++++++++++++++++++
…
[View More]
+++++++++++- 1 file changed, 136 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 71bb3d238b0..f44b52c3b65 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -43,6 +43,8 @@ #include "winnls.h" #include "commctrl.h" #include "comctl32.h" +#include "uxtheme.h" +#include "vsstyle.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(datetime); @@ -62,6 +64,7 @@ typedef struct RECT checkbox; /* checkbox allowing the control to be enabled/disabled */ RECT calbutton; /* button that toggles the dropdown of the monthcal control */ BOOL bCalDepressed; /* TRUE = cal button is depressed */ + BOOL bCalHot; /* TRUE if calendar button is hovered */ BOOL bDropdownEnabled; int select; WCHAR charsEntered[4]; @@ -128,6 +131,7 @@ static BOOL DATETIME_SendSimpleNotify (const DATETIME_INFO *infoPtr, UINT code); static BOOL DATETIME_SendDateTimeChangeNotify (const DATETIME_INFO *infoPtr); static const WCHAR allowedformatchars[] = L"dhHmMstyX"; static const int maxrepetition [] = {4,2,2,2,4,2,2,4,-1}; +static const WCHAR *themeClass = WC_SCROLLBARW; /* valid date limits */ static const SYSTEMTIME max_allowed_date = { .wYear = 9999, .wMonth = 12, .wDayOfWeek = 0, .wDay = 31 }; @@ -708,6 +712,9 @@ static int DATETIME_GetFieldWidth (const DATETIME_INFO *infoPtr, HDC hdc, int co static void DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc) { + HTHEME theme; + int state; + TRACE("\n"); if (infoPtr->dateValid) { @@ -771,7 +778,27 @@ DATETIME_Refresh (DATETIME_INFO *infoPtr, HDC hdc) SelectObject (hdc, oldFont); } - if (!(infoPtr->dwStyle & DTS_UPDOWN)) { + if (infoPtr->dwStyle & DTS_UPDOWN) + return; + + theme = GetWindowTheme(infoPtr->hwndSelf); + if (theme) + { + if (infoPtr->dwStyle & WS_DISABLED) + state = ABS_DOWNDISABLED; + else if (infoPtr->bCalDepressed) + state = ABS_DOWNPRESSED; + else if (infoPtr->bCalHot) + state = ABS_DOWNHOT; + else + state = ABS_DOWNNORMAL; + + if (IsThemeBackgroundPartiallyTransparent(theme, SBP_ARROWBTN, state)) + DrawThemeParentBackground(infoPtr->hwndSelf, hdc, &infoPtr->calbutton); + DrawThemeBackground(theme, hdc, SBP_ARROWBTN, state, &infoPtr->calbutton, NULL); + } + else + { DrawFrameControl(hdc, &infoPtr->calbutton, DFC_SCROLL, DFCS_SCROLLDOWN | (infoPtr->bCalDepressed ? DFCS_PUSHED : 0) | (infoPtr->dwStyle & WS_DISABLED ? DFCS_INACTIVE : 0) ); @@ -1280,6 +1307,85 @@ DATETIME_NCCreate (HWND hwnd, const CREATESTRUCTW *lpcs) return 1; } +static LRESULT DATETIME_NCPaint (HWND hwnd, HRGN region) +{ + INT cxEdge, cyEdge; + HRGN clipRgn; + HTHEME theme; + LONG exStyle; + RECT r; + HDC dc; + + theme = OpenThemeData(NULL, WC_EDITW); + if (!theme) + return DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)region, 0); + + exStyle = GetWindowLongW(hwnd, GWL_EXSTYLE); + if (!(exStyle & WS_EX_CLIENTEDGE)) + { + CloseThemeData(theme); + return DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)region, 0); + } + + cxEdge = GetSystemMetrics(SM_CXEDGE); + cyEdge = GetSystemMetrics(SM_CYEDGE); + GetWindowRect(hwnd, &r); + + /* New clipping region passed to default proc to exclude border */ + clipRgn = CreateRectRgn(r.left + cxEdge, r.top + cyEdge, r.right - cxEdge, r.bottom - cyEdge); + if (region != (HRGN)1) + CombineRgn(clipRgn, clipRgn, region, RGN_AND); + OffsetRect(&r, -r.left, -r.top); + + dc = GetDCEx(hwnd, region, DCX_WINDOW | DCX_INTERSECTRGN); + if (IsThemeBackgroundPartiallyTransparent(theme, 0, 0)) + DrawThemeParentBackground(hwnd, dc, &r); + DrawThemeBackground(theme, dc, 0, 0, &r, 0); + ReleaseDC(hwnd, dc); + CloseThemeData(theme); + + /* Call default proc to get the scrollbars etc. also painted */ + DefWindowProcW(hwnd, WM_NCPAINT, (WPARAM)clipRgn, 0); + DeleteObject(clipRgn); + return 0; +} + +static LRESULT DATETIME_MouseMove (DATETIME_INFO *infoPtr, LONG x, LONG y) +{ + TRACKMOUSEEVENT event; + POINT point; + BOOL hot; + + point.x = x; + point.y = y; + hot = PtInRect(&infoPtr->calbutton, point); + if (hot != infoPtr->bCalHot) + { + infoPtr->bCalHot = hot; + RedrawWindow(infoPtr->hwndSelf, &infoPtr->calbutton, 0, RDW_INVALIDATE | RDW_UPDATENOW); + } + + if (!hot) + return 0; + + event.cbSize = sizeof(TRACKMOUSEEVENT); + event.dwFlags = TME_QUERY; + if (!TrackMouseEvent(&event) || event.hwndTrack != infoPtr->hwndSelf || !(event.dwFlags & TME_LEAVE)) + { + event.hwndTrack = infoPtr->hwndSelf; + event.dwFlags = TME_LEAVE; + TrackMouseEvent(&event); + } + + return 0; +} + +static LRESULT DATETIME_MouseLeave (DATETIME_INFO *infoPtr) +{ + infoPtr->bCalHot = FALSE; + RedrawWindow(infoPtr->hwndSelf, &infoPtr->calbutton, 0, RDW_INVALIDATE | RDW_UPDATENOW); + return 0; +} static LRESULT DATETIME_SetFocus (DATETIME_INFO *infoPtr, HWND lostFocus) @@ -1430,6 +1536,16 @@ DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRU return 0; } +static LRESULT DATETIME_ThemeChanged (DATETIME_INFO *infoPtr) +{ + HTHEME theme; + + theme = GetWindowTheme(infoPtr->hwndSelf); + CloseThemeData(theme); + OpenThemeData(infoPtr->hwndSelf, themeClass); + return 0; +} + static BOOL DATETIME_GetIdealSize(DATETIME_INFO *infoPtr, SIZE *size) { SIZE field_size; @@ -1508,6 +1624,7 @@ DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->hwndNotify = lpcs->hwndParent; infoPtr->select = -1; /* initially, nothing is selected */ infoPtr->bDropdownEnabled = TRUE; + infoPtr->bCalHot = FALSE; DATETIME_StyleChanged(infoPtr, GWL_STYLE, &ss); DATETIME_SetFormatW (infoPtr, 0); @@ -1522,6 +1639,7 @@ DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs) infoPtr->hFont = GetStockObject(DEFAULT_GUI_FONT); SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr); + OpenThemeData(hwnd, themeClass); return 0; } @@ -1531,6 +1649,11 @@ DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs) static LRESULT DATETIME_Destroy (DATETIME_INFO *infoPtr) { + HTHEME theme; + + theme = GetWindowTheme(infoPtr->hwndSelf); + CloseThemeData(theme); + if (infoPtr->hwndCheckbut) DestroyWindow(infoPtr->hwndCheckbut); if (infoPtr->hUpdown) @@ -1656,6 +1779,15 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_NCCREATE: return DATETIME_NCCreate (hwnd, (LPCREATESTRUCTW)lParam); + case WM_NCPAINT: + return DATETIME_NCPaint(hwnd, (HRGN)wParam); + + case WM_MOUSEMOVE: + return DATETIME_MouseMove(infoPtr, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam)); + + case WM_MOUSELEAVE: + return DATETIME_MouseLeave(infoPtr); + case WM_SETFOCUS: return DATETIME_SetFocus (infoPtr, (HWND)wParam); @@ -1686,6 +1818,9 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_STYLECHANGED: return DATETIME_StyleChanged(infoPtr, wParam, (LPSTYLESTRUCT)lParam); + case WM_THEMECHANGED: + return DATETIME_ThemeChanged(infoPtr); + case WM_SETFONT: return DATETIME_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
[View Less]
1
0
0
0
Paul Gofman : winex11.drv: Prioritize smaller depth formats when zero depth is requested in X11DRV_wglChoosePixelFormatARB().
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: e392e0ac2846edc25610723c19d6a796372017e1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e392e0ac2846edc25610723c…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Feb 24 17:04:53 2021 +0300 winex11.drv: Prioritize smaller depth formats when zero depth is requested in X11DRV_wglChoosePixelFormatARB(). Fixes Ancient Cities' black screen on Nvidia. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by:
…
[View More]
Alexandre Julliard <julliard(a)winehq.org> --- dlls/opengl32/tests/opengl.c | 57 +++++++++++++++++++++ dlls/winex11.drv/opengl.c | 116 +++++++++++++++++++++++++++++++------------ 2 files changed, 142 insertions(+), 31 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index e93636ed75e..314fa11225d 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -1764,6 +1764,62 @@ static void test_swap_control(HDC oldhdc) wglMakeCurrent(oldhdc, oldctx); } +static void test_wglChoosePixelFormatARB(HDC hdc) +{ + static int attrib_list[] = + { + WGL_DRAW_TO_WINDOW_ARB, 1, + WGL_SUPPORT_OPENGL_ARB, 1, + 0 + }; + + PIXELFORMATDESCRIPTOR fmt, last_fmt; + BYTE depth, last_depth; + UINT format_count; + int formats[1024]; + unsigned int i; + int res; + + if (!pwglChoosePixelFormatARB) + { + skip("wglChoosePixelFormatARB is not available\n"); + return; + } + + format_count = 0; + res = pwglChoosePixelFormatARB(hdc, attrib_list, NULL, ARRAY_SIZE(formats), formats, &format_count); + ok(res, "Got unexpected result %d.\n", res); + + memset(&last_fmt, 0, sizeof(last_fmt)); + last_depth = 0; + + for (i = 0; i < format_count; ++i) + { + memset(&fmt, 0, sizeof(fmt)); + if (!DescribePixelFormat(hdc, formats[i], sizeof(fmt), &fmt) + || (fmt.dwFlags & PFD_GENERIC_FORMAT)) + { + memset(&fmt, 0, sizeof(fmt)); + continue; + } + + depth = fmt.cDepthBits; + fmt.cDepthBits = 0; + fmt.cStencilBits = 0; + + if (memcmp(&fmt, &last_fmt, sizeof(fmt))) + { + last_fmt = fmt; + last_depth = depth; + } + else + { + ok(last_depth <= depth, "Got unexpected depth %u, last_depth %u, i %u, format %u.\n", + depth, last_depth, i, formats[i]); + } + } +} + START_TEST(opengl) { HWND hwnd; @@ -1858,6 +1914,7 @@ START_TEST(opengl) } test_choosepixelformat(); + test_wglChoosePixelFormatARB(hdc); test_debug_message_callback(); test_setpixelformat(hdc); test_destroy(hdc); diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 373182dec44..c44c587bf14 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -40,6 +40,7 @@ #include "x11drv.h" #include "xcomposite.h" #include "winternl.h" +#include "wine/heap.h" #include "wine/debug.h" #ifdef SONAME_LIBGL @@ -2486,6 +2487,37 @@ static BOOL X11DRV_wglSetPbufferAttribARB( struct wgl_pbuffer *object, const int return ret; } +struct choose_pixel_format_arb_format +{ + int format; + int original_index; + PIXELFORMATDESCRIPTOR pfd; + int depth, stencil; +}; + +static int compare_formats(const void *a, const void *b) +{ + /* Order formats so that onscreen formats go first. Then, if no depth bits requested, + * prioritize formats with smaller depth within the original sort order with respect to + * other attributes. */ + const struct choose_pixel_format_arb_format *fmt_a = a, *fmt_b = b; + BOOL offscreen_a, offscreen_b; + + offscreen_a = fmt_a->format > nb_onscreen_formats; + offscreen_b = fmt_b->format > nb_onscreen_formats; + + if (offscreen_a != offscreen_b) + return offscreen_a - offscreen_b; + if (memcmp(&fmt_a->pfd, &fmt_b->pfd, sizeof(fmt_a->pfd))) + return fmt_a->original_index - fmt_b->original_index; + if (fmt_a->depth != fmt_b->depth) + return fmt_a->depth - fmt_b->depth; + if (fmt_a->stencil != fmt_b->stencil) + return fmt_a->stencil - fmt_b->stencil; + + return fmt_a->original_index - fmt_b->original_index; +} + /** * X11DRV_wglChoosePixelFormatARB * @@ -2494,17 +2526,15 @@ static BOOL X11DRV_wglSetPbufferAttribARB( struct wgl_pbuffer *object, const int static BOOL X11DRV_wglChoosePixelFormatARB( HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats ) { + struct choose_pixel_format_arb_format *formats; + int it, i, format_count; + BYTE depth_bits = 0; + GLXFBConfig* cfgs; + DWORD dwFlags = 0; int attribs[256]; int nAttribs = 0; - GLXFBConfig* cfgs; int nCfgs = 0; - int it; int fmt_id; - int start, end; - UINT pfmt_it = 0; - int run; - int i; - DWORD dwFlags = 0; TRACE("(%p, %p, %p, %d, %p, %p): hackish\n", hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats); if (NULL != pfAttribFList) { @@ -2548,6 +2578,10 @@ static BOOL X11DRV_wglChoosePixelFormatARB( HDC hdc, const int *piAttribIList, c if(piAttribIList[i+1]) dwFlags |= PFD_SUPPORT_GDI; break; + case WGL_DEPTH_BITS_ARB: + depth_bits = piAttribIList[i+1]; + break; + } } @@ -2558,37 +2592,57 @@ static BOOL X11DRV_wglChoosePixelFormatARB( HDC hdc, const int *piAttribIList, c return GL_FALSE; } - /* Loop through all matching formats and check if they are suitable. - * Note that this function should at max return nMaxFormats different formats */ - for(run=0; run < 2; run++) + if (!(formats = heap_alloc(nCfgs * sizeof(*formats)))) + { + ERR("No memory.\n"); + XFree(cfgs); + return GL_FALSE; + } + + format_count = 0; + for (it = 0; it < nCfgs; ++it) { - for (it = 0; it < nCfgs && pfmt_it < nMaxFormats; ++it) + struct choose_pixel_format_arb_format *format; + + if (pglXGetFBConfigAttrib(gdi_display, cfgs[it], GLX_FBCONFIG_ID, &fmt_id)) { - if (pglXGetFBConfigAttrib(gdi_display, cfgs[it], GLX_FBCONFIG_ID, &fmt_id)) - { - ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n"); - continue; - } + ERR("Failed to retrieve FBCONFIG_ID from GLXFBConfig, expect problems.\n"); + continue; + } - /* During the first run we only want onscreen formats and during the second only offscreen */ - start = run == 1 ? nb_onscreen_formats : 0; - end = run == 1 ? nb_pixel_formats : nb_onscreen_formats; + for (i = 0; i < nb_pixel_formats; ++i) + if (pixel_formats[i].fmt_id == fmt_id) + break; - for (i = start; i < end; i++) - { - if (pixel_formats[i].fmt_id == fmt_id && (pixel_formats[i].dwFlags & dwFlags) == dwFlags) - { - piFormats[pfmt_it++] = i + 1; - TRACE("at %d/%d found FBCONFIG_ID 0x%x (%d)\n", - it + 1, nCfgs, fmt_id, i + 1); - break; - } - } + if (i == nb_pixel_formats) + continue; + + format = &formats[format_count]; + format->format = i + 1; + format->original_index = it; + + memset(&format->pfd, 0, sizeof(format->pfd)); + if (!describe_pixel_format(format->format, &format->pfd, TRUE)) + ERR("describe_pixel_format failed, format %d.\n", format->format); + + format->depth = format->pfd.cDepthBits; + format->stencil = format->pfd.cStencilBits; + if (!depth_bits && !(format->pfd.dwFlags & PFD_GENERIC_FORMAT)) + { + format->pfd.cDepthBits = 0; + format->pfd.cStencilBits = 0; } + + ++format_count; } - *nNumFormats = pfmt_it; - /** free list */ + qsort(formats, format_count, sizeof(*formats), compare_formats); + + *nNumFormats = min(nMaxFormats, format_count); + for (i = 0; i < *nNumFormats; ++i) + piFormats[i] = formats[i].format; + + heap_free(formats); XFree(cfgs); return GL_TRUE; }
[View Less]
1
0
0
0
Paul Gofman : winex11.drv: Factor out describe_pixel_format() function.
by Alexandre Julliard
04 Mar '21
04 Mar '21
Module: wine Branch: master Commit: bfa3c9561161193424971cfbbeb4e915e96fffc4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bfa3c9561161193424971cfb…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Wed Feb 24 17:04:52 2021 +0300 winex11.drv: Factor out describe_pixel_format() function. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winex11.drv/opengl.c | 37 +++++++++++++++++++++
…
[View More]
+++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 4a3ab31273a..373182dec44 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1533,8 +1533,7 @@ void destroy_gl_drawable( HWND hwnd ) * * Get the pixel-format descriptor associated to the given id */ -static int WINAPI glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat, - UINT nBytes, PIXELFORMATDESCRIPTOR *ppfd) +static int WINAPI describe_pixel_format( int iPixelFormat, PIXELFORMATDESCRIPTOR *ppfd, BOOL allow_offscreen ) { /*XVisualInfo *vis;*/ int value; @@ -1543,23 +1542,13 @@ static int WINAPI glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat, if (!has_opengl()) return 0; - TRACE("(%p,%d,%d,%p)\n", hdc, iPixelFormat, nBytes, ppfd); - - if (!ppfd) return nb_onscreen_formats; - /* Look for the iPixelFormat in our list of supported formats. If it is supported we get the index in the FBConfig table and the number of supported formats back */ - fmt = get_pixel_format(gdi_display, iPixelFormat, FALSE /* Offscreen */); + fmt = get_pixel_format(gdi_display, iPixelFormat, allow_offscreen); if (!fmt) { WARN("unexpected format %d\n", iPixelFormat); return 0; } - if (nBytes < sizeof(PIXELFORMATDESCRIPTOR)) { - ERR("Wrong structure size !\n"); - /* Should set error */ - return 0; - } - memset(ppfd, 0, sizeof(PIXELFORMATDESCRIPTOR)); ppfd->nSize = sizeof(PIXELFORMATDESCRIPTOR); ppfd->nVersion = 1; @@ -1662,6 +1651,28 @@ static int WINAPI glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat, return nb_onscreen_formats; } +/** + * glxdrv_DescribePixelFormat + * + * Get the pixel-format descriptor associated to the given id + */ +static int WINAPI glxdrv_wglDescribePixelFormat( HDC hdc, int iPixelFormat, + UINT nBytes, PIXELFORMATDESCRIPTOR *ppfd) +{ + TRACE("(%p,%d,%d,%p)\n", hdc, iPixelFormat, nBytes, ppfd); + + if (!ppfd) return nb_onscreen_formats; + + if (nBytes < sizeof(PIXELFORMATDESCRIPTOR)) + { + ERR("Wrong structure size !\n"); + /* Should set error */ + return 0; + } + + return describe_pixel_format(iPixelFormat, ppfd, FALSE); +} + /*********************************************************************** * glxdrv_wglGetPixelFormat */
[View Less]
1
0
0
0
← Newer
1
...
94
95
96
97
98
99
100
...
117
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Results per page:
10
25
50
100
200