[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/osx
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jan 15 15:10:14 UTC 2021
vcl/osx/saldata.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 36e47b136058867800b1b1afb5c1e3553674d7b6
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Jan 11 11:57:04 2021 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Jan 15 16:09:37 2021 +0100
Avoid assertion failure related to cursor sizes on macOS
No idea why this assertion failure started to show up now (at least
when viewing a presentation slide show). Anyway, apparently the code
needs to handle 256x256 cursors, too, and not just 128x128 and 32x32
ones. Apparently the assertion failure is caused by
icon-themes/colibre/vcl/res/null.png.
Sadly I don't really understand the code around here, but this commit
gets rid of the assertion failure, and that is good enough for me for
now.
This problem was reported in a comment in the otherwise unrelated
tdf#138122, and the assertion failure caused a hang, which is not
good, reported as tdf#139535. That general problem is not fixed by
this commit.
Change-Id: I1390f00e03e0766d54969d9d62311a55da8e8945
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109083
Tested-by: Tor Lillqvist <tml at collabora.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109370
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx
index 5235f657f8ca..7a9f7b42dcfe 100644
--- a/vcl/osx/saldata.cxx
+++ b/vcl/osx/saldata.cxx
@@ -248,10 +248,10 @@ NSCursor* SalData::getCursor( PointerStyle i_eStyle )
}
NSImage* theImage = load_icon_by_name(aIconName);
- assert ([theImage size].width == 128 || [theImage size].width == 32);
- if ([theImage size].width == 128)
+ assert ([theImage size].width == 256 || [theImage size].width == 128 || [theImage size].width == 32);
+ if ([theImage size].width == 256 || [theImage size].width == 128)
{
- // If we have a 128x128 image, generate scaled versions of it.
+ // If we have a 256x256 or 128x128 image, generate scaled versions of it.
// This will result in macOS picking a reasonably sized image for different screen dpi.
NSSize cursorSize = NSMakeSize(32,32);
NSImage *multiResImage = [[NSImage alloc] initWithSize:cursorSize];
More information about the Libreoffice-commits
mailing list