Bug 575425 - [GTK] Cursor has reversed source and mask images
Summary: [GTK] Cursor has reversed source and mask images
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.12   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.21 M3   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-16 02:15 EDT by Phil Beauvoir CLA
Modified: 2021-08-17 05:28 EDT (History)
1 user (show)

See Also:


Attachments
Snippets (2.17 KB, application/octet-stream)
2021-08-16 02:15 EDT, Phil Beauvoir CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Beauvoir CLA 2021-08-16 02:15:31 EDT
Created attachment 286948 [details]
Snippets

Run the attached Snippets on Windows and Mac. The cursors are rendered correctly from their source and mask images.

Now run the snippets on Linux GTK. The source and mask images are rendered reversed. This is seen more clearly in the "SnippetWithFiles" example. If you swap the source and mask images in Linux the cursor renders correctly.
Comment 1 Andrey Loskutov CLA 2021-08-16 07:01:13 EDT
I don't think this is a recent change, I see same drawing on 4.12.
Comment 2 Phil Beauvoir CLA 2021-08-16 07:10:51 EDT
(In reply to Andrey Loskutov from comment #1)
> I don't think this is a recent change, I see same drawing on 4.12.

I agree, I think it has been like this for some time.

It's a problem for tools that use Eclipse GEF, because the cursors used by GEF have a black background on Linux.
Comment 3 Eclipse Genie CLA 2021-08-16 07:38:15 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/184068
Comment 5 Phil Beauvoir CLA 2021-08-16 08:52:06 EDT
Thanks again for the fast fix!

Will test in next I build.
Comment 6 Phil Beauvoir CLA 2021-08-17 04:30:45 EDT
Verified fixed in Eclipse SDK 4.21.0.I20210816-1800, thanks!

Andrey - I originally came across this problem using the GEF 3.1 and its cursors which use GIF files[1].

On Linux, masking does not work if the source and mask images are in GIF format, but converting them to PNG works OK. Is this worth reporting as a new bug? If so, the attached snippet example is still valid if the image files are converted to GIF format.


[1] https://github.com/eclipse/gef-legacy/blob/master/org.eclipse.gef/src/org/eclipse/gef/SharedCursors.java
Comment 7 Andrey Loskutov CLA 2021-08-17 04:44:20 EDT
(In reply to Phil Beauvoir from comment #6)
> Verified fixed in Eclipse SDK 4.21.0.I20210816-1800, thanks!

Thank you! The bug was unnoticed for years now.

> Andrey - I originally came across this problem using the GEF 3.1 and its
> cursors which use GIF files[1].
> 
> On Linux, masking does not work if the source and mask images are in GIF
> format, but converting them to PNG works OK. Is this worth reporting as a
> new bug? If so, the attached snippet example is still valid if the image
> files are converted to GIF format.
> 
> 
> [1]
> https://github.com/eclipse/gef-legacy/blob/master/org.eclipse.gef/src/org/
> eclipse/gef/SharedCursors.java

Please report new bug, just to document the finding. I believe there are no resources to support this for now (I will not be able to work on it for sure).
Comment 8 Phil Beauvoir CLA 2021-08-17 05:28:25 EDT
(In reply to Andrey Loskutov from comment #7)
> 
> Please report new bug, just to document the finding. I believe there are no
> resources to support this for now (I will not be able to work on it for
> sure).

Understood.

I opened Bug 575448.