Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2012-05-31 10:29:58 +0400
committerMike Krüger <mkrueger@xamarin.com>2012-05-31 10:29:58 +0400
commit5599d037a9c2cd06dd64f91bc2af54d12f8615d3 (patch)
tree94831befb61d494d64207e8224490f1272ab008a /main
parent5fbe32adbe053b0474dbe4cb0b3cd6685ecd9546 (diff)
[Ide] Fixed document switcher not hiding bug on linux mint 13.
Diffstat (limited to 'main')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs28
1 files changed, 18 insertions, 10 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs
index 8dc7193f02..cea16da4da 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs
@@ -558,7 +558,7 @@ namespace MonoDevelop.Ide
Label labelTitle = new Label ();
DocumentList documentList = new DocumentList ();
- public DocumentSwitcher (Gtk.Window parent, bool startWithNext) : base(Gtk.WindowType.Toplevel)
+ public DocumentSwitcher (Gtk.Window parent, bool startWithNext) : base(Gtk.WindowType.Popup)
{
IdeApp.CommandService.IsEnabled = false;
this.documents = new List<MonoDevelop.Ide.Gui.Document> (
@@ -655,7 +655,7 @@ namespace MonoDevelop.Ide
} else if (padCategory.Items.Count > 0) {
activeItem = padCategory.Items [0];
} else {
- Destroy ();
+ DestroyWindow ();
return;
}
}
@@ -663,14 +663,17 @@ namespace MonoDevelop.Ide
documentList.ActiveItem = activeItem;
documentList.NextItem (true);
documentList.RequestClose += delegate(object sender, DocumentList.RequestActionEventArgs e) {
- if (e.SelectItem) {
- if (documentList.ActiveItem.Tag is Pad) {
- ((Pad)documentList.ActiveItem.Tag).BringToFront (true);
- } else {
- ((MonoDevelop.Ide.Gui.Document)documentList.ActiveItem.Tag).Select ();
+ try {
+ if (e.SelectItem) {
+ if (documentList.ActiveItem.Tag is Pad) {
+ ((Pad)documentList.ActiveItem.Tag).BringToFront (true);
+ } else {
+ ((MonoDevelop.Ide.Gui.Document)documentList.ActiveItem.Tag).Select ();
+ }
}
+ } finally {
+ DestroyWindow ();
}
- Destroy ();
};
this.ShowAll ();
@@ -691,10 +694,15 @@ namespace MonoDevelop.Ide
protected override bool OnFocusOutEvent (EventFocus evnt)
{
- Destroy ();
+ DestroyWindow ();
return base.OnFocusOutEvent (evnt);
}
-
+
+ void DestroyWindow ()
+ {
+ Destroy ();
+ }
+
protected override void OnDestroyed ()
{
base.OnDestroyed ();