mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-28 11:17:46 +00:00
Brings debuggee window to foreground when using INPUT.
This commit is contained in:
parent
f7fe97390a
commit
8dddefd002
2 changed files with 9 additions and 9 deletions
|
@ -11611,6 +11611,9 @@ extern int32 qbs_input_variabletypes[257];
|
|||
qbs *qbs_input_arguements[257];
|
||||
int32 cursor_show_last;
|
||||
|
||||
void set_foreground_window(ptrszint i);
|
||||
int64 func__handle();
|
||||
|
||||
void qbs_input(int32 numvariables,uint8 newline){
|
||||
if (new_error) return;
|
||||
int32 i,i2,i3,i4,i5,i6,chr;
|
||||
|
@ -11623,6 +11626,10 @@ void qbs_input(int32 numvariables,uint8 newline){
|
|||
source_backup=func__source();
|
||||
sub__source(func__dest());
|
||||
|
||||
#ifdef QB64_WINDOWS
|
||||
if (vwatch>0) set_foreground_window((ptrszint)func__handle());
|
||||
#endif
|
||||
|
||||
//duplicate dest image so any changes can be reverted
|
||||
static int32 dest_image,dest_image_temp,dest_image_holding_cursor;
|
||||
dest_image=func__copyimage(func__dest(),NULL,NULL);
|
||||
|
|
|
@ -16,15 +16,10 @@ SUB vwatch (globalVariables AS _OFFSET, localVariables AS _OFFSET)
|
|||
SUB vwatch_starttimers ALIAS start_timers
|
||||
SUB unlockvWatchHandle
|
||||
SUB set_qbs_size (target AS _OFFSET, BYVAL length&)
|
||||
SUB set_foreground_window (BYVAL hwnd AS _OFFSET)
|
||||
FUNCTION stop_program_state&
|
||||
END DECLARE
|
||||
|
||||
$IF WIN THEN
|
||||
DECLARE DYNAMIC LIBRARY "user32"
|
||||
FUNCTION SetForegroundWindow& (BYVAL hWnd AS _OFFSET)
|
||||
END DECLARE
|
||||
$END IF
|
||||
|
||||
IF vw_bypass THEN EXIT SUB
|
||||
|
||||
vwatch_goto = 0
|
||||
|
@ -178,9 +173,7 @@ SUB vwatch (globalVariables AS _OFFSET, localVariables AS _OFFSET)
|
|||
vw_cmd$ = "current sub:" + LEFT$(vwatch_stack(vwatch_sublevel), INSTR(vwatch_stack(vwatch_sublevel), ",") - 1)
|
||||
GOSUB SendCommand
|
||||
|
||||
$IF WIN THEN
|
||||
vw_i = SetForegroundWindow&(vw_idehwnd)
|
||||
$END IF
|
||||
set_foreground_window vw_idehwnd
|
||||
|
||||
DO 'main loop
|
||||
IF stop_program_state& THEN vw_bypass = -1: EXIT DO
|
||||
|
|
Loading…
Reference in a new issue