# HG changeset patch # User wenzelm # Date 1383919816 -3600 # Node ID 3eb84b6b0353a8604c2c276e35462ba09a1f46e8 # Parent 47a8513671b80f7f886d84ffe82dad98ed7036cb transfer focus before closing old component -- avoid intermediate focus switch to root component, which is actually visible e.g. on Windows; diff -r 47a8513671b8 -r 3eb84b6b0353 src/Tools/jEdit/src/completion_popup.scala --- a/src/Tools/jEdit/src/completion_popup.scala Thu Nov 07 19:35:57 2013 +0100 +++ b/src/Tools/jEdit/src/completion_popup.scala Fri Nov 08 15:10:16 2013 +0100 @@ -490,9 +490,8 @@ private def hide_popup() { - val had_focus = list_view.peer.isFocusOwner + if (list_view.peer.isFocusOwner) refocus() popup.hide - if (had_focus) refocus() } } diff -r 47a8513671b8 -r 3eb84b6b0353 src/Tools/jEdit/src/pretty_tooltip.scala --- a/src/Tools/jEdit/src/pretty_tooltip.scala Thu Nov 07 19:35:57 2013 +0100 +++ b/src/Tools/jEdit/src/pretty_tooltip.scala Fri Nov 08 15:10:16 2013 +0100 @@ -115,13 +115,13 @@ deactivate() hierarchy(tip) match { case Some((old, _ :: rest)) => - old.foreach(_.hide_popup) - tip.hide_popup - stack = rest rest match { case top :: _ => top.request_focus case Nil => JEdit_Lib.request_focus_view } + old.foreach(_.hide_popup) + tip.hide_popup + stack = rest case _ => } } @@ -131,9 +131,9 @@ deactivate() if (stack.isEmpty) false else { + JEdit_Lib.request_focus_view stack.foreach(_.hide_popup) stack = Nil - JEdit_Lib.request_focus_view true } }