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
April 2010
----- 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
898 discussions
Start a n
N
ew thread
Piotr Caban : msvcrt: Added strncpy_s implementation.
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: 23d0369d9d519f5b4fa5ba82bc01a542ceaf1a2a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23d0369d9d519f5b4fa5ba82b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Apr 20 21:39:11 2010 +0200 msvcrt: Added strncpy_s implementation. --- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/heap.c | 38 ++++++++++++++++++++++++++++++++++++++ dlls/msvcrt/msvcrt.spec | 2 +- 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 0bbbfda..945bf4b 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1388,7 +1388,7 @@ @ stub strncat_s @ cdecl strncmp(str str long) msvcrt.strncmp @ cdecl strncpy(ptr str long) msvcrt.strncpy -@ stub strncpy_s +@ cdecl strncpy_s(ptr long str long) msvcrt.strncpy_s @ cdecl strnlen(str long) msvcrt.strnlen @ cdecl strpbrk(str str) msvcrt.strpbrk @ cdecl strrchr(str long) msvcrt.strrchr diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 45cd885..db16a0b 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1372,7 +1372,7 @@ @ stub strncat_s @ cdecl strncmp(str str long) msvcrt.strncmp @ cdecl strncpy(ptr str long) msvcrt.strncpy -@ stub strncpy_s +@ cdecl strncpy_s(ptr long str long) msvcrt.strncpy_s @ cdecl strnlen(str long) msvcrt.strnlen @ cdecl strpbrk(str str) msvcrt.strpbrk @ cdecl strrchr(str long) msvcrt.strrchr diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 7fd5d3b..c57a46c 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -550,3 +550,41 @@ int CDECL memmove_s(void *dest, MSVCRT_size_t numberOfElements, const void *src, memmove(dest, src, count); return 0; } + +/********************************************************************* + * strncpy_s (MSVCRT.@) + */ +int CDECL strncpy_s(char *dest, MSVCRT_size_t numberOfElements, + const char *src, MSVCRT_size_t count) +{ + MSVCRT_size_t i, end; + + TRACE("(%s %lu %s %lu)\n", dest, numberOfElements, src, count); + + if(!count) + return 0; + + if(!dest || !src || !numberOfElements) { + MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0); + *MSVCRT__errno() = MSVCRT_EINVAL; + return MSVCRT_EINVAL; + } + + if(count!=_TRUNCATE && count<numberOfElements) + end = count; + else + end = numberOfElements-1; + + for(i=0; i<end && src[i]; i++) + dest[i] = src[i]; + + if(!src[i] || end==count || count==_TRUNCATE) { + dest[i] = '\0'; + return 0; + } + + MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0); + dest[0] = '\0'; + *MSVCRT__errno() = MSVCRT_EINVAL; + return MSVCRT_EINVAL; +} diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 98db83f..f21588f 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1328,7 +1328,7 @@ # stub strncat_s @ cdecl strncmp(str str long) ntdll.strncmp @ cdecl strncpy(ptr str long) ntdll.strncpy -# stub strncpy_s +@ cdecl strncpy_s(ptr long str long) @ cdecl strnlen(str long) MSVCRT_strnlen @ cdecl strpbrk(str str) ntdll.strpbrk @ cdecl strrchr(str long) ntdll.strrchr
1
0
0
0
Piotr Caban : msvcrt: Added swprintf_s implementation.
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: c483bebe2b9dcbe7980dc09ec2217f33a15defb2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c483bebe2b9dcbe7980dc09ec…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Apr 20 21:39:01 2010 +0200 msvcrt: Added swprintf_s implementation. --- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/wcs.c | 17 +++++++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 917ac4f..0bbbfda 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1400,7 +1400,7 @@ @ cdecl strtol(str ptr long) msvcrt.strtol @ cdecl strtoul(str ptr long) msvcrt.strtoul @ cdecl strxfrm(ptr str long) msvcrt.strxfrm -@ stub swprintf_s +@ varargs swprintf_s(ptr long wstr) msvcrt.swprintf_s @ varargs swscanf(wstr wstr) msvcrt.swscanf @ stub swscanf_s @ cdecl system(str) msvcrt.system diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 5761301..45cd885 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1384,7 +1384,7 @@ @ cdecl strtol(str ptr long) msvcrt.strtol @ cdecl strtoul(str ptr long) msvcrt.strtoul @ cdecl strxfrm(ptr str long) msvcrt.strxfrm -@ stub swprintf_s +@ varargs swprintf_s(ptr long wstr) msvcrt.swprintf_s @ varargs swscanf(wstr wstr) msvcrt.swscanf @ stub swscanf_s @ cdecl system(str) msvcrt.system diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 2700895..98db83f 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1341,7 +1341,7 @@ @ cdecl strtoul(str ptr long) MSVCRT_strtoul @ cdecl strxfrm(ptr str long) MSVCRT_strxfrm @ varargs swprintf(ptr wstr) MSVCRT_swprintf -# stub swprintf_s +@ varargs swprintf_s(ptr long wstr) MSVCRT_swprintf_s @ varargs swscanf(wstr wstr) MSVCRT_swscanf # stub swscanf_s @ cdecl system(str) MSVCRT_system diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index df0ac03..21d0d28 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -1065,6 +1065,23 @@ int CDECL MSVCRT_swprintf( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, .. } /********************************************************************* + * swprintf_s (MSVCRT.@) + */ +int CDECL MSVCRT_swprintf_s(MSVCRT_wchar_t *str, MSVCRT_size_t numberOfElements, + const MSVCRT_wchar_t *format, ... ) +{ + __ms_va_list ap; + int r; + + __ms_va_start(ap, format); + r = MSVCRT_vsnwprintf_s(str, numberOfElements*sizeof(MSVCRT_wchar_t), + INT_MAX, format, ap); + __ms_va_end(ap); + + return r; +} + +/********************************************************************* * vswprintf (MSVCRT.@) */ int CDECL MSVCRT_vswprintf( MSVCRT_wchar_t* str, const MSVCRT_wchar_t* format, __ms_va_list args )
1
0
0
0
Piotr Caban : msvcrt: Added _wfopen_s implementation.
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: 2ff04b9d571c30b514c450c7cafcef647e6a942a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2ff04b9d571c30b514c450c7c…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Apr 20 21:38:33 2010 +0200 msvcrt: Added _wfopen_s implementation. --- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/file.c | 19 +++++++++++++++++++ dlls/msvcrt/msvcrt.spec | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 44507ec..917ac4f 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1146,7 +1146,7 @@ @ stub _wfindnext64 @ stub _wfindnext64i32 @ cdecl _wfopen(wstr wstr) msvcrt._wfopen -@ stub _wfopen_s +@ cdecl _wfopen_s(ptr wstr wstr) msvcrt._wfopen_s @ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen @ stub _wfreopen_s @ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 1e6731f..5761301 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1133,7 +1133,7 @@ @ stub _wfindnext64 @ stub _wfindnext64i32 @ cdecl _wfopen(wstr wstr) msvcrt._wfopen -@ stub _wfopen_s +@ cdecl _wfopen_s(ptr wstr wstr) msvcrt._wfopen_s @ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen @ stub _wfreopen_s @ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 6641999..f906401 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -2707,6 +2707,25 @@ MSVCRT_FILE * CDECL MSVCRT__wfopen(const MSVCRT_wchar_t *path, const MSVCRT_wcha return MSVCRT__wfsopen( path, mode, MSVCRT__SH_DENYNO ); } +/********************************************************************* + * _wfopen_s (MSVCRT.@) + */ +int CDECL MSVCRT__wfopen_s(MSVCRT_FILE** pFile, const MSVCRT_wchar_t *filename, + const MSVCRT_wchar_t *mode) +{ + if(!pFile) { + MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0); + *MSVCRT__errno() = MSVCRT_EINVAL; + return MSVCRT_EINVAL; + } + + *pFile = MSVCRT__wfopen(filename, mode); + + if(!*pFile) + return *MSVCRT__errno(); + return 0; +} + /* MSVCRT_fputc calls MSVCRT__flsbuf which calls MSVCRT_fputc */ int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file); diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index fdd58c2..2700895 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1072,7 +1072,7 @@ # stub _wfindnext64 @ cdecl _wfindnexti64(long ptr) MSVCRT__wfindnexti64 @ cdecl _wfopen(wstr wstr) MSVCRT__wfopen -# stub _wfopen_s +@ cdecl _wfopen_s(ptr wstr wstr) MSVCRT__wfopen_s @ cdecl _wfreopen(wstr wstr ptr) MSVCRT__wfreopen # stub _wfreopen_s @ cdecl _wfsopen(wstr wstr long) MSVCRT__wfsopen
1
0
0
0
Davide Pizzetti : wordpad: Italian translation update.
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: f54fd9ac86a4edbcd7ec3974ed0fd5a3d6754ba5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f54fd9ac86a4edbcd7ec3974e…
Author: Davide Pizzetti <erpizzo(a)alice.it> Date: Tue Apr 20 19:15:28 2010 +0200 wordpad: Italian translation update. --- programs/wordpad/It.rc | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/programs/wordpad/It.rc b/programs/wordpad/It.rc index 9996841..40bf928 100644 --- a/programs/wordpad/It.rc +++ b/programs/wordpad/It.rc @@ -54,7 +54,7 @@ BEGIN MENUITEM "Trova s&uccessivo\tF3", ID_FIND_NEXT MENUITEM "S&ostituisci...\tCtrl+H", ID_REPLACE MENUITEM SEPARATOR - MENUITEM "Sola &Lettura", ID_EDIT_READONLY + MENUITEM "Solo &Lettura", ID_EDIT_READONLY MENUITEM "&Modificato", ID_EDIT_MODIFIED MENUITEM SEPARATOR POPUP "E&xtra" @@ -81,7 +81,7 @@ BEGIN END POPUP "F&ormato" BEGIN - MENUITEM "&Font...", ID_FONTSETTINGS + MENUITEM "&Carattere...", ID_FONTSETTINGS MENUITEM "&Elenco" ID_BULLET MENUITEM "&Paragrafo..." ID_PARAFORMAT MENUITEM "&Tabulazioni..." ID_TABSTOPS @@ -93,7 +93,7 @@ BEGIN END POPUP "&Aiuto" BEGIN - MENUITEM "&Su Wine Wordpad" ID_ABOUT + MENUITEM "&Riguardo A Wine Wordpad" ID_ABOUT END END @@ -208,9 +208,9 @@ END STRINGTABLE DISCARDABLE BEGIN STRING_ALL_FILES, "Tutti i files (*.*)" - STRING_TEXT_FILES_TXT, "Files di testo (*.txt)" - STRING_TEXT_FILES_UNICODE_TXT, "Files di testo Unicode (*.txt)" - STRING_RICHTEXT_FILES_RTF, "Rich text format (*.rtf)" + STRING_TEXT_FILES_TXT, "File di testo (*.txt)" + STRING_TEXT_FILES_UNICODE_TXT, "File di testo Unicode (*.txt)" + STRING_RICHTEXT_FILES_RTF, "Formato rich text (*.rtf)" STRING_NEWFILE_RICHTEXT, "Documento Rich text" STRING_NEWFILE_TXT, "Documento di testo" STRING_NEWFILE_TXT_UNICODE, "Documento di testo Unicode" @@ -241,8 +241,8 @@ BEGIN STRING_PREVIEW_ZOOMIN, "Ingrandisci" STRING_PREVIEW_ZOOMOUT, "Rimpicciolisci" STRING_PREVIEW_CLOSE, "Chiudi" - STRING_PREVIEW_PAGE, "Page" - STRING_PREVIEW_PAGES, "Pages" + STRING_PREVIEW_PAGE, "Pagina" + STRING_PREVIEW_PAGES, "Pagine" STRING_UNITS_CM, "cm" END
1
0
0
0
Alexandre Julliard : user32: Only call the driver when the cursor has actually changed.
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: 33e6f7dca355d98620fa3460d8739bbbc339eab3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33e6f7dca355d98620fa3460d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 20 21:15:04 2010 +0200 user32: Only call the driver when the cursor has actually changed. --- dlls/user32/cursoricon.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 52e49bc..0fc55ad 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -1789,7 +1789,7 @@ HCURSOR WINAPI DECLSPEC_HOTPATCH SetCursor( HCURSOR hCursor /* [in] Handle of cu if (!ret) return 0; /* Change the cursor shape only if it is visible */ - if (show_count >= 0) USER_Driver->pSetCursor( hCursor ); + if (show_count >= 0 && hOldCursor != hCursor) USER_Driver->pSetCursor( hCursor ); return hOldCursor; }
1
0
0
0
Alexandre Julliard : user32: Remove the CURSORICON parameter in the SetCursor entry point.
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: 8ec6359bbbd969960cae828d665459aa3a8add39 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8ec6359bbbd969960cae828d6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 20 21:14:31 2010 +0200 user32: Remove the CURSORICON parameter in the SetCursor entry point. --- dlls/user32/cursoricon.c | 21 +++------------------ dlls/user32/driver.c | 6 +++--- dlls/user32/user_private.h | 2 +- dlls/winex11.drv/mouse.c | 2 +- dlls/winex11.drv/x11drv.h | 4 ---- dlls/winex11.drv/x11drv_main.c | 1 - 6 files changed, 8 insertions(+), 28 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 60e59c1..52e49bc 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -1789,13 +1789,7 @@ HCURSOR WINAPI DECLSPEC_HOTPATCH SetCursor( HCURSOR hCursor /* [in] Handle of cu if (!ret) return 0; /* Change the cursor shape only if it is visible */ - if (show_count >= 0) - { - CURSORICONINFO *info = get_icon_ptr( hCursor ); - /* release before calling driver (FIXME) */ - if (info) release_icon_ptr( hCursor, info ); - USER_Driver->pSetCursor( hCursor, info ); - } + if (show_count >= 0) USER_Driver->pSetCursor( hCursor ); return hOldCursor; } @@ -1820,17 +1814,8 @@ INT WINAPI DECLSPEC_HOTPATCH ShowCursor( BOOL bShow ) TRACE("%d, count=%d\n", bShow, prev_count + increment ); - if (!prev_count) - { - if (bShow) - { - CURSORICONINFO *info = get_icon_ptr( cursor ); - /* release before calling driver (FIXME) */ - if (info) release_icon_ptr( cursor, info ); - USER_Driver->pSetCursor( cursor, info ); - } - else USER_Driver->pSetCursor( 0, NULL ); - } + if (!prev_count) USER_Driver->pSetCursor( bShow ? cursor : 0 ); + return prev_count + increment; } diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index ffbfbf8..dc17264 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -225,7 +225,7 @@ static void CDECL nulldrv_DestroyCursorIcon( HCURSOR cursor ) { } -static void CDECL nulldrv_SetCursor( HCURSOR cursor, struct tagCURSORICONINFO *info ) +static void CDECL nulldrv_SetCursor( HCURSOR cursor ) { } @@ -580,9 +580,9 @@ static void CDECL loaderdrv_DestroyCursorIcon( HCURSOR cursor ) load_driver()->pDestroyCursorIcon( cursor ); } -static void CDECL loaderdrv_SetCursor( HCURSOR cursor, struct tagCURSORICONINFO *info ) +static void CDECL loaderdrv_SetCursor( HCURSOR cursor ) { - load_driver()->pSetCursor( cursor, info ); + load_driver()->pSetCursor( cursor ); } static BOOL CDECL loaderdrv_GetCursorPos( LPPOINT pt ) diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 953812b..43daafd 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -70,7 +70,7 @@ typedef struct tagUSER_DRIVER { /* cursor/icon functions */ void (CDECL *pCreateCursorIcon)(HCURSOR,struct tagCURSORICONINFO *); void (CDECL *pDestroyCursorIcon)(HCURSOR); - void (CDECL *pSetCursor)(HCURSOR,struct tagCURSORICONINFO *); + void (CDECL *pSetCursor)(HCURSOR); BOOL (CDECL *pGetCursorPos)(LPPOINT); BOOL (CDECL *pSetCursorPos)(INT,INT); BOOL (CDECL *pClipCursor)(LPCRECT); diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index 152763b..b776383 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -1007,7 +1007,7 @@ void CDECL X11DRV_DestroyCursorIcon( HCURSOR handle ) /*********************************************************************** * SetCursor (X11DRV.@) */ -void CDECL X11DRV_SetCursor( HCURSOR handle, CURSORICONINFO *lpCursor ) +void CDECL X11DRV_SetCursor( HCURSOR handle ) { struct x11drv_thread_data *thread_data = x11drv_init_thread_data(); struct x11drv_win_data *data; diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index cffb4ee..4a3f8b7 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -66,8 +66,6 @@ typedef int Status; #define WINE_XDND_VERSION 4 -struct tagCURSORICONINFO; - extern void CDECL wine_tsx11_lock(void); extern void CDECL wine_tsx11_unlock(void); @@ -784,8 +782,6 @@ extern void X11DRV_Clipboard_Cleanup(void); extern void X11DRV_ResetSelectionOwner(void); extern void CDECL X11DRV_SetFocus( HWND hwnd ); extern Cursor get_x11_cursor( HCURSOR handle ); -extern Cursor X11DRV_GetCursor( Display *display, struct tagCURSORICONINFO *ptr ); -extern void CDECL X11DRV_SetCursor( HCURSOR cursor, struct tagCURSORICONINFO *lpCursor ); extern BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ); extern void X11DRV_InitKeyboard( Display *display ); extern void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD dwFlags, DWORD time, diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index fbe6184..3a1fa3f 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -667,7 +667,6 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) TlsSetValue( thread_data_tls_index, data ); if (use_xim) X11DRV_SetupXIM(); - X11DRV_SetCursor( 0, NULL ); return data; }
1
0
0
0
Alexandre Julliard : winex11: Update the cursor from the thread input status instead of caching it per-thread in x11drv .
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: eed9c63ac7650293523da5c8d067c74258568ba8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eed9c63ac7650293523da5c8d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 20 20:52:17 2010 +0200 winex11: Update the cursor from the thread input status instead of caching it per-thread in x11drv. --- dlls/winex11.drv/mouse.c | 51 ++++++++++++++++++---------------------- dlls/winex11.drv/window.c | 16 ++++-------- dlls/winex11.drv/x11drv.h | 5 ++- dlls/winex11.drv/x11drv_main.c | 5 +++- 4 files changed, 35 insertions(+), 42 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index c140ca3..152763b 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -194,7 +194,7 @@ static Cursor get_empty_cursor(void) /*********************************************************************** * get_x11_cursor */ -static Cursor get_x11_cursor( HCURSOR handle ) +Cursor get_x11_cursor( HCURSOR handle ) { Cursor cursor; @@ -216,15 +216,7 @@ static void update_mouse_state( HWND hwnd, Window window, int x, int y, unsigned get_coords( hwnd, window, x, y, pt ); - /* update the cursor */ - - if (data->cursor_window != window) - { - data->cursor_window = window; - wine_tsx11_lock(); - if (data->cursor) XDefineCursor( data->display, window, data->cursor ); - wine_tsx11_unlock(); - } + data->cursor_window = hwnd; /* update the wine server Z-order */ @@ -279,6 +271,7 @@ static void queue_raw_mouse_message( UINT message, HWND hwnd, DWORD x, DWORD y, DWORD data, DWORD time, DWORD extra_info, UINT injected_flags ) { MSLLHOOKSTRUCT hook; + HCURSOR cursor; hook.pt.x = x; hook.pt.y = y; @@ -302,9 +295,20 @@ static void queue_raw_mouse_message( UINT message, HWND hwnd, DWORD x, DWORD y, req->time = time; req->info = extra_info; wine_server_call( req ); + cursor = (reply->count >= 0) ? wine_server_ptr_handle(reply->cursor) : 0; } SERVER_END_REQ; + if (hwnd) + { + struct x11drv_win_data *data = X11DRV_get_win_data( hwnd ); + if (data && cursor != data->cursor) + { + Cursor xcursor = get_x11_cursor( cursor ); + if (xcursor) XDefineCursor( gdi_display, data->whole_window, xcursor ); + data->cursor = cursor; + } + } } @@ -1005,29 +1009,20 @@ void CDECL X11DRV_DestroyCursorIcon( HCURSOR handle ) */ void CDECL X11DRV_SetCursor( HCURSOR handle, CURSORICONINFO *lpCursor ) { - struct x11drv_thread_data *data = x11drv_init_thread_data(); + struct x11drv_thread_data *thread_data = x11drv_init_thread_data(); + struct x11drv_win_data *data; Cursor cursor; - if (lpCursor) - TRACE("%ux%u, planes %u, bpp %u\n", - lpCursor->nWidth, lpCursor->nHeight, lpCursor->bPlanes, lpCursor->bBitsPerPixel); - else - TRACE("NULL\n"); - - /* set the same cursor for all top-level windows of the current thread */ + if (!(data = X11DRV_get_win_data( thread_data->cursor_window ))) return; wine_tsx11_lock(); - cursor = create_cursor( data->display, lpCursor ); - if (cursor) + if ((cursor = get_x11_cursor( handle ))) { - if (data->cursor) XFreeCursor( data->display, data->cursor ); - data->cursor = cursor; - if (data->cursor_window) - { - XDefineCursor( data->display, data->cursor_window, cursor ); - /* Make the change take effect immediately */ - XFlush( data->display ); - } + TRACE( "%p xid %lx\n", handle, cursor ); + XDefineCursor( gdi_display, data->whole_window, cursor ); + /* Make the change take effect immediately */ + XFlush( gdi_display ); + data->cursor = handle; } wine_tsx11_unlock(); } diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 1621861..bf71cad 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -328,7 +328,6 @@ static int get_window_attributes( Display *display, struct x11drv_win_data *data attr->override_redirect = !data->managed; attr->colormap = X11DRV_PALETTE_PaletteXColormap; attr->save_under = ((GetClassLongW( data->hwnd, GCL_STYLE ) & CS_SAVEBITS) != 0); - attr->cursor = x11drv_thread_data()->cursor; attr->bit_gravity = NorthWestGravity; attr->win_gravity = StaticGravity; attr->backing_store = NotUseful; @@ -338,7 +337,7 @@ static int get_window_attributes( Display *display, struct x11drv_win_data *data KeymapStateMask | StructureNotifyMask); if (data->managed) attr->event_mask |= PropertyChangeMask; - return (CWOverrideRedirect | CWSaveUnder | CWColormap | CWCursor | + return (CWOverrideRedirect | CWSaveUnder | CWColormap | CWEventMask | CWBitGravity | CWBackingStore); } @@ -388,8 +387,6 @@ static Window create_client_window( Display *display, struct x11drv_win_data *da if (data->client_window) { - struct x11drv_thread_data *thread_data = x11drv_thread_data(); - if (thread_data->cursor_window == data->client_window) thread_data->cursor_window = None; XDeleteContext( display, data->client_window, winContext ); XDestroyWindow( display, data->client_window ); } @@ -800,8 +797,6 @@ static Window create_icon_window( Display *display, struct x11drv_win_data *data static void destroy_icon_window( Display *display, struct x11drv_win_data *data ) { if (!data->icon_window) return; - if (x11drv_thread_data()->cursor_window == data->icon_window) - x11drv_thread_data()->cursor_window = None; wine_tsx11_lock(); XDeleteContext( display, data->icon_window, winContext ); XDestroyWindow( display, data->icon_window ); @@ -1057,6 +1052,7 @@ static void set_initial_wm_hints( Display *display, struct x11drv_win_data *data Atom dndVersion = WINE_XDND_VERSION; XClassHint *class_hints; char *process_name = get_process_name(); + Cursor cursor; wine_tsx11_lock(); @@ -1089,6 +1085,9 @@ static void set_initial_wm_hints( Display *display, struct x11drv_win_data *data XChangeProperty( display, data->whole_window, x11drv_atom(XdndAware), XA_ATOM, 32, PropModeReplace, (unsigned char*)&dndVersion, 1 ); + if ((cursor = get_x11_cursor( data->cursor ))) + XDefineCursor( gdi_display, data->whole_window, cursor ); + data->wm_hints = XAllocWMHints(); wine_tsx11_unlock(); @@ -1694,14 +1693,9 @@ done: */ static void destroy_whole_window( Display *display, struct x11drv_win_data *data, BOOL already_destroyed ) { - struct x11drv_thread_data *thread_data = x11drv_thread_data(); - if (!data->whole_window) return; TRACE( "win %p xwin %lx/%lx\n", data->hwnd, data->whole_window, data->client_window ); - if (thread_data->cursor_window == data->whole_window || - thread_data->cursor_window == data->client_window) - thread_data->cursor_window = None; wine_tsx11_lock(); XDeleteContext( display, data->whole_window, winContext ); XDeleteContext( display, data->client_window, winContext ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 12ec286..cffb4ee 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -548,8 +548,7 @@ struct x11drv_thread_data { Display *display; XEvent *current_event; /* event currently being processed */ - Cursor cursor; /* current cursor */ - Window cursor_window; /* current window that contains the cursor */ + HWND cursor_window; /* current window that contains the cursor */ Window grab_window; /* window that currently grabs the mouse */ HWND last_focus; /* last window that had focus */ XIM xim; /* input method */ @@ -747,6 +746,7 @@ struct x11drv_win_data RECT whole_rect; /* X window rectangle for the whole window relative to parent */ RECT client_rect; /* client area relative to parent */ XIC xic; /* X input context */ + HCURSOR cursor; /* current cursor */ XWMHints *wm_hints; /* window manager hints */ BOOL managed : 1; /* is window managed? */ BOOL mapped : 1; /* is window mapped? (in either normal or iconic state) */ @@ -783,6 +783,7 @@ extern int CDECL X11DRV_AcquireClipboard(HWND hWndClipWindow); extern void X11DRV_Clipboard_Cleanup(void); extern void X11DRV_ResetSelectionOwner(void); extern void CDECL X11DRV_SetFocus( HWND hwnd ); +extern Cursor get_x11_cursor( HCURSOR handle ); extern Cursor X11DRV_GetCursor( Display *display, struct tagCURSORICONINFO *ptr ); extern void CDECL X11DRV_SetCursor( HCURSOR cursor, struct tagCURSORICONINFO *lpCursor ); extern BOOL CDECL X11DRV_ClipCursor( LPCRECT clip ); diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c index 240e4d9..fbe6184 100644 --- a/dlls/winex11.drv/x11drv_main.c +++ b/dlls/winex11.drv/x11drv_main.c @@ -197,7 +197,10 @@ static inline BOOL ignore_error( Display *display, XErrorEvent *event ) /* ignore a number of errors on gdi display caused by creating/destroying windows */ if (display == gdi_display) { - if (event->error_code == BadDrawable || event->error_code == BadGC) return TRUE; + if (event->error_code == BadDrawable || + event->error_code == BadGC || + event->error_code == BadWindow) + return TRUE; #ifdef HAVE_X11_EXTENSIONS_XRENDER_H if (xrender_error_base) /* check for XRender errors */ {
1
0
0
0
Alexandre Julliard : server: Return the current cursor when queuing a hardware message.
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: cd28e2be7c79644e02babb509247a453e0153390 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd28e2be7c79644e02babb509…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 20 20:51:45 2010 +0200 server: Return the current cursor when queuing a hardware message. --- include/wine/server_protocol.h | 4 +++- server/protocol.def | 3 +++ server/queue.c | 28 ++++++++++++++++------------ server/request.h | 3 +++ server/trace.c | 8 +++++++- 5 files changed, 32 insertions(+), 14 deletions(-) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 83c55db..24790a5 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -2751,6 +2751,8 @@ struct send_hardware_message_request struct send_hardware_message_reply { struct reply_header __header; + user_handle_t cursor; + int count; }; @@ -5481,6 +5483,6 @@ union generic_reply struct set_cursor_reply set_cursor_reply; }; -#define SERVER_PROTOCOL_VERSION 399 +#define SERVER_PROTOCOL_VERSION 400 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/protocol.def b/server/protocol.def index 4aaff10..5015e97 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1992,6 +1992,9 @@ enum message_type int x; /* x position */ int y; /* y position */ unsigned int time; /* message time */ +@REPLY + user_handle_t cursor; /* current cursor for the target thread input */ + int count; /* current cursor count */ @END diff --git a/server/queue.c b/server/queue.c index c49c3e1..4a06a73 100644 --- a/server/queue.c +++ b/server/queue.c @@ -1262,12 +1262,11 @@ static user_handle_t find_hardware_message_window( struct thread_input *input, s } /* queue a hardware message into a given thread input */ -static void queue_hardware_message( struct msg_queue *queue, struct message *msg, +static void queue_hardware_message( struct thread_input *input, struct message *msg, struct hardware_msg_data *data ) { user_handle_t win; struct thread *thread; - struct thread_input *input = queue ? queue->input : foreground_input; unsigned int msg_code; last_input_time = get_tick_count(); @@ -1704,20 +1703,20 @@ DECL_HANDLER(send_message) DECL_HANDLER(send_hardware_message) { struct message *msg; - struct msg_queue *recv_queue = NULL; struct thread *thread = NULL; struct hardware_msg_data *data; + struct thread_input *input = foreground_input; if (req->id) { if (!(thread = get_thread_from_id( req->id ))) return; - } - - if (thread && !(recv_queue = thread->queue)) - { - set_error( STATUS_INVALID_PARAMETER ); - release_object( thread ); - return; + if (!thread->queue) + { + set_error( STATUS_INVALID_PARAMETER ); + release_object( thread ); + return; + } + input = thread->queue->input; } if (!(data = mem_alloc( sizeof(*data) ))) @@ -1741,11 +1740,16 @@ DECL_HANDLER(send_hardware_message) msg->result = NULL; msg->data = data; msg->data_size = sizeof(*data); - queue_hardware_message( recv_queue, msg, data ); + queue_hardware_message( input, msg, data ); } else free( data ); - if (thread) release_object( thread ); + if (thread) + { + reply->cursor = input->cursor; + reply->count = input->cursor_count; + release_object( thread ); + } } /* post a quit message to the current queue */ diff --git a/server/request.h b/server/request.h index eb710b9..604d115 100644 --- a/server/request.h +++ b/server/request.h @@ -1381,6 +1381,9 @@ C_ASSERT( FIELD_OFFSET(struct send_hardware_message_request, x) == 48 ); C_ASSERT( FIELD_OFFSET(struct send_hardware_message_request, y) == 52 ); C_ASSERT( FIELD_OFFSET(struct send_hardware_message_request, time) == 56 ); C_ASSERT( sizeof(struct send_hardware_message_request) == 64 ); +C_ASSERT( FIELD_OFFSET(struct send_hardware_message_reply, cursor) == 8 ); +C_ASSERT( FIELD_OFFSET(struct send_hardware_message_reply, count) == 12 ); +C_ASSERT( sizeof(struct send_hardware_message_reply) == 16 ); C_ASSERT( FIELD_OFFSET(struct get_message_request, flags) == 12 ); C_ASSERT( FIELD_OFFSET(struct get_message_request, get_win) == 16 ); C_ASSERT( FIELD_OFFSET(struct get_message_request, get_first) == 20 ); diff --git a/server/trace.c b/server/trace.c index 7958781..c97bd70 100644 --- a/server/trace.c +++ b/server/trace.c @@ -2427,6 +2427,12 @@ static void dump_send_hardware_message_request( const struct send_hardware_messa fprintf( stderr, ", time=%08x", req->time ); } +static void dump_send_hardware_message_reply( const struct send_hardware_message_reply *req ) +{ + fprintf( stderr, " cursor=%08x", req->cursor ); + fprintf( stderr, ", count=%d", req->count ); +} + static void dump_get_message_request( const struct get_message_request *req ) { fprintf( stderr, " flags=%08x", req->flags ); @@ -4190,7 +4196,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = { (dump_func)dump_get_process_idle_event_reply, NULL, NULL, - NULL, + (dump_func)dump_send_hardware_message_reply, (dump_func)dump_get_message_reply, NULL, NULL,
1
0
0
0
Alexandre Julliard : server: Fix structure padding for requests that have a reply.
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: 3044d734b1cd84746cc57ace8b79a156ea9391b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3044d734b1cd84746cc57ace8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 20 21:25:38 2010 +0200 server: Fix structure padding for requests that have a reply. --- include/wine/server_protocol.h | 65 +++++++++++++++- server/request.h | 174 ++++++++++++++++++++++++++++++++++++++++ tools/make_requests | 22 ++++-- 3 files changed, 254 insertions(+), 7 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=3044d734b1cd84746cc57…
1
0
0
0
Alexandre Julliard : winex11: Move creation of an empty cursor to a separate helper function.
by Alexandre Julliard
21 Apr '10
21 Apr '10
Module: wine Branch: master Commit: 776527f38f2ff89f354e49aa8df795440677376a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=776527f38f2ff89f354e49aa8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Apr 20 21:23:00 2010 +0200 winex11: Move creation of an empty cursor to a separate helper function. --- dlls/winex11.drv/mouse.c | 55 ++++++++++++++++++++++++--------------------- 1 files changed, 29 insertions(+), 26 deletions(-) diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c index e8f96c4..c140ca3 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -168,12 +168,38 @@ static inline void update_button_state( unsigned int state ) } /*********************************************************************** + * get_empty_cursor + */ +static Cursor get_empty_cursor(void) +{ + static Cursor cursor; + static const char data[] = { 0 }; + + if (!cursor) + { + XColor bg; + Pixmap pixmap; + + bg.red = bg.green = bg.blue = 0x0000; + pixmap = XCreateBitmapFromData( gdi_display, root_window, data, 1, 1 ); + if (pixmap) + { + cursor = XCreatePixmapCursor( gdi_display, pixmap, pixmap, &bg, &bg, 0, 0 ); + XFreePixmap( gdi_display, pixmap ); + } + } + return cursor; +} + +/*********************************************************************** * get_x11_cursor */ static Cursor get_x11_cursor( HCURSOR handle ) { Cursor cursor; + if (!handle) return get_empty_cursor(); + if (cursor_context && !XFindContext( gdi_display, (XID)handle, cursor_context, (char **)&cursor )) return cursor; return 0; @@ -596,18 +622,6 @@ static Cursor create_xcursor_cursor( Display *display, CURSORICONINFO *ptr ) Cursor cursor; XcursorImage *image; - if (!ptr) /* Create an empty cursor */ - { - image = pXcursorImageCreate( 1, 1 ); - image->xhot = 0; - image->yhot = 0; - *(image->pixels) = 0; - cursor = pXcursorImageLoadCursor( display, image ); - pXcursorImageDestroy( image ); - - return cursor; - } - image = create_cursor_image( ptr ); if (!image) return 0; @@ -646,24 +660,13 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr ) char *bitMask32 = NULL; BOOL alpha_zero = TRUE; + if (!ptr) return get_empty_cursor(); + #ifdef SONAME_LIBXCURSOR if (pXcursorImageLoadCursor) return create_xcursor_cursor( display, ptr ); #endif - if (!ptr) /* Create an empty cursor */ - { - static const char data[] = { 0 }; - - bg.red = bg.green = bg.blue = 0x0000; - pixmapBits = XCreateBitmapFromData( display, root_window, data, 1, 1 ); - if (pixmapBits) - { - cursor = XCreatePixmapCursor( display, pixmapBits, pixmapBits, - &bg, &bg, 0, 0 ); - XFreePixmap( display, pixmapBits ); - } - } - else /* Create the X cursor from the bits */ + /* Create the X cursor from the bits */ { XImage *image; GC gc;
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
90
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
Results per page:
10
25
50
100
200