- scid must already have focus before forcing it to one of its windows - don't give auto-focus feature to undocked windows to avoid in-house focus stealing
Signed-off-by: Cristian Stoica <cristi...@gmail.com> --- tcl/start.tcl | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tcl/start.tcl b/tcl/start.tcl index 933965d..6d523c6 100644 --- a/tcl/start.tcl +++ b/tcl/start.tcl @@ -891,20 +891,21 @@ proc createToplevel { w } { } if { $::docking::USE_DOCKING && ! [ ::docking::isUndocked $w ] } { - frame $f -container 1 - toplevel .$name -use [ winfo id $f ] - docking::add_tab $f e - - # auto focus mode : when the mouse enters a toplevel, it gets a forced focus to handle mouse wheel - # only the highest stacked window can get the focus forced or on windows any time the mouse enters the main window, it will be raised - bind .$name <Enter> { - set tl [winfo toplevel %W] - set atTop [lindex [wm stackorder . ] end] - if { $tl == $atTop || $atTop == "." } { - focus -force $tl + frame $f -container 1 + toplevel .$name -use [ winfo id $f ] + docking::add_tab $f e + + # - auto focus mode: when the mouse enters a toplevel, it gets a forced + # focus to handle mouse wheel + # - only the topmost window is considered and only if it is docked (.main) + # - undocked windows should not receive auto-focus to avoid focus stealing + bind .$name <Enter> { + set tl [winfo toplevel %W] + set atTop [lindex [wm stackorder . ] end] + if { $tl == ".main" && $atTop == "." && [focus] != "" } { + focus -force $tl + } } - } - } else { toplevel $w } -- 1.8.1.5 ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Scid-users mailing list Scid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scid-users