Alexandre Julliard
9f9441c9cf
user32: Use the bundled libpng.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-18 14:34:21 +02:00
Tim Clem
b4333216a7
user32: Load libpng in DllMain.
...
libpng is currently loaded on the first attempt to access a PNG icon
or cursor. That creates a race condition that can deadlock the loader
in certain circumstances if LoadIcon or LoadCursor is called while the
loader lock is held, e.g. from a DllMain.
Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 18:06:29 +02:00
Stefan Dösinger
efa52619af
user32: Delete info.hbmColor and hbmMask after copying.
...
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 20:49:27 +02:00
Stefan Dösinger
7ec5a7e1b6
user32: Release the icon frame in CopyImage.
...
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-10 20:49:27 +02:00
Zebediah Figura
d2259665b4
user32: Blit the right bitmap when stretching monochrome icons in CopyImage().
...
Fixes: beb70a79e1
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 09:30:05 +02:00
Zebediah Figura
5df5972f9a
user32: Reimplement CopyIcon() on top of CopyImage().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Zebediah Figura
beb70a79e1
user32: Implement stretching of cursor and icon objects in CopyImage().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Zebediah Figura
db2b266c57
user32: Handle monochrome icons in CreateIcon() and CreateCursor() instead of CreateIconIndirect().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Alexandre Julliard
9cc9236556
user32: Build with msvcrt.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 15:15:38 +02:00
Alexandre Julliard
148d3aa461
user32: Move PNG support to a new Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 15:15:36 +02:00
Alexandre Julliard
b88730d8af
user32: Use standard dlopen() instead of the libwine wrappers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:20 +02:00
Piotr Caban
cfa9334125
user32: Include png.h only if SONAME_LIBPNG is defined.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 22:20:22 +01:00
Matteo Bruni
aaecc40464
user32: Don't go past the end of the animated cursor data.
...
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 09:43:27 +02:00
Paul Gofman
bfe1ea26dd
user32: Select more appropriate stretch mode for colored images interpolation.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46375
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-05 17:29:57 +01:00
Fabian Maurer
400dd1596a
user32: LoadImage should not only search in the working directory.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46186
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-30 20:39:03 +01:00
Alexandre Julliard
8bca1b29cd
user32: Scale coordinates in ClipCursor() based on DPI awareness.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 14:20:11 +02:00
Dmitry Timoshkov
1f75f42642
user32: Create a mask from alpha channel when loading a 32 bpp icon.
...
This patch fixes applications that draw the 32 bpp icons manually.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 13:36:27 +02:00
Alexandre Julliard
b53d84b947
user32: Add support for loading 256x256 icons.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 20:46:01 +02:00
Alexandre Julliard
9dc886244b
user32: Ignore PNG icons instead of failing if we don't have libpng.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 20:46:01 +02:00
Alexandre Julliard
b1631d69da
user32: Try to load libpng only once.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 20:46:01 +02:00
Dmitry Timoshkov
728255cf2c
user32: Add support for PNG icons.
...
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 18:27:11 +02:00
Bernhard Übelacker
9256017adf
user32: Validate DIB offset in CURSORICON_GetFileEntry.
...
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 10:41:56 +01:00
Alexandre Julliard
e7e576d675
user32: Also user the thread-safe display DC in icon functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 12:30:22 +01:00
Alexandre Julliard
d0e8170c90
user32: Reduce the cursor height if it also includes the mask.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:30 +02:00
Alexandre Julliard
55d247ef13
user32: Match cursor size in priority over color depth.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-11 21:22:54 +02:00
Alexandre Julliard
b7e19e4a1a
user32: Implement LR_MONOCHROME for loading cursors.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:09 +02:00
Nikolay Sivov
393ec970c8
user32: Added a helper to get screen dc.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-07 16:19:21 -05:00
Alexandre Julliard
9a652e211c
user32: Synthesize bitmap clipboard formats on the user32 side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-07 11:36:24 +09:00
Michael Stefaniuc
07ada9a85b
user32: Use SetRect() instead of open coding it.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-19 19:59:30 +09:00
Jacek Caban
03b93eeeff
user32: Use proper types in ICO_GetIconDirectory.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-02 18:33:44 +09:00
Mark Jansen
e1f1a60f87
user32: Correctly determine bit count for BITMAPCOREINFO in is_dib_monochrome.
...
Signed-off-by: Mark Jansen <learn0more@gmail.com>
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-28 18:41:00 +09:00
Thomas Faber
6ad5cfbebd
user32: Handle BITMAPCOREINFO when loading icons.
...
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-28 18:40:59 +09:00
Alex Henrie
5b53c0b88b
user32: Avoid double initialization.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-06 21:59:08 +09:00
Alex Henrie
7bbcc766ef
user32: Pass num_steps=0 to alloc_icon_handle if is_ani=FALSE.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2015-10-06 22:17:57 +09:00
Alex Henrie
9c750bb956
user32: Remove unused parameter mask from create_alpha_bitmap.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2015-10-06 22:17:46 +09:00
Alex Henrie
be5015fb74
user32: Remove unused parameter istep from release_icon_frame.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2015-10-06 22:17:35 +09:00
Alex Henrie
a66f4e521c
user32: Remove unused variable ani_icon_data from release_icon_frame.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2015-10-02 18:11:30 +09:00
Alex Henrie
50403fec1e
user32: Replace release_icon_ptr with release_user_handle_ptr.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2015-10-02 18:11:30 +09:00
Sebastian Lackner
a9ff334976
user32: Fix invalid memory access and leak if alloc_user_handle fails (Coverity).
2015-03-17 14:52:08 +09:00
Bruno Jesus
da8bb1c4a5
user32: Allocate memory based on HICON instead of DWORD to fix 64 bit problems.
2015-01-19 16:02:10 +01:00
Frédéric Delanoy
762aef6613
user32: Use BOOL type where appropriate.
2013-11-20 11:26:30 +01:00
Alexandre Julliard
a897e13fba
user32: Get rid of the CreateCursorIcon driver entry point.
2013-10-22 10:25:44 +02:00
Alexandre Julliard
5bfc411ae7
user32: Constify pointers that point to read-only file data.
2013-03-28 17:36:54 +01:00
Alexandre Julliard
267109d6f1
user32: Add size checks when creating an icon from bitmap info.
2013-03-28 17:36:54 +01:00
Alexandre Julliard
550e53b6bb
user32: Prefer loading color cursors in LoadImage.
2013-02-12 13:56:41 +01:00
Daniel Jelinski
59e0d7af68
user32: Fix CopyImage implementation when changing cursor to icon.
2013-02-11 11:24:07 +01:00
Nikolay Sivov
4c24882e3e
user32: Accept BI_BITFIELDS format for icons when creating icons.
2013-01-24 10:48:02 +01:00
Michael Stefaniuc
8ab1fc5ff7
user32: Use FIELD_OFFSET to calculate the size of a struct with variable length array.
2012-10-24 12:01:48 +02:00
Michael Stefaniuc
7d4605db41
user32: Remove redundant sizeof check.
2012-10-24 12:01:45 +02:00
Alexandre Julliard
8ab65c222e
user32: Draw the mask with SRCCOPY in DrawIcon when the image isn't being drawn.
2012-02-08 11:00:51 -06:00