Skip to content
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

Fixed processing that uses GetAsyncKeyState(). #505

Merged
merged 1 commit into from
Dec 12, 2020

Conversation

tjmprm77
Copy link
Contributor

In the function CMainFrame::OnDropFiles(), !!::GetAsyncKeyState(VK_CONTROL) is true not only when the control key is pressed, but also when the control key is not pressed but has been pressed since the last GetAsyncKeyState () was executed.

So, for example, the "Include subfolders" option is applied with the reverse settings when the following steps are performed, which does not seem to be the expected behavior.
Step 1. Open the directory containing the directory to be compared by WinMerge in Explorer.
Step 2. Press the control key once.
Step 3. Select a range of two directories to enter with the mouse. (The control key is not pressed at this time.)
Step 4. Drag and drop the selected directories to WinMerge. (The control key is not pressed at this time.)

Similarly, in the function CImgMergeFrame::OnChildPaneEvent(), when an arrow key is pressed after pressing the shift key or control key, it behaves as if the arrow key is pressed while pressing the shift key or control key.

This PR fixes these behaviors.

- Fixed the behaviour in the function CMainFrame::OnDropFiles() that when drag and drop is performed after pressing the control key,
  it behaves as if drag and drop is performed while pressing the control key.
- Fixed the behaviour in the function CImgMergeFrame::OnChildPaneEvent() that when an arrow key is pressed after pressing the shift key or control key,
  it behaves as if the arrow key is pressed while pressing the shift key or control key.
@sdottaka sdottaka merged commit f0813c5 into WinMerge:master Dec 12, 2020
@sdottaka
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants