diff options
-rw-r--r-- | main/src/addins/MonoDevelop.SourceEditor2/ChangeLog | 5 | ||||
-rw-r--r-- | main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog b/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog index 1f2210c20d..92338ef382 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog +++ b/main/src/addins/MonoDevelop.SourceEditor2/ChangeLog @@ -1,5 +1,10 @@ 2009-09-23 Mike Krüger <mkrueger@novell.com> + * MonoDevelop.SourceEditor/ExtensibleTextEditor.cs: Fixed menu + positioning. + +2009-09-23 Mike Krüger <mkrueger@novell.com> + * MonoDevelop.SourceEditor/SourceEditorWidget.cs: Semantic highlighting requires to purge the layout cache, when the parser updates to reflect semantic changes. diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs index d152dbce25..4b86e7e2d2 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs @@ -702,7 +702,6 @@ namespace MonoDevelop.SourceEditor Gtk.Menu menu = IdeApp.CommandService.CreateMenu (cset); menu.Append (new SeparatorMenuItem ()); menu.Append (CreateInputMethodMenuItem (GettextCatalog.GetString ("_Input Methods"))); - menu.Destroyed += delegate { this.QueueDraw (); }; @@ -710,11 +709,14 @@ namespace MonoDevelop.SourceEditor menu.Popup (null, null, new Gtk.MenuPositionFunc (PositionPopupMenu), 0, Gtk.Global.CurrentEventTime); } - void PositionPopupMenu (Menu menu, out int x, out int y, out bool pushIn) + void PositionPopupMenu (Menu menu, out int x, out int y, out bool pushIn) { this.GdkWindow.GetOrigin (out x, out y); x += this.menuPopupLocation.X; y += this.menuPopupLocation.Y; + Requisition request = menu.SizeRequest (); + y = Math.Min (y, GdkWindow.Screen.Height - request.Height); + x = Math.Min (x, GdkWindow.Screen.Width - request.Width); pushIn = true; } |