New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WinPosSize: fix changing size without changing position #673

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@jcsullins
Contributor

jcsullins commented May 13, 2016

This fixes a bug in the function that SetWinPosSize uses to parse the position args (IntFromString).

With this fix, you should now be able to use, eg:
ConEmuC.exe -guimacro WindowPosSize keep keep 120 24
to change the size to 120x24 while keeping the position unchanged.
Note that 'keep' can be anything that does not parse into an int.

SetWindowPosSize: fix changing size w/o changing pos
SetWindowPosSize has logic that allows changing size or pos without
changing the other. However, the function (IntFromString) that parses
the pos args does not properly return if an int was parsed.
Thus, attempting to set size with pos unchanged (by passing a non
integer for the pos args) will always result is a pos of 0,0.

Fix IntFromString to properly return if an int was parsed.

Maximus5 added a commit that referenced this pull request May 13, 2016

gh-673: GuiMacro SetWindowPosSize: fix changing size w/o changing pos…
… (by @jcsullins).

SetWindowPosSize has logic that allows changing size or pos without
changing the other. However, the function (IntFromString) that parses
the pos args does not properly return if an int was parsed.
Thus, attempting to set size with pos unchanged (by passing a non
integer for the pos args) will always result is a pos of 0,0.

Fix IntFromString to properly return if an int was parsed.
@Maximus5

This comment has been minimized.

Show comment
Hide comment
Owner

Maximus5 commented May 13, 2016

@Maximus5 Maximus5 closed this May 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment