fix various focus issues in drawing canvas
This commit is contained in:
parent
de7e952f7e
commit
ee7e3a965e
|
|
@ -1715,7 +1715,6 @@ static void create_new_window(int *window_count, const char *win_path, const cha
|
||||||
xctx->xorigin=CADINITIALX;
|
xctx->xorigin=CADINITIALX;
|
||||||
xctx->yorigin=CADINITIALY;
|
xctx->yorigin=CADINITIALY;
|
||||||
load_schematic(1, fname, 1, confirm);
|
load_schematic(1, fname, 1, confirm);
|
||||||
tclvareval("set_bindings ", window_path[n], NULL);
|
|
||||||
tclvareval("set_replace_key_binding ", window_path[n], NULL);
|
tclvareval("set_replace_key_binding ", window_path[n], NULL);
|
||||||
tclvareval("save_ctx ", window_path[n], NULL);
|
tclvareval("save_ctx ", window_path[n], NULL);
|
||||||
tcleval("eval_user_startup_commands");
|
tcleval("eval_user_startup_commands");
|
||||||
|
|
@ -1726,6 +1725,7 @@ static void create_new_window(int *window_count, const char *win_path, const cha
|
||||||
* new_schematic("switch", prev_window, "", 1);
|
* new_schematic("switch", prev_window, "", 1);
|
||||||
*/
|
*/
|
||||||
tclvareval("housekeeping_ctx", NULL);
|
tclvareval("housekeeping_ctx", NULL);
|
||||||
|
tclvareval("set_bindings ", window_path[n], NULL);
|
||||||
if(has_x) windowid(toppath);
|
if(has_x) windowid(toppath);
|
||||||
if(dr) xctx->pending_fullzoom=1;
|
if(dr) xctx->pending_fullzoom=1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8923,8 +8923,8 @@ global env has_x OS autofocus_mainwindow
|
||||||
|
|
||||||
# Context switch.
|
# Context switch.
|
||||||
bind $parent <FocusIn> "
|
bind $parent <FocusIn> "
|
||||||
# focus $topwin ;# propagate focus to canvas
|
|
||||||
switch_window $parent $topwin %T %W
|
switch_window $parent $topwin %T %W
|
||||||
|
# focus $topwin ;# propagate focus to canvas
|
||||||
"
|
"
|
||||||
|
|
||||||
bind $topwin <Leave> "
|
bind $topwin <Leave> "
|
||||||
|
|
@ -8954,7 +8954,7 @@ global env has_x OS autofocus_mainwindow
|
||||||
if {$autofocus_mainwindow} {
|
if {$autofocus_mainwindow} {
|
||||||
bind $topwin <ButtonPress> "focus $topwin; xschem callback %W %T %x %y 0 %b 0 %s"
|
bind $topwin <ButtonPress> "focus $topwin; xschem callback %W %T %x %y 0 %b 0 %s"
|
||||||
} else {
|
} else {
|
||||||
bind $topwin <ButtonPress> "xschem callback %W %T %x %y 0 %b 0 %s"
|
bind $topwin <ButtonPress> "focus $topwin; xschem callback %W %T %x %y 0 %b 0 %s"
|
||||||
}
|
}
|
||||||
bind $topwin <ButtonRelease> "xschem callback %W %T %x %y 0 %b 0 %s"
|
bind $topwin <ButtonRelease> "xschem callback %W %T %x %y 0 %b 0 %s"
|
||||||
|
|
||||||
|
|
@ -9006,6 +9006,12 @@ global env has_x OS autofocus_mainwindow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if {$parent eq {.}} { set parent {}}
|
||||||
|
bind ${parent}.statusbar.5 <Leave> \
|
||||||
|
"focus ${parent}.drw; set cadgrid \[${parent}.statusbar.5 get\]; xschem set cadgrid \$cadgrid"
|
||||||
|
bind ${parent}.statusbar.3 <Leave> \
|
||||||
|
"focus ${parent}.drw; set cadsnap \[${parent}.statusbar.3 get\]; xschem set cadsnap \$cadsnap"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9035,10 +9041,6 @@ proc pack_widgets { { topwin {} } } {
|
||||||
setup_tabbed_interface
|
setup_tabbed_interface
|
||||||
if {$toolbar_visible} {toolbar_show $topwin}
|
if {$toolbar_visible} {toolbar_show $topwin}
|
||||||
|
|
||||||
bind $topwin.statusbar.5 <Leave> \
|
|
||||||
"focus $topwin.drw; set cadgrid \[$topwin.statusbar.5 get\]; xschem set cadgrid \$cadgrid"
|
|
||||||
bind $topwin.statusbar.3 <Leave> \
|
|
||||||
"focus $topwin.drw; set cadsnap \[$topwin.statusbar.3 get\]; xschem set cadsnap \$cadsnap"
|
|
||||||
}
|
}
|
||||||
if {$topwin ne {}} {
|
if {$topwin ne {}} {
|
||||||
$topwin.menubar.view entryconfigure {Tabbed interface} -state disabled
|
$topwin.menubar.view entryconfigure {Tabbed interface} -state disabled
|
||||||
|
|
@ -9770,7 +9772,6 @@ tclcommand=\"xschem raw_read \$netlist_dir/[file tail [file rootname [xschem get
|
||||||
# used to check status of Simulate button later. This variable is constant, never changed
|
# used to check status of Simulate button later. This variable is constant, never changed
|
||||||
frame $topwin.drw -background {} -takefocus 1
|
frame $topwin.drw -background {} -takefocus 1
|
||||||
|
|
||||||
focus $topwin.drw
|
|
||||||
if { $topwin == {} } {set rootwin .} else { set rootwin $topwin}
|
if { $topwin == {} } {set rootwin .} else { set rootwin $topwin}
|
||||||
wm title $rootwin "xschem - "
|
wm title $rootwin "xschem - "
|
||||||
wm iconname $rootwin "xschem - "
|
wm iconname $rootwin "xschem - "
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue