1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-06-26 17:10:38 +00:00

Write new window position as soon as it's detected.

This commit is contained in:
FellippeHeitor 2017-10-14 20:07:35 -03:00
parent b62e39b9f9
commit fc02c623c8

View file

@ -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