Skip to content

Fix for InitializeAsGuest for Mac #285

Closed
wants to merge 3 commits into from

3 participants

@HarlanHugh

These changes avoid the redundant call to NSApplication.Init() when running as guest, which causes the app to fail.

Changes to Application are needed because IsGuest does not get set properly because Application.InitializeAsGuest calls Initialize which calls Toolkit.Load with isGuest hardcoded to false.

@sevoku
Mono Project member
sevoku commented Jan 18, 2015

This looks correct to me. Could one of the Mac experts review this? Doesn't MD use Xwt in guest mode on Mac and why does it work there, if the initialization fails?

@sevoku sevoku added MAC bug labels Jan 18, 2015
@sevoku sevoku added the feedback label Jan 25, 2015
@sevoku sevoku added this to the v0.2 milestone Jan 30, 2015
@sevoku
Mono Project member
sevoku commented Feb 5, 2015

Update: I've looked into how MonoDevelop uses Xwt and it looks like its always using Gtk. The problem doesn't occur there, because Gtk.Application.Init () can be called more then once.

@slluis
Mono Project member
slluis commented Feb 5, 2015

This breaks MD. A similar patch was committed in the past and I had to revert. Using XWT.Mac as guest doesn't mean that Application.Init() has been called.

@slluis slluis closed this Feb 5, 2015
@sevoku
Mono Project member
sevoku commented Feb 5, 2015

Ah, ok ha forgot to look into the MacPlatform addin. So what would be the correct way to initialize Xwt in this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.