Bug 39929 - Xwt.MessageDialog.RootWindow is not set
Summary: Xwt.MessageDialog.RootWindow is not set
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Blocks: 39689
  Show dependency tree
Reported: 2016-03-27 07:11 UTC by Alan McGovern
Modified: 2016-06-14 12:34 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alan McGovern 2016-03-27 07:11:58 UTC
Nothing in Xamarin Studio sets the static `MessageDialog.RootWindow` variable. We have two options:

* Kill that variable completely and expose it in all the methods in Xwt.MessageDialog.* so it can be passed in properly.

* Set it in Xamarin Studio on startup and pray that no-one ever unsets it.

I'd go for the former if at all possible because we already have code which (re)sets that static variable, and i'm sure it's just going to be really broken if we try to keep using it.

Comment 1 Alan McGovern 2016-03-27 07:12:37 UTC
Bug #39689 is the same as this, but was reported against an app we don't ship.
Comment 2 Alan McGovern 2016-03-27 07:26:24 UTC
I ported the only user I could find of this variable to do things The Right Way

Comment 3 Alan McGovern 2016-03-27 07:27:24 UTC
NOTE: I did not grep the sourcecode for all users of `Xwt.MessageDialog` so I don't know how many other places are going to display dialogs on the wrong screen.
Comment 4 iain 2016-03-31 12:20:19 UTC
Similar code to the Xwt.MessageDialog is found in MonoDevelop.Ide.MessageService which does have its RootWindow variable set at startup
Comment 5 Alan McGovern 2016-05-12 10:29:08 UTC
The issues described in bug #39689 will affect XS and VS until we have a workaround
Comment 6 xamarin-release-manager 2016-06-14 12:34:18 UTC
Fixed in version (master)

Author: Vsevolod Kukol
Commit: 9a243d296dedaeb397dd7c383a78756c13f54d72 (mono/monodevelop)