You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
93 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ede44e4e8f | ||
|
aca614eb8b | ||
|
49d52336e1 | ||
|
17fdb93f55 | ||
|
3f43238b01 | ||
|
59d19c8963 | ||
|
d3ad4e1115 | ||
|
b3f1e5566f | ||
|
c26be86c42 | ||
|
14a3242b92 | ||
|
991bebfee7 | ||
|
0d7a4f0c73 | ||
|
30c1e2757a | ||
|
e55a3a3f43 | ||
|
ca1047528f | ||
|
d53a1b4a17 | ||
|
47facf2571 | ||
|
b7c9feb3c1 | ||
|
c263c4f896 | ||
|
fa188fd6b0 | ||
|
6e474e34fb | ||
|
f917b2fc24 | ||
|
44115dbd63 | ||
|
59f43478d6 | ||
|
d83b9f53fb | ||
|
f57d1b8d02 | ||
|
f397af1c7f | ||
|
44fb25d66d | ||
|
4ad9169f53 | ||
|
bbc86a61db | ||
|
537b6dd5e3 | ||
|
8b862038c5 | ||
|
3b2fb113fa | ||
|
964b6c1ab5 | ||
|
fc87fb74db | ||
|
8bbe365bfc | ||
|
07ef9c93b8 | ||
|
050435f28e | ||
|
00f288b12e | ||
|
b1e9ef0294 | ||
|
3ac1519f34 | ||
|
9a2a33ee2b | ||
|
9c3a91903e | ||
|
dd581d0b2f | ||
|
506efa392c | ||
|
a45597f811 | ||
|
7073073fcc | ||
|
9dc9c57bbf | ||
|
915ed2cec1 | ||
|
329005baaf | ||
|
d8496cacd1 | ||
|
695a835b0a | ||
|
68bfc31be4 | ||
|
23960d9862 | ||
|
bca3c546d2 | ||
|
1e3eb08c69 | ||
|
bd8f35fad1 | ||
|
ccd0bc4ccd | ||
|
89af635b94 | ||
|
f05f084d9a | ||
|
93a708bf2b | ||
|
b9f34bbbc3 | ||
|
8be2c25e19 | ||
|
7059b2e1ec | ||
|
7044b0dc98 | ||
|
a1bf11e38a | ||
|
703c84ce70 | ||
|
b79e576574 | ||
|
db1f94bae4 | ||
|
0f52b315d6 | ||
|
ce3fc5723d | ||
|
595f2f9860 | ||
|
c01051f313 | ||
|
d163510e1e | ||
|
c675804204 | ||
|
d729a7b132 | ||
|
2782e6db1e | ||
|
a08376bca0 | ||
|
3371e62824 | ||
|
8218a78955 | ||
|
a8cb853708 | ||
|
6cbb6dc117 | ||
|
34302e77dd | ||
|
ae0343f628 | ||
|
5905340060 | ||
|
c8e3795e69 | ||
|
108662b1cc | ||
|
088d7f9ddf | ||
|
b788fe9549 | ||
|
b8b836e43d | ||
|
d44f4885f2 | ||
|
73caf7ace2 | ||
|
d36d63ac84 |
@@ -1,30 +0,0 @@
|
||||
Contributing to Wine Staging
|
||||
----------------------------
|
||||
|
||||
First of all, thank you for taking the time to contribute to this project.
|
||||
|
||||
### Reporting bugs
|
||||
|
||||
Since WineConf 2015 Wine Staging is an official part of WineHQ, which means you
|
||||
can report problems directly at [bugs.winehq.org](https://bugs.winehq.org/).
|
||||
Most of the time bugs found in Wine Staging also turn out to be present in the
|
||||
development branch, so its recommended to open your bug in the "Wine" product,
|
||||
unless you are sure its really "Wine Staging" specific. For bugs related to our
|
||||
binary packages, please open a bug report in the "Packaging" product.
|
||||
|
||||
### Submitting patches
|
||||
|
||||
**IMPORTANT:** Please use [dev.wine-staging.com](https://dev.wine-staging.com/patches)
|
||||
for patch submissions, we currently do not accept Pull requests on GitHub.
|
||||
|
||||
Wine Staging mainly concentrates on experimental features and patches which are
|
||||
difficult to get into the development branch. If you have a very simple bug fix
|
||||
including tests, there is usually no need to send it to Wine Staging. You can
|
||||
directly contribute it to the
|
||||
[development branch](http://wiki.winehq.org/SubmittingPatches). However, if you
|
||||
already tried that without success, or are working on such a complex area that
|
||||
you do not really think its ready for inclusion, you might want to submit it to
|
||||
our Staging tree. Please open a patch submission request on
|
||||
[dev.wine-staging.com](https://dev.wine-staging.com/patches) including the patch.
|
||||
More information is also available in our
|
||||
[Wiki](https://wiki.winehq.org/Wine-Staging_Patches).
|
@@ -8,7 +8,8 @@ are part of **Wine Staging** and are licensed under the terms of the
|
||||
|
||||
```
|
||||
Copyright (C) 2014-2017 the Wine Staging project authors.
|
||||
Copyright (C) 2018 Alistair Leslie-Hughes
|
||||
Copyright (C) 2018 Alistair Leslie-Hughes, Zebediah Figura
|
||||
Copyright (C) 2019-2020 Alistair Leslie-Hughes, Zebediah Figura, Paul Gofman
|
||||
|
||||
Wine Staging is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
12
README.md
12
README.md
@@ -6,15 +6,14 @@ features, which have not been integrated into the development branch yet. The
|
||||
idea of Wine Staging is to provide experimental features faster to end users and
|
||||
to give developers the possibility to discuss and improve their patches before
|
||||
they are integrated into the main branch. More information about Wine Staging
|
||||
can also be found on our website [wine-staging.com](http://wine-staging.com).
|
||||
can also be found [on the WineHQ wiki](https://wiki.winehq.org/Wine-Staging).
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Ready-to-use packages for Wine Staging are available for a variety of Linux
|
||||
distributions and for Mac OS X. Just follow the
|
||||
[installation instructions](https://wine-staging.com/installation.html)
|
||||
for your operating system.
|
||||
distributions and for Mac OS X. Just follow the [installation
|
||||
instructions](https://wiki.winehq.org/Download) for your operating system.
|
||||
|
||||
On most distributions the `wine-staging` package is installed to
|
||||
`/opt/wine-staging`, such that multiple Wine versions can be installed in
|
||||
@@ -78,5 +77,6 @@ in our [Wiki](https://wiki.winehq.org/Wine-Staging).
|
||||
Contributing
|
||||
------------
|
||||
|
||||
Please see CONTRIBUTING.md for more information about contributing to Wine
|
||||
Staging.
|
||||
For information on contributing to Wine-Staging, please see
|
||||
<https://wiki.winehq.org/Wine-Staging_Contributing>. Note that GitHub pull
|
||||
requests are strongly dispreferred, especially for patches.
|
@@ -1,4 +1,4 @@
|
||||
From fa73044dd60bae90b9a5ec850205a07579d4db17 Mon Sep 17 00:00:00 2001
|
||||
From d216f85a593a09e7983d9178fb3e1f20bfcf08cc Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 29 May 2014 23:43:45 +0200
|
||||
Subject: [PATCH] loader: Add commandline option --patches to show the patch
|
||||
@@ -14,13 +14,14 @@ Subject: [PATCH] loader: Add commandline option --patches to show the patch
|
||||
6 files changed, 58 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
|
||||
index bb75d9c..21e2db6 100644
|
||||
index c29a1c26c..8906e1942 100644
|
||||
--- a/dlls/ntdll/misc.c
|
||||
+++ b/dlls/ntdll/misc.c
|
||||
@@ -61,6 +61,14 @@ const char * CDECL NTDLL_wine_get_version(void)
|
||||
@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void)
|
||||
return wine_get_version();
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
+/*********************************************************************
|
||||
+ * wine_get_patches (NTDLL.@)
|
||||
+ */
|
||||
+const void * CDECL NTDLL_wine_get_patches(void)
|
||||
@@ -28,15 +29,14 @@ index bb75d9c..21e2db6 100644
|
||||
+ return wine_get_patches();
|
||||
+}
|
||||
+
|
||||
+/*********************************************************************
|
||||
/*********************************************************************
|
||||
* wine_get_build_id (NTDLL.@)
|
||||
*/
|
||||
const char * CDECL NTDLL_wine_get_build_id(void)
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 292b0f6..fb45a94 100644
|
||||
index 7aa953ca6..cf7d5b6f9 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1516,6 +1516,7 @@
|
||||
@@ -1566,6 +1566,7 @@
|
||||
|
||||
# Version
|
||||
@ cdecl wine_get_version() NTDLL_wine_get_version
|
||||
@@ -45,10 +45,10 @@ index 292b0f6..fb45a94 100644
|
||||
@ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version
|
||||
|
||||
diff --git a/include/wine/library.h b/include/wine/library.h
|
||||
index 242bb69..fae73fe 100644
|
||||
index a6fe28059..511bf4722 100644
|
||||
--- a/include/wine/library.h
|
||||
+++ b/include/wine/library.h
|
||||
@@ -43,6 +43,7 @@ extern const char *wine_get_data_dir(void);
|
||||
@@ -47,6 +47,7 @@ extern const char *wine_get_data_dir(void);
|
||||
extern const char *wine_get_server_dir(void);
|
||||
extern const char *wine_get_user_name(void);
|
||||
extern const char *wine_get_version(void);
|
||||
@@ -57,10 +57,10 @@ index 242bb69..fae73fe 100644
|
||||
extern void wine_init_argv0_path( const char *argv0 );
|
||||
extern void wine_exec_wine_binary( const char *name, char **argv, const char *env_var );
|
||||
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
||||
index 3c9110b..5da6263 100644
|
||||
index 2a3314cbf..5b66c063d 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -522,6 +522,12 @@ const char *wine_get_version(void)
|
||||
@@ -504,6 +504,12 @@ const char *wine_get_version(void)
|
||||
return PACKAGE_VERSION;
|
||||
}
|
||||
|
||||
@@ -74,19 +74,19 @@ index 3c9110b..5da6263 100644
|
||||
const char *wine_get_build_id(void)
|
||||
{
|
||||
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
||||
index 2159fac..7cb2918 100644
|
||||
index 3f2c430fa..ca46979f5 100644
|
||||
--- a/libs/wine/wine.map
|
||||
+++ b/libs/wine/wine.map
|
||||
@@ -90,6 +90,7 @@ WINE_1.0
|
||||
@@ -28,6 +28,7 @@ WINE_1.0
|
||||
wine_get_ss;
|
||||
wine_get_user_name;
|
||||
wine_get_version;
|
||||
+ wine_get_patches;
|
||||
wine_init;
|
||||
wine_init_argv0_path;
|
||||
wine_is_dbcs_leadbyte;
|
||||
wine_ldt_alloc_entries;
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index f197cf8..f662912 100644
|
||||
index f197cf802..f6629128d 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -54,7 +54,8 @@ static void check_command_line( int argc, char *argv[] )
|
||||
@@ -146,5 +146,5 @@ index f197cf8..f662912 100644
|
||||
|
||||
|
||||
--
|
||||
1.9.1
|
||||
2.25.0
|
||||
|
||||
|
@@ -1,21 +1,21 @@
|
||||
From 9618572cf2eace39198fb83b747a70d1865015e3 Mon Sep 17 00:00:00 2001
|
||||
From c07a490a6950f4efe563e38ca78b1aa459dfad86 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 28 May 2014 19:50:51 +0200
|
||||
Subject: [PATCH] loader: Add commandline option --check-libs.
|
||||
|
||||
---
|
||||
include/wine/library.h | 2 +
|
||||
libs/wine/config.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
libs/wine/loader.c | 36 ++++++++++++++
|
||||
libs/wine/config.c | 124 +++++++++++++++++++++++++++++++++++++++++
|
||||
libs/wine/loader.c | 36 ++++++++++++
|
||||
libs/wine/wine.map | 2 +
|
||||
loader/main.c | 50 +++++++++++++++++++-
|
||||
loader/main.c | 50 ++++++++++++++++-
|
||||
5 files changed, 213 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/wine/library.h b/include/wine/library.h
|
||||
index fae73fe..7395a11 100644
|
||||
index 511bf4722..557cec20c 100644
|
||||
--- a/include/wine/library.h
|
||||
+++ b/include/wine/library.h
|
||||
@@ -40,6 +40,7 @@ extern "C" {
|
||||
@@ -44,6 +44,7 @@ extern "C" {
|
||||
extern const char *wine_get_build_dir(void);
|
||||
extern const char *wine_get_config_dir(void);
|
||||
extern const char *wine_get_data_dir(void);
|
||||
@@ -23,7 +23,7 @@ index fae73fe..7395a11 100644
|
||||
extern const char *wine_get_server_dir(void);
|
||||
extern const char *wine_get_user_name(void);
|
||||
extern const char *wine_get_version(void);
|
||||
@@ -52,6 +53,7 @@ extern void wine_exec_wine_binary( const char *name, char **argv, const char *en
|
||||
@@ -56,6 +57,7 @@ extern void wine_exec_wine_binary( const char *name, char **argv, const char *en
|
||||
|
||||
typedef void (*load_dll_callback_t)( void *, const char * );
|
||||
|
||||
@@ -32,10 +32,10 @@ index fae73fe..7395a11 100644
|
||||
extern void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize );
|
||||
extern int wine_dlclose( void *handle, char *error, size_t errorsize );
|
||||
diff --git a/libs/wine/config.c b/libs/wine/config.c
|
||||
index 5da6263..6cedfb7 100644
|
||||
index 5b66c063d..e0988513e 100644
|
||||
--- a/libs/wine/config.c
|
||||
+++ b/libs/wine/config.c
|
||||
@@ -488,6 +488,130 @@ const char *wine_get_build_dir(void)
|
||||
@@ -470,6 +470,130 @@ const char *wine_get_build_dir(void)
|
||||
return build_dir;
|
||||
}
|
||||
|
||||
@@ -167,13 +167,14 @@ index 5da6263..6cedfb7 100644
|
||||
const char *wine_get_server_dir(void)
|
||||
{
|
||||
diff --git a/libs/wine/loader.c b/libs/wine/loader.c
|
||||
index 649aa22..367dde3 100644
|
||||
index 2a569f5b7..5f10c3f9d 100644
|
||||
--- a/libs/wine/loader.c
|
||||
+++ b/libs/wine/loader.c
|
||||
@@ -1064,6 +1064,42 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize
|
||||
@@ -1072,6 +1072,42 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
+/***********************************************************************
|
||||
+ * wine_dladdr
|
||||
+ */
|
||||
+int wine_dladdr( void *addr, void *info, char *error, size_t errorsize )
|
||||
@@ -209,32 +210,31 @@ index 649aa22..367dde3 100644
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
/***********************************************************************
|
||||
* wine_dlsym
|
||||
*/
|
||||
void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize )
|
||||
diff --git a/libs/wine/wine.map b/libs/wine/wine.map
|
||||
index 7cb2918..72ffed8 100644
|
||||
index ca46979f5..22a4e73b0 100644
|
||||
--- a/libs/wine/wine.map
|
||||
+++ b/libs/wine/wine.map
|
||||
@@ -65,6 +65,7 @@ WINE_1.0
|
||||
wine_dbg_sprintf;
|
||||
wine_dbgstr_an;
|
||||
wine_dbgstr_wn;
|
||||
@@ -9,6 +9,7 @@ WINE_1.0
|
||||
wine_anon_mmap;
|
||||
wine_casemap_lower;
|
||||
wine_casemap_upper;
|
||||
+ wine_dladdr;
|
||||
wine_dlclose;
|
||||
wine_dll_enum_load_path;
|
||||
wine_dll_get_owner;
|
||||
@@ -85,6 +86,7 @@ WINE_1.0
|
||||
wine_dll_set_callback;
|
||||
@@ -24,6 +25,7 @@ WINE_1.0
|
||||
wine_get_es;
|
||||
wine_get_fs;
|
||||
wine_get_gs;
|
||||
+ wine_get_libs;
|
||||
wine_get_server_dir;
|
||||
wine_get_sortkey;
|
||||
wine_get_ss;
|
||||
wine_get_user_name;
|
||||
diff --git a/loader/main.c b/loader/main.c
|
||||
index f662912..a2dc40c 100644
|
||||
index f6629128d..a2dc40c51 100644
|
||||
--- a/loader/main.c
|
||||
+++ b/loader/main.c
|
||||
@@ -36,6 +36,12 @@
|
||||
@@ -309,5 +309,5 @@ index f662912..a2dc40c 100644
|
||||
|
||||
|
||||
--
|
||||
1.9.1
|
||||
2.25.0
|
||||
|
||||
|
@@ -1,47 +0,0 @@
|
||||
From 246cb6b72666dcb77fb2f553d318d7dabbe8811d Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 7 Apr 2015 13:18:47 +0800
|
||||
Subject: advapi32: Prepend a hidden LSA_TRUST_INFORMATION in LsaLookupSids to
|
||||
avoid crash when Domains[-1] incorrectly accessed by application. (try 2)
|
||||
|
||||
---
|
||||
dlls/advapi32/lsa.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index 69c29c5..dfe25b3 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -488,14 +488,17 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
if (!(*Names = heap_alloc(name_fullsize))) return STATUS_NO_MEMORY;
|
||||
/* maximum count of stored domain infos is Count, allocate it like that cause really needed
|
||||
count could only be computed after sid data is retrieved */
|
||||
- domain_fullsize = sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION)*Count;
|
||||
+ domain_fullsize = sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION) * (Count + 1);
|
||||
if (!(*ReferencedDomains = heap_alloc(domain_fullsize)))
|
||||
{
|
||||
heap_free(*Names);
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
(*ReferencedDomains)->Entries = 0;
|
||||
- (*ReferencedDomains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*ReferencedDomains + sizeof(LSA_REFERENCED_DOMAIN_LIST));
|
||||
+ (*ReferencedDomains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*ReferencedDomains +
|
||||
+ sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION));
|
||||
+ (*ReferencedDomains)->Domains[-1].Sid = NULL;
|
||||
+ RtlInitUnicodeStringEx(&(*ReferencedDomains)->Domains[-1].Name, NULL);
|
||||
|
||||
/* Get full names data length and full length needed to store domain name and SID */
|
||||
for (i = 0; i < Count; i++)
|
||||
@@ -555,7 +558,8 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
|
||||
*ReferencedDomains = heap_realloc(*ReferencedDomains, domain_fullsize);
|
||||
/* fix pointer after reallocation */
|
||||
- (*ReferencedDomains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*ReferencedDomains + sizeof(LSA_REFERENCED_DOMAIN_LIST));
|
||||
+ (*ReferencedDomains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*ReferencedDomains +
|
||||
+ sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION));
|
||||
domain_data = (char*)(*ReferencedDomains)->Domains + sizeof(LSA_TRUST_INFORMATION)*Count;
|
||||
|
||||
mapped = 0;
|
||||
--
|
||||
2.3.5
|
||||
|
@@ -1,39 +0,0 @@
|
||||
From ce254ac3659e0c040136341d035629f99ec6d1ea Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 7 Apr 2015 13:19:06 +0800
|
||||
Subject: advapi32: Prepend a hidden LSA_TRUST_INFORMATION in LsaLookupNames2
|
||||
to avoid crash when Domains[-1] incorrectly accessed by application. (try 2)
|
||||
|
||||
---
|
||||
dlls/advapi32/lsa.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index dfe25b3..258b8ca 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -404,14 +404,18 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count,
|
||||
sid = (SID *)(*sids + count);
|
||||
|
||||
/* use maximum domain count */
|
||||
- if (!(*domains = heap_alloc(sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION)*count +
|
||||
- sid_size_total + domainname_size_total*sizeof(WCHAR))))
|
||||
+ if (!(*domains = heap_alloc(sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION) * (count + 1) +
|
||||
+ sid_size_total + domainname_size_total * sizeof(WCHAR))))
|
||||
{
|
||||
heap_free(*sids);
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
(*domains)->Entries = 0;
|
||||
- (*domains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*domains + sizeof(LSA_REFERENCED_DOMAIN_LIST));
|
||||
+ (*domains)->Domains = (LSA_TRUST_INFORMATION*)((char*)*domains +
|
||||
+ sizeof(LSA_REFERENCED_DOMAIN_LIST) + sizeof(LSA_TRUST_INFORMATION));
|
||||
+ (*domains)->Domains[-1].Sid = NULL;
|
||||
+ RtlInitUnicodeStringEx(&(*domains)->Domains[-1].Name, NULL);
|
||||
+
|
||||
domain_data = (char*)(*domains)->Domains + sizeof(LSA_TRUST_INFORMATION)*count;
|
||||
|
||||
domain.Buffer = heap_alloc(domain_size_max*sizeof(WCHAR));
|
||||
--
|
||||
2.3.5
|
||||
|
@@ -1,68 +0,0 @@
|
||||
From 77d43d721793edda9b419f7426442a35f0cb5918 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 7 Apr 2015 11:23:34 +0800
|
||||
Subject: advapi32: Fallback to Sid string when LookupAccountSid fails.
|
||||
|
||||
---
|
||||
dlls/advapi32/lsa.c | 31 +++++++++++++++++++++++++++++++
|
||||
1 file changed, 31 insertions(+)
|
||||
|
||||
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
|
||||
index 1b270a80829..b8dedbd6d58 100644
|
||||
--- a/dlls/advapi32/lsa.c
|
||||
+++ b/dlls/advapi32/lsa.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "winbase.h"
|
||||
#include "winreg.h"
|
||||
#include "winternl.h"
|
||||
+#include "sddl.h"
|
||||
#include "advapi32_misc.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
@@ -562,6 +563,21 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
domain.MaximumLength = sizeof(WCHAR);
|
||||
}
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ WCHAR *strsid = NULL;
|
||||
+
|
||||
+ if (ConvertSidToStringSidW(Sids[i], &strsid))
|
||||
+ {
|
||||
+ name_size = strlenW(strsid) + 1;
|
||||
+
|
||||
+ (*Names)[i].Name.Length = (name_size - 1) * sizeof(WCHAR);
|
||||
+ (*Names)[i].Name.MaximumLength = name_size * sizeof(WCHAR);
|
||||
+ name_fullsize += (*Names)[i].Name.MaximumLength;
|
||||
+
|
||||
+ LocalFree(strsid);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
/* now we have full length needed for both */
|
||||
@@ -605,6 +621,21 @@ NTSTATUS WINAPI LsaLookupSids(
|
||||
(*Names)[i].DomainIndex = lsa_reflist_add_domain(*ReferencedDomains, &domain, &domain_data);
|
||||
heap_free(domain.Buffer);
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ WCHAR *strsid = NULL;
|
||||
+
|
||||
+ if (ConvertSidToStringSidW(Sids[i], &strsid))
|
||||
+ {
|
||||
+ name_size = strlenW(strsid) + 1;
|
||||
+ mapped++;
|
||||
+
|
||||
+ (*Names)[i].Name.Buffer = name_buffer;
|
||||
+ memcpy((*Names)[i].Name.Buffer, strsid, name_size * sizeof(WCHAR));
|
||||
+
|
||||
+ LocalFree(strsid);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
name_buffer += name_size;
|
||||
}
|
||||
--
|
||||
2.11.0
|
||||
|
@@ -1,56 +0,0 @@
|
||||
From 486ec8b5ea1b39195d92cfdbfe3a334280780a14 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Tue, 28 Apr 2015 23:00:08 +0800
|
||||
Subject: [PATCH] advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS.
|
||||
|
||||
---
|
||||
dlls/advapi32/security.c | 7 +++++--
|
||||
dlls/advapi32/tests/security.c | 4 ++--
|
||||
2 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
|
||||
index a7707f15d39..73c1f054d5c 100644
|
||||
--- a/dlls/advapi32/security.c
|
||||
+++ b/dlls/advapi32/security.c
|
||||
@@ -187,7 +187,7 @@ static const WCHAR Domain_Admins[] = { 'D','o','m','a','i','n',' ','A','d','m','
|
||||
static const WCHAR Domain_Computers[] = { 'D','o','m','a','i','n',' ','C','o','m','p','u','t','e','r','s',0 };
|
||||
static const WCHAR Domain_Controllers[] = { 'D','o','m','a','i','n',' ','C','o','n','t','r','o','l','l','e','r','s',0 };
|
||||
static const WCHAR Domain_Guests[] = { 'D','o','m','a','i','n',' ','G','u','e','s','t','s',0 };
|
||||
-static const WCHAR Domain_Users[] = { 'D','o','m','a','i','n',' ','U','s','e','r','s',0 };
|
||||
+static const WCHAR None[] = { 'N','o','n','e',0 };
|
||||
static const WCHAR Enterprise_Admins[] = { 'E','n','t','e','r','p','r','i','s','e',' ','A','d','m','i','n','s',0 };
|
||||
static const WCHAR ENTERPRISE_DOMAIN_CONTROLLERS[] = { 'E','N','T','E','R','P','R','I','S','E',' ','D','O','M','A','I','N',' ','C','O','N','T','R','O','L','L','E','R','S',0 };
|
||||
static const WCHAR Everyone[] = { 'E','v','e','r','y','o','n','e',0 };
|
||||
@@ -1185,7 +1185,10 @@ LookupAccountSidW(
|
||||
ac = Domain_Admins;
|
||||
break;
|
||||
case DOMAIN_GROUP_RID_USERS:
|
||||
- ac = Domain_Users;
|
||||
+ /* MSDN says the name of DOMAIN_GROUP_RID_USERS is Domain Users,
|
||||
+ * tests show that MSDN seems to be wrong. */
|
||||
+ ac = None;
|
||||
+ use = 2;
|
||||
break;
|
||||
case DOMAIN_GROUP_RID_GUESTS:
|
||||
ac = Domain_Guests;
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 5f65ed385dd..a9d745cfe39 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -3003,11 +3003,11 @@ static void test_process_security(void)
|
||||
dom_size = sizeof(domain);
|
||||
ret = LookupAccountSidA( NULL, UsersSid, account, &acc_size, domain, &dom_size, &use );
|
||||
ok(ret, "LookupAccountSid failed with %d\n", ret);
|
||||
- todo_wine ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
|
||||
+ ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use);
|
||||
if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH)
|
||||
skip("Non-English locale (test with hardcoded 'None')\n");
|
||||
else
|
||||
- todo_wine ok(!strcmp(account, "None"), "expect None, got %s\n", account);
|
||||
+ ok(!strcmp(account, "None"), "expect None, got %s\n", account);
|
||||
|
||||
res = GetTokenInformation( token, TokenUser, NULL, 0, &size );
|
||||
ok(!res, "Expected failure, got %d\n", res);
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,3 +0,0 @@
|
||||
# Originally sent 2015 April by Qian Hong, apparently dropped off the list:
|
||||
# <https://www.winehq.org/pipermail/wine-patches/2015-April/138515.html>
|
||||
# Some of the patches were labeled as for Cygwin.
|
@@ -1,15 +1,16 @@
|
||||
From ba50fc98ee4690e62899d48efc856c2bc910536c Mon Sep 17 00:00:00 2001
|
||||
From 8044f571b7e674ce9e562488864d48646a9c7b88 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 01:25:02 +0200
|
||||
Subject: advapi32/tests: Extend security label / token integrity tests.
|
||||
Subject: [PATCH] advapi32/tests: Extend security label / token integrity
|
||||
tests.
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/Makefile.in | 2 +-
|
||||
dlls/advapi32/tests/security.c | 389 +++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/advapi32/tests/security.c | 389 +++++++++++++++++++++++++++++++-
|
||||
2 files changed, 387 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/Makefile.in b/dlls/advapi32/tests/Makefile.in
|
||||
index 36ce031ef62..4437e6e5de7 100644
|
||||
index 12583e59f57..caee5fae308 100644
|
||||
--- a/dlls/advapi32/tests/Makefile.in
|
||||
+++ b/dlls/advapi32/tests/Makefile.in
|
||||
@@ -1,5 +1,5 @@
|
||||
@@ -20,10 +21,10 @@ index 36ce031ef62..4437e6e5de7 100644
|
||||
C_SRCS = \
|
||||
cred.c \
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 0fd41fe82fa..4a03db27e69 100644
|
||||
index a736dbffd22..4529469d932 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -7191,13 +7191,19 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7034,13 +7034,19 @@ static void test_token_security_descriptor(void)
|
||||
{
|
||||
static SID low_level = {SID_REVISION, 1, {SECURITY_MANDATORY_LABEL_AUTHORITY},
|
||||
{SECURITY_MANDATORY_LOW_RID}};
|
||||
@@ -46,7 +47,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
PROCESS_INFORMATION info;
|
||||
DWORD size, index, retd;
|
||||
ACCESS_ALLOWED_ACE *ace;
|
||||
@@ -7347,6 +7353,185 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7190,6 +7196,185 @@ static void test_token_security_descriptor(void)
|
||||
/* The security label is also not inherited */
|
||||
if (pAddMandatoryAce)
|
||||
{
|
||||
@@ -103,7 +104,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -165,7 +166,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -215,7 +216,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -232,7 +233,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
ret = InitializeAcl(acl, 256, ACL_REVISION);
|
||||
ok(ret, "InitializeAcl failed with error %u\n", GetLastError());
|
||||
|
||||
@@ -7362,6 +7547,90 @@ static void test_token_security_descriptor(void)
|
||||
@@ -7205,6 +7390,90 @@ static void test_token_security_descriptor(void)
|
||||
|
||||
ret = SetKernelObjectSecurity(token, LABEL_SECURITY_INFORMATION, sd);
|
||||
ok(ret, "SetKernelObjectSecurity failed with error %u\n", GetLastError());
|
||||
@@ -272,7 +273,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -310,7 +311,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+
|
||||
+ if (sacl)
|
||||
+ {
|
||||
+ ret = pGetAce(sacl, 0, (void **)&ace);
|
||||
+ ret = GetAce(sacl, 0, (void **)&ace);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace->Header.AceType);
|
||||
@@ -323,7 +324,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
}
|
||||
else
|
||||
win_skip("SYSTEM_MANDATORY_LABEL not supported\n");
|
||||
@@ -7467,6 +7736,116 @@ static void test_child_token_sd(void)
|
||||
@@ -7312,6 +7581,116 @@ static void test_child_token_sd(void)
|
||||
HeapFree(GetProcessHeap(), 0, sd);
|
||||
}
|
||||
|
||||
@@ -366,7 +367,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+ ok(acl && acl != (void *)0xdeadbeef, "Got invalid SACL\n");
|
||||
+ ok(!defaulted, "SACL defaulted\n");
|
||||
+ ok(acl->AceCount == 1, "Expected exactly one ACE\n");
|
||||
+ ret = pGetAce(acl, 0, (void **)&ace_label);
|
||||
+ ret = GetAce(acl, 0, (void **)&ace_label);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace_label->Header.AceType);
|
||||
@@ -421,7 +422,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
+ ok(acl && acl != (void *)0xdeadbeef, "Got invalid SACL\n");
|
||||
+ ok(!defaulted, "SACL defaulted\n");
|
||||
+ ok(acl->AceCount == 1, "Expected exactly one ACE\n");
|
||||
+ ret = pGetAce(acl, 0, (void **)&ace_label);
|
||||
+ ret = GetAce(acl, 0, (void **)&ace_label);
|
||||
+ ok(ret, "GetAce failed with error %u\n", GetLastError());
|
||||
+ ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
|
||||
+ "Unexpected ACE type %#x\n", ace_label->Header.AceType);
|
||||
@@ -440,7 +441,7 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
static void test_GetExplicitEntriesFromAclW(void)
|
||||
{
|
||||
static const WCHAR wszCurrentUser[] = { 'C','U','R','R','E','N','T','_','U','S','E','R','\0'};
|
||||
@@ -7653,6 +8032,10 @@ START_TEST(security)
|
||||
@@ -7571,6 +7950,10 @@ START_TEST(security)
|
||||
{
|
||||
if (!strcmp(myARGV[2], "test_token_sd"))
|
||||
test_child_token_sd();
|
||||
@@ -452,5 +453,5 @@ index 0fd41fe82fa..4a03db27e69 100644
|
||||
test_process_security_child();
|
||||
return;
|
||||
--
|
||||
2.13.1
|
||||
2.17.1
|
||||
|
||||
|
@@ -1,2 +1 @@
|
||||
Fixes: [18154] cmd: Support for launching programs based on file association
|
||||
# Fixes: [36646]
|
||||
|
@@ -1,105 +0,0 @@
|
||||
From 61b96f3dab24d3aec26237c8760d75f964474bc5 Mon Sep 17 00:00:00 2001
|
||||
From: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
Date: Mon, 8 Apr 2019 17:06:58 +0200
|
||||
Subject: [PATCH 2/2] combase: Add GetRestrictedErrorInfo and
|
||||
RoOriginateLanguageException stubs.
|
||||
|
||||
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
|
||||
---
|
||||
.../api-ms-win-core-winrt-error-l1-1-0.spec | 2 +-
|
||||
.../api-ms-win-core-winrt-error-l1-1-1.spec | 4 ++--
|
||||
dlls/combase/combase.spec | 4 ++--
|
||||
dlls/combase/roapi.c | 19 +++++++++++++++++++
|
||||
4 files changed, 24 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/api-ms-win-core-winrt-error-l1-1-0/api-ms-win-core-winrt-error-l1-1-0.spec b/dlls/api-ms-win-core-winrt-error-l1-1-0/api-ms-win-core-winrt-error-l1-1-0.spec
|
||||
index de0a6d8..99f1ca3 100644
|
||||
--- a/dlls/api-ms-win-core-winrt-error-l1-1-0/api-ms-win-core-winrt-error-l1-1-0.spec
|
||||
+++ b/dlls/api-ms-win-core-winrt-error-l1-1-0/api-ms-win-core-winrt-error-l1-1-0.spec
|
||||
@@ -1,4 +1,4 @@
|
||||
-@ stub GetRestrictedErrorInfo
|
||||
+@ stdcall GetRestrictedErrorInfo(ptr) combase.GetRestrictedErrorInfo
|
||||
@ stub RoCaptureErrorContext
|
||||
@ stub RoFailFastWithErrorContext
|
||||
@ stub RoGetErrorReportingFlags
|
||||
diff --git a/dlls/api-ms-win-core-winrt-error-l1-1-1/api-ms-win-core-winrt-error-l1-1-1.spec b/dlls/api-ms-win-core-winrt-error-l1-1-1/api-ms-win-core-winrt-error-l1-1-1.spec
|
||||
index b1ad813..0b390f1 100644
|
||||
--- a/dlls/api-ms-win-core-winrt-error-l1-1-1/api-ms-win-core-winrt-error-l1-1-1.spec
|
||||
+++ b/dlls/api-ms-win-core-winrt-error-l1-1-1/api-ms-win-core-winrt-error-l1-1-1.spec
|
||||
@@ -1,4 +1,4 @@
|
||||
-@ stub GetRestrictedErrorInfo
|
||||
+@ stdcall GetRestrictedErrorInfo(ptr) combase.GetRestrictedErrorInfo
|
||||
@ stub IsErrorPropagationEnabled
|
||||
@ stub RoCaptureErrorContext
|
||||
@ stub RoClearError
|
||||
@@ -9,7 +9,7 @@
|
||||
@ stub RoInspectThreadErrorInfo
|
||||
@ stub RoOriginateError
|
||||
@ stub RoOriginateErrorW
|
||||
-@ stub RoOriginateLanguageException
|
||||
+@ stdcall RoOriginateLanguageException(long ptr ptr) combase.RoOriginateLanguageException
|
||||
@ stub RoReportFailedDelegate
|
||||
@ stub RoReportUnhandledError
|
||||
@ stub RoResolveRestrictedErrorInfoReference
|
||||
diff --git a/dlls/combase/combase.spec b/dlls/combase/combase.spec
|
||||
index 93575d5..f67527a 100644
|
||||
--- a/dlls/combase/combase.spec
|
||||
+++ b/dlls/combase/combase.spec
|
||||
@@ -180,7 +180,7 @@
|
||||
@ stub GetFuncDescs
|
||||
@ stdcall GetHGlobalFromStream(ptr ptr) ole32.GetHGlobalFromStream
|
||||
@ stub GetHookInterface
|
||||
-@ stub GetRestrictedErrorInfo
|
||||
+@ stdcall GetRestrictedErrorInfo(ptr)
|
||||
@ stub HSTRING_UserFree
|
||||
@ stub HSTRING_UserFree64
|
||||
@ stub HSTRING_UserMarshal
|
||||
@@ -260,7 +260,7 @@
|
||||
@ stub RoInspectThreadErrorInfo
|
||||
@ stub RoOriginateError
|
||||
@ stub RoOriginateErrorW
|
||||
-@ stub RoOriginateLanguageException
|
||||
+@ stdcall RoOriginateLanguageException(long ptr ptr)
|
||||
@ stub RoParameterizedTypeExtraGetTypeSignature
|
||||
@ stdcall RoRegisterActivationFactories(ptr ptr long ptr)
|
||||
@ stdcall RoRegisterForApartmentShutdown(ptr ptr ptr)
|
||||
diff --git a/dlls/combase/roapi.c b/dlls/combase/roapi.c
|
||||
index c9fe80f..2a6dcdf 100644
|
||||
--- a/dlls/combase/roapi.c
|
||||
+++ b/dlls/combase/roapi.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "initguid.h"
|
||||
#include "roapi.h"
|
||||
#include "roparameterizediid.h"
|
||||
+#include "restrictederrorinfo.h"
|
||||
#include "winstring.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
@@ -276,6 +277,24 @@ HRESULT WINAPI RoRegisterActivationFactories(HSTRING *classes, PFNGETACTIVATIONF
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
+ * GetRestrictedErrorInfo (combase.@)
|
||||
+ */
|
||||
+HRESULT WINAPI GetRestrictedErrorInfo( IRestrictedErrorInfo **info )
|
||||
+{
|
||||
+ FIXME( "(%p)\n", info );
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * RoOriginateLanguageException (combase.@)
|
||||
+ */
|
||||
+BOOL WINAPI RoOriginateLanguageException( HRESULT error, HSTRING message, IUnknown *language_exception )
|
||||
+{
|
||||
+ FIXME("(%x %s %p) stub\n", error, debugstr_hstring(message), language_exception);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
* CleanupTlsOleState (combase.@)
|
||||
*/
|
||||
void WINAPI CleanupTlsOleState(void *unknown)
|
||||
--
|
||||
1.9.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [46972] combase: Add GetRestrictedErrorInfo/RoOriginateLanguageException stubs.
|
@@ -56,57 +56,6 @@ index 56e2563..a35f5f2 100644
|
||||
|
||||
if (subitemstage & CDRF_NOTIFYPOSTPAINT)
|
||||
subitemstage = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPOSTPAINT, &nmlvcd);
|
||||
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
|
||||
index ec87e3b..eb4db0e 100644
|
||||
--- a/dlls/comctl32/tests/listview.c
|
||||
+++ b/dlls/comctl32/tests/listview.c
|
||||
@@ -1830,12 +1830,16 @@ static LRESULT WINAPI cd_wndproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||
clr = GetBkColor(nmlvcd->nmcd.hdc);
|
||||
ok(nmlvcd->clrTextBk == CLR_DEFAULT, "got 0x%x\n", nmlvcd->clrTextBk);
|
||||
ok(nmlvcd->clrText == RGB(0, 255, 0), "got 0x%x\n", nmlvcd->clrText);
|
||||
- todo_wine_if(nmlvcd->iSubItem)
|
||||
- ok(clr == c0ffee, "clr=%.8x\n", clr);
|
||||
+ if (!(GetWindowLongW(nmhdr->hwndFrom, GWL_STYLE) & LVS_SHOWSELALWAYS))
|
||||
+ {
|
||||
+ todo_wine_if(nmlvcd->iSubItem)
|
||||
+ ok(clr == c0ffee, "clr=%.8x\n", clr);
|
||||
+ }
|
||||
return CDRF_NOTIFYPOSTPAINT;
|
||||
case CDDS_ITEMPOSTPAINT | CDDS_SUBITEM:
|
||||
clr = GetBkColor(nmlvcd->nmcd.hdc);
|
||||
- todo_wine ok(clr == c0ffee, "clr=%.8x\n", clr);
|
||||
+ if (!(GetWindowLongW(nmhdr->hwndFrom, GWL_STYLE) & LVS_SHOWSELALWAYS))
|
||||
+ todo_wine ok(clr == c0ffee, "clr=%.8x\n", clr);
|
||||
ok(nmlvcd->clrTextBk == CLR_DEFAULT, "got 0x%x\n", nmlvcd->clrTextBk);
|
||||
ok(nmlvcd->clrText == RGB(0, 255, 0), "got 0x%x\n", nmlvcd->clrText);
|
||||
return CDRF_DODEFAULT;
|
||||
@@ -1851,6 +1855,7 @@ static void test_customdraw(void)
|
||||
{
|
||||
HWND hwnd;
|
||||
WNDPROC oldwndproc;
|
||||
+ LVITEMA item;
|
||||
|
||||
hwnd = create_listview_control(LVS_REPORT);
|
||||
|
||||
@@ -1870,6 +1875,18 @@ static void test_customdraw(void)
|
||||
UpdateWindow(hwnd);
|
||||
ok_sequence(sequences, PARENT_CD_SEQ_INDEX, parent_report_cd_seq, "parent customdraw, LVS_REPORT", FALSE);
|
||||
|
||||
+ /* check colors when item is selected */
|
||||
+ SetWindowLongW(hwnd, GWL_STYLE, GetWindowLongW(hwnd, GWL_STYLE) | LVS_SHOWSELALWAYS);
|
||||
+ item.mask = LVIF_STATE;
|
||||
+ item.stateMask = LVIS_SELECTED;
|
||||
+ item.state = LVIS_SELECTED;
|
||||
+ SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)&item);
|
||||
+
|
||||
+ flush_sequences(sequences, NUM_MSG_SEQUENCES);
|
||||
+ InvalidateRect(hwnd, NULL, TRUE);
|
||||
+ UpdateWindow(hwnd);
|
||||
+ ok_sequence(sequences, PARENT_CD_SEQ_INDEX, parent_report_cd_seq, "parent customdraw, LVS_REPORT, selection", FALSE);
|
||||
+
|
||||
DestroyWindow(hwnd);
|
||||
|
||||
hwnd = create_listview_control(LVS_LIST);
|
||||
--
|
||||
2.9.0
|
||||
|
||||
|
@@ -1,251 +0,0 @@
|
||||
From ebbaf56bdb75f853dafdbbffba81233784ecb618 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Sat, 4 May 2019 18:21:05 +0800
|
||||
Subject: [PATCH 1/2] comctl32: Switch to using a structure for extra storage.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
These patches aim to fix the bug 47018.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/comctl32/static.c | 92 ++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 76 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
|
||||
index 5cc02ced97..d08710c06f 100644
|
||||
--- a/dlls/comctl32/static.c
|
||||
+++ b/dlls/comctl32/static.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "winuser.h"
|
||||
#include "commctrl.h"
|
||||
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
#include "comctl32.h"
|
||||
@@ -50,10 +51,16 @@ static void STATIC_PaintBitmapfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintEnhMetafn( HWND hwnd, HDC hdc, DWORD style );
|
||||
static void STATIC_PaintEtchedfn( HWND hwnd, HDC hdc, DWORD style );
|
||||
|
||||
-/* offsets for GetWindowLong for static private information */
|
||||
-#define HFONT_GWL_OFFSET 0
|
||||
-#define HICON_GWL_OFFSET (sizeof(HFONT))
|
||||
-#define STATIC_EXTRA_BYTES (HICON_GWL_OFFSET + sizeof(HICON))
|
||||
+struct static_extra_info
|
||||
+{
|
||||
+ HFONT hfont;
|
||||
+ union
|
||||
+ {
|
||||
+ HICON hicon;
|
||||
+ HBITMAP hbitmap;
|
||||
+ HENHMETAFILE hemf;
|
||||
+ } image;
|
||||
+};
|
||||
|
||||
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
|
||||
|
||||
@@ -80,6 +87,18 @@ static const pfPaint staticPaintFunc[SS_TYPEMASK+1] =
|
||||
STATIC_PaintEtchedfn, /* SS_ETCHEDFRAME */
|
||||
};
|
||||
|
||||
+static struct static_extra_info *get_extra_ptr( HWND hwnd, BOOL force )
|
||||
+{
|
||||
+ struct static_extra_info *extra = (struct static_extra_info *)GetWindowLongPtrW( hwnd, 0 );
|
||||
+ if (!extra && force)
|
||||
+ {
|
||||
+ extra = heap_alloc_zero( sizeof(*extra) );
|
||||
+ if (extra)
|
||||
+ SetWindowLongPtrW( hwnd, 0, (ULONG_PTR)extra );
|
||||
+ }
|
||||
+ return extra;
|
||||
+}
|
||||
+
|
||||
static BOOL get_icon_size( HICON handle, SIZE *size )
|
||||
{
|
||||
ICONINFO info;
|
||||
@@ -111,6 +130,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
{
|
||||
HICON prevIcon;
|
||||
SIZE size;
|
||||
+ struct static_extra_info *extra;
|
||||
|
||||
if ((style & SS_TYPEMASK) != SS_ICON) return 0;
|
||||
if (hicon && !get_icon_size( hicon, &size ))
|
||||
@@ -118,7 +138,12 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
WARN("hicon != 0, but invalid\n");
|
||||
return 0;
|
||||
}
|
||||
- prevIcon = (HICON)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hicon );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (!extra) return 0;
|
||||
+
|
||||
+ prevIcon = extra->image.hicon;
|
||||
+ extra->image.hicon = hicon;
|
||||
if (hicon && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
|
||||
{
|
||||
/* Windows currently doesn't implement SS_RIGHTJUST */
|
||||
@@ -146,6 +171,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
{
|
||||
HBITMAP hOldBitmap;
|
||||
+ struct static_extra_info *extra;
|
||||
|
||||
if ((style & SS_TYPEMASK) != SS_BITMAP) return 0;
|
||||
if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP)
|
||||
@@ -153,7 +179,12 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
WARN("hBitmap != 0, but it's not a bitmap\n");
|
||||
return 0;
|
||||
}
|
||||
- hOldBitmap = (HBITMAP)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hBitmap );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (!extra) return 0;
|
||||
+
|
||||
+ hOldBitmap = extra->image.hbitmap;
|
||||
+ extra->image.hbitmap = hBitmap;
|
||||
if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
|
||||
{
|
||||
BITMAP bm;
|
||||
@@ -183,13 +214,23 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
*/
|
||||
static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile, DWORD style )
|
||||
{
|
||||
+ HENHMETAFILE old_hemf;
|
||||
+ struct static_extra_info *extra;
|
||||
+
|
||||
if ((style & SS_TYPEMASK) != SS_ENHMETAFILE) return 0;
|
||||
if (hEnhMetaFile && GetObjectType(hEnhMetaFile) != OBJ_ENHMETAFILE)
|
||||
{
|
||||
WARN("hEnhMetaFile != 0, but it's not an enhanced metafile\n");
|
||||
return 0;
|
||||
}
|
||||
- return (HENHMETAFILE)SetWindowLongPtrW( hwnd, HICON_GWL_OFFSET, (LONG_PTR)hEnhMetaFile );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (!extra) return 0;
|
||||
+
|
||||
+ old_hemf = extra->image.hemf;
|
||||
+ extra->image.hemf = hEnhMetaFile;
|
||||
+
|
||||
+ return old_hemf;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -200,6 +241,8 @@ static HENHMETAFILE STATIC_SetEnhMetaFile( HWND hwnd, HENHMETAFILE hEnhMetaFile,
|
||||
*/
|
||||
static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
|
||||
{
|
||||
+ struct static_extra_info *extra;
|
||||
+
|
||||
switch (style & SS_TYPEMASK)
|
||||
{
|
||||
case SS_ICON:
|
||||
@@ -215,7 +258,22 @@ static HANDLE STATIC_GetImage( HWND hwnd, WPARAM wParam, DWORD style )
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
- return (HANDLE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
|
||||
+
|
||||
+ extra = get_extra_ptr( hwnd, FALSE );
|
||||
+ return extra ? extra->image.hbitmap : 0;
|
||||
+}
|
||||
+
|
||||
+static void STATIC_SetFont( HWND hwnd, HFONT hfont )
|
||||
+{
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, TRUE );
|
||||
+ if (extra)
|
||||
+ extra->hfont = hfont;
|
||||
+}
|
||||
+
|
||||
+static HFONT STATIC_GetFont( HWND hwnd )
|
||||
+{
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
+ return extra ? extra->hfont : 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -327,6 +385,8 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
case WM_NCDESTROY:
|
||||
if (style == SS_ICON)
|
||||
{
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
+ heap_free( extra );
|
||||
/*
|
||||
* FIXME
|
||||
* DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
|
||||
@@ -423,14 +483,14 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
case WM_SETFONT:
|
||||
if (hasTextStyle( full_style ))
|
||||
{
|
||||
- SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, wParam );
|
||||
+ STATIC_SetFont( hwnd, (HFONT)wParam );
|
||||
if (LOWORD(lParam))
|
||||
RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN );
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_GETFONT:
|
||||
- return GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
|
||||
+ return (LRESULT)STATIC_GetFont( hwnd );
|
||||
|
||||
case WM_NCHITTEST:
|
||||
if (full_style & SS_NOTIFY)
|
||||
@@ -508,7 +568,7 @@ static void STATIC_PaintOwnerDrawfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
dis.itemData = 0;
|
||||
GetClientRect( hwnd, &dis.rcItem );
|
||||
|
||||
- font = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
|
||||
+ font = STATIC_GetFont( hwnd );
|
||||
if (font) oldFont = SelectObject( hdc, font );
|
||||
SendMessageW( GetParent(hwnd), WM_CTLCOLORSTATIC, (WPARAM)hdc, (LPARAM)hwnd );
|
||||
SendMessageW( GetParent(hwnd), WM_DRAWITEM, id, (LPARAM)&dis );
|
||||
@@ -572,7 +632,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
format |= DT_SINGLELINE | DT_WORD_ELLIPSIS;
|
||||
}
|
||||
|
||||
- if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET )))
|
||||
+ if ((hFont = STATIC_GetFont( hwnd )))
|
||||
hOldFont = SelectObject( hdc, hFont );
|
||||
|
||||
/* SS_SIMPLE controls: WM_CTLCOLORSTATIC is sent, but the returned
|
||||
@@ -668,7 +728,7 @@ static void STATIC_PaintIconfn( HWND hwnd, HDC hdc, DWORD style )
|
||||
|
||||
GetClientRect( hwnd, &rc );
|
||||
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||
- hIcon = (HICON)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET );
|
||||
+ hIcon = STATIC_GetImage( hwnd, IMAGE_ICON, style );
|
||||
if (!hIcon || !get_icon_size( hIcon, &size ))
|
||||
{
|
||||
FillRect(hdc, &rc, hbrush);
|
||||
@@ -698,7 +758,7 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
|
||||
|
||||
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||
|
||||
- if ((hBitmap = (HBITMAP)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET ))
|
||||
+ if ((hBitmap = STATIC_GetImage( hwnd, IMAGE_BITMAP, style ))
|
||||
&& (GetObjectType(hBitmap) == OBJ_BITMAP)
|
||||
&& (hMemDC = CreateCompatibleDC( hdc )))
|
||||
{
|
||||
@@ -742,7 +802,7 @@ static void STATIC_PaintEnhMetafn(HWND hwnd, HDC hdc, DWORD style )
|
||||
GetClientRect(hwnd, &rc);
|
||||
hbrush = STATIC_SendWmCtlColorStatic(hwnd, hdc);
|
||||
FillRect(hdc, &rc, hbrush);
|
||||
- if ((hEnhMetaFile = (HENHMETAFILE)GetWindowLongPtrW( hwnd, HICON_GWL_OFFSET )))
|
||||
+ if ((hEnhMetaFile = STATIC_GetImage( hwnd, IMAGE_ENHMETAFILE, style )))
|
||||
{
|
||||
/* The control's current font is not selected into the
|
||||
device context! */
|
||||
@@ -779,7 +839,7 @@ void STATIC_Register(void)
|
||||
wndClass.style = CS_DBLCLKS | CS_PARENTDC | CS_GLOBALCLASS;
|
||||
wndClass.lpfnWndProc = STATIC_WindowProc;
|
||||
wndClass.cbClsExtra = 0;
|
||||
- wndClass.cbWndExtra = STATIC_EXTRA_BYTES;
|
||||
+ wndClass.cbWndExtra = sizeof(struct static_extra_info *);
|
||||
wndClass.hCursor = LoadCursorW(0, (LPWSTR)IDC_ARROW);
|
||||
wndClass.hbrBackground = NULL;
|
||||
wndClass.lpszClassName = WC_STATICW;
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1,152 +0,0 @@
|
||||
From 334262255a66b05a852c90ebc722815b8a0eb7e9 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Sat, 4 May 2019 19:46:35 +0800
|
||||
Subject: [PATCH 2/2] comctl32: Paint 32-bpp bitmaps with an alpha channel
|
||||
using GdiAlphaBlend.
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
To: wine-devel@winehq.org
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/comctl32/static.c | 83 ++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 79 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
|
||||
index d08710c06f..fe566645d3 100644
|
||||
--- a/dlls/comctl32/static.c
|
||||
+++ b/dlls/comctl32/static.c
|
||||
@@ -60,6 +60,7 @@ struct static_extra_info
|
||||
HBITMAP hbitmap;
|
||||
HENHMETAFILE hemf;
|
||||
} image;
|
||||
+ BOOL image_has_alpha;
|
||||
};
|
||||
|
||||
typedef void (*pfPaint)( HWND hwnd, HDC hdc, DWORD style );
|
||||
@@ -163,6 +164,56 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
return prevIcon;
|
||||
}
|
||||
|
||||
+static HBITMAP create_alpha_bitmap( HBITMAP hbitmap )
|
||||
+{
|
||||
+ HBITMAP alpha = 0;
|
||||
+ BITMAPINFO *info = NULL;
|
||||
+ BITMAP bm;
|
||||
+ HDC src, dst;
|
||||
+ void *bits;
|
||||
+ DWORD i;
|
||||
+ const unsigned char *ptr;
|
||||
+ BOOL has_alpha = FALSE;
|
||||
+
|
||||
+ if (!GetObjectW( hbitmap, sizeof(bm), &bm )) return 0;
|
||||
+ if (bm.bmBitsPixel != 32) return 0;
|
||||
+
|
||||
+ if (!(src = CreateCompatibleDC( 0 ))) return 0;
|
||||
+ if (!(dst = CreateCompatibleDC( src ))) goto done;
|
||||
+ if (!(info = HeapAlloc( GetProcessHeap(), 0, FIELD_OFFSET( BITMAPINFO, bmiColors[256] )))) goto done;
|
||||
+ info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
+ info->bmiHeader.biWidth = bm.bmWidth;
|
||||
+ info->bmiHeader.biHeight = -bm.bmHeight;
|
||||
+ info->bmiHeader.biPlanes = 1;
|
||||
+ info->bmiHeader.biBitCount = 32;
|
||||
+ info->bmiHeader.biCompression = BI_RGB;
|
||||
+ info->bmiHeader.biSizeImage = bm.bmWidth * bm.bmHeight * 4;
|
||||
+ info->bmiHeader.biXPelsPerMeter = 0;
|
||||
+ info->bmiHeader.biYPelsPerMeter = 0;
|
||||
+ info->bmiHeader.biClrUsed = 0;
|
||||
+ info->bmiHeader.biClrImportant = 0;
|
||||
+ if (!(alpha = CreateDIBSection( dst, info, DIB_RGB_COLORS, &bits, NULL, 0 ))) goto done;
|
||||
+
|
||||
+ SelectObject( src, hbitmap );
|
||||
+ SelectObject( dst, alpha );
|
||||
+ BitBlt(dst, 0, 0, bm.bmWidth, bm.bmHeight, src, 0, 0, SRCCOPY);
|
||||
+
|
||||
+ for (i = 0, ptr = bits; i < bm.bmWidth * bm.bmHeight; i++, ptr += 4)
|
||||
+ if ((has_alpha = (ptr[3] != 0))) break;
|
||||
+
|
||||
+done:
|
||||
+ DeleteDC( src );
|
||||
+ DeleteDC( dst );
|
||||
+ HeapFree( GetProcessHeap(), 0, info );
|
||||
+
|
||||
+ if (!has_alpha)
|
||||
+ {
|
||||
+ DeleteObject( alpha );
|
||||
+ alpha = 0;
|
||||
+ }
|
||||
+ return alpha;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* STATIC_SetBitmap
|
||||
*
|
||||
@@ -170,7 +221,7 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
|
||||
*/
|
||||
static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
{
|
||||
- HBITMAP hOldBitmap;
|
||||
+ HBITMAP hOldBitmap, alpha;
|
||||
struct static_extra_info *extra;
|
||||
|
||||
if ((style & SS_TYPEMASK) != SS_BITMAP) return 0;
|
||||
@@ -184,7 +235,18 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
|
||||
if (!extra) return 0;
|
||||
|
||||
hOldBitmap = extra->image.hbitmap;
|
||||
- extra->image.hbitmap = hBitmap;
|
||||
+ alpha = create_alpha_bitmap( hBitmap );
|
||||
+ if (alpha)
|
||||
+ {
|
||||
+ extra->image.hbitmap = alpha;
|
||||
+ extra->image_has_alpha = TRUE;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ extra->image.hbitmap = hBitmap;
|
||||
+ extra->image_has_alpha = FALSE;
|
||||
+ }
|
||||
+
|
||||
if (hBitmap && !(style & SS_CENTERIMAGE) && !(style & SS_REALSIZECONTROL))
|
||||
{
|
||||
BITMAP bm;
|
||||
@@ -386,7 +448,12 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
if (style == SS_ICON)
|
||||
{
|
||||
struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
- heap_free( extra );
|
||||
+ if (extra)
|
||||
+ {
|
||||
+ if (extra->image_has_alpha)
|
||||
+ DeleteObject( extra->image.hbitmap );
|
||||
+ heap_free( extra );
|
||||
+ }
|
||||
/*
|
||||
* FIXME
|
||||
* DestroyIcon32( STATIC_SetIcon( wndPtr, 0 ) );
|
||||
@@ -765,6 +832,8 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
|
||||
BITMAP bm;
|
||||
RECT rcClient;
|
||||
LOGBRUSH brush;
|
||||
+ BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
|
||||
+ struct static_extra_info *extra = get_extra_ptr( hwnd, FALSE );
|
||||
|
||||
GetObjectW(hBitmap, sizeof(bm), &bm);
|
||||
oldbitmap = SelectObject(hMemDC, hBitmap);
|
||||
@@ -785,7 +854,13 @@ static void STATIC_PaintBitmapfn(HWND hwnd, HDC hdc, DWORD style )
|
||||
rcClient.right = rcClient.left + bm.bmWidth;
|
||||
rcClient.bottom = rcClient.top + bm.bmHeight;
|
||||
}
|
||||
- StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
|
||||
+
|
||||
+ if (extra->image_has_alpha)
|
||||
+ GdiAlphaBlend(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
|
||||
+ rcClient.bottom - rcClient.top, hMemDC,
|
||||
+ 0, 0, bm.bmWidth, bm.bmHeight, blend);
|
||||
+ else
|
||||
+ StretchBlt(hdc, rcClient.left, rcClient.top, rcClient.right - rcClient.left,
|
||||
rcClient.bottom - rcClient.top, hMemDC,
|
||||
0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
|
||||
SelectObject(hMemDC, oldbitmap);
|
||||
--
|
||||
2.20.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [47018] Paint 32-bpp bitmaps with an alpha channel using GdiAlphaBlend
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user