From fc02c623c879e04d93105a252538e963d423a60c Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Sat, 14 Oct 2017 20:07:35 -0300 Subject: [PATCH] Write new window position as soon as it's detected. --- source/ide/ide_methods.bas | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/source/ide/ide_methods.bas b/source/ide/ide_methods.bas index 4411a2f5c..8e8f94d50 100644 --- a/source/ide/ide_methods.bas +++ b/source/ide/ide_methods.bas @@ -729,17 +729,6 @@ FUNCTION ide2 (ignore) ideloop: idecontextualmenu = 0 idedeltxt 'removes temporary strings (typically created by guibox commands) by setting an index to 0 - IF IDE_AutoPosition THEN - IF IDE_TopPosition <> _SCREENY OR IDE_LeftPosition <> _SCREENX THEN - IF _SCREENY >= -_HEIGHT * _FONTHEIGHT AND _SCREENX >= -_WIDTH * _FONTWIDTH THEN 'Don't record the position if it's off the screen, past the point where we can drag it back into a different position. - WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_TopPosition", STR$(_SCREENY) - WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_LeftPosition", STR$(_SCREENX) - IDE_TopPosition = _SCREENY: IDE_LeftPosition = _SCREENX - END IF - END IF - 'end if - END IF - IF idesubwindow <> 0 THEN _RESIZE OFF ELSE _RESIZE ON IF _RESIZE OR ForceResize THEN @@ -1243,6 +1232,16 @@ FUNCTION ide2 (ignore) ForceResize = -1: skipdisplay = 0: GOTO ideloop END IF + IF IDE_AutoPosition THEN + IF IDE_TopPosition <> _SCREENY OR IDE_LeftPosition <> _SCREENX THEN + IF _SCREENY >= -_HEIGHT * _FONTHEIGHT AND _SCREENX >= -_WIDTH * _FONTWIDTH THEN 'Don't record the position if it's off the screen, past the point where we can drag it back into a different position. + WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_TopPosition", STR$(_SCREENY) + WriteConfigSetting "'[IDE DISPLAY SETTINGS]", "IDE_LeftPosition", STR$(_SCREENX) + IDE_TopPosition = _SCREENY: IDE_LeftPosition = _SCREENX + END IF + END IF + END IF + 'Hover/click (QuickNav) IF IdeSystem = 1 AND QuickNavTotal > 0 THEN IF mY = 2 THEN