remove some redundant operations (housekeeping_ctx) when switching windows contexts for redraw_only
This commit is contained in:
parent
ed0d71c1ff
commit
31a0712109
|
|
@ -4642,7 +4642,8 @@ int callback(const char *win_path, int event, int mx, int my, KeySym key, int bu
|
|||
old_win_path, win_path, xctx->semaphore);
|
||||
new_schematic("switch", win_path, "", 1);
|
||||
}
|
||||
tclvareval("housekeeping_ctx", NULL);
|
||||
/* done in switch_window() */
|
||||
/* tclvareval("housekeeping_ctx", NULL); */
|
||||
}
|
||||
/* artificially set semaphore to allow only redraw operations in switched schematic,
|
||||
* so we don't need to switch tcl context which is costly performance-wise
|
||||
|
|
|
|||
|
|
@ -1524,11 +1524,13 @@ static int switch_window(int *window_count, const char *win_path, int tcl_ctx)
|
|||
}
|
||||
}
|
||||
/* if window was closed then tkwin == 0 --> do nothing */
|
||||
if((!has_x || tkwin) && n >= 0 && n < MAX_NEW_WINDOWS) {
|
||||
if(tkwin && n >= 0 && n < MAX_NEW_WINDOWS) {
|
||||
if(tcl_ctx) tclvareval("save_ctx ", xctx->current_win_path, NULL);
|
||||
xctx = save_xctx[n];
|
||||
if(tcl_ctx) tclvareval("restore_ctx ", win_path, NULL);
|
||||
tclvareval("housekeeping_ctx", NULL);
|
||||
if(tcl_ctx) {
|
||||
tclvareval("restore_ctx ", win_path, NULL);
|
||||
tclvareval("housekeeping_ctx", NULL);
|
||||
}
|
||||
if(tcl_ctx && has_x) tclvareval("reconfigure_layers_button {}", NULL);
|
||||
set_modify(-1); /* sets window title */
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue