Canvas always Black in Mojave

Hello guys,

Any idea if the canvas was fixed in Mojave or what can I do to have it show properly ?

So I have a project where I use some canvases the Mohave has either Light or Dynamic set on Desktop and no matter what I do this is always black all over canvas is used.

I disabled Transparent , DoubleBuffer and still same issue. Any Ideas ?

Test Env MacOS 10.13.6 and I have no issues and OSX 10.14 and the issue is always there.

Build and tested on XOJO 2018R3

Snapshot in here

Thanks.

No issues here with Transparent = True.
I have an EraseBackground = True on macOS Projects, but i can’t remember why (and i did not comment this one in my Code…)
I use ImageSets created by PNG’s with Alpha Channel and i draw by myself as we did in the past.

Maybe your Project is corrupted? Tried with a new Project?

[quote=417044:@Sascha S]No issues here with Transparent = True.
I have an EraseBackground = True on macOS Projects, but i can’t remember why (and i did not comment this one in my Code…)
I use ImageSets created by PNG’s with Alpha Channel and i draw by myself as we did in the past.

Maybe your Project is corrupted? Tried with a new Project?[/quote]
Well it seems that doing a new project and putting just the Canvas in the project does not show that, so in this case how my project is corrupted and how I can fix this ? in one case I can just delete the old canvas and put another one but the rest I have to much for those , so you mean I have to redo the whole thing ?

Thanks.

I guess I forgot to mention, the Canvas is in a ContainerControl and most of them are

[quote=417044:@Sascha S]No issues here with Transparent = True.
I have an EraseBackground = True on macOS Projects, but i can’t remember why (and i did not comment this one in my Code…)
I use ImageSets created by PNG’s with Alpha Channel and i draw by myself as we did in the past.

Maybe your Project is corrupted? Tried with a new Project?[/quote]

Well so far on docs it says

[quote]It defaults to True for backwards compatibility.

This property is only used on Windows. Its setting has no effect on macOS or Linux.

If you set DoubleBuffer to True, then you should set EraseBackground to False. Otherwise, it will cause the Canvas to flicker.[/quote]

So I guess it’s not related to EraseBackground in this case.

Well so far I did all the tests I even replaced the canvas and always it’s black so no idea what other things to do, I guess I’ll have to wait for next XOJO release and maybe for next MacOS release maybe those together will fix the issue

If this is really the case, i don’t know how to fix it. But a corruption can happen in many ways. Drive failure, saved with new and very old versions of Xojo/RS/RB, stored in a Cloud Folder, … and so on.

If you can replicate the issue in a current Xojo, write a FB. If not, i hope others will chime in and offer other possible reasons and solutions.

It’s this, fixed & verified:
<https://xojo.com/issue/54046> - ClearRect cutting “holes” in window on Mojave when “Supports Dark Mode” is off.

[quote=417062:@Tim Parnell]It’s this, fixed & verified:
<https://xojo.com/issue/54046> - ClearRect cutting “holes” in window on Mojave when “Supports Dark Mode” is off.[/quote]
Well I guess it will be fixed in the next release so I’ll wait so far I cannot test .

Is the canvas super class “Canvas” or subclassed?

some super some subclassed, in both cases same thing happens

I have a “Paint” program I wrote years and years ago… I have not recompiled it in as many years…
But when I upgraded to Mojave, the program still works… EXCEPT for “transparent”… it becomes Black as well

Since this was written so long ago… it didn’t use Masks, or Alpha… but the older TRANSPARENT=1 method

guess its time to redesign and rewrite… since that is the one program I use the most often :slight_smile:

So it seems that on Super it works fine with R4 but on subclassed I still get the Black background if noting on it, if I start to draw on it whatever is already draw it will show ok, the rest will be Black, any ideas on how to fix this ?

Thanks .

ok , so Setting Erase Background to true and transparent to true it seems that it fixed the issue.

Thanks