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

Fixes deformation of dialog upon movement under Win10 #139

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,10 @@ int IsHotkey(int key) {
}
return 0;
}
// Helper function to call SetWindowPos with the SWP_ASYNCWINDOWPOS flag
static void MoveWindowAsync(HWND hwnd, int posx, int posy, int width, int height) {
SetWindowPos(hwnd, NULL, posx, posy, width, height, SWP_NOACTIVATE|SWP_NOREPOSITION|SWP_ASYNCWINDOWPOS);
}

void MouseMove() {
int posx, posy, wndwidth, wndheight;
Expand Down Expand Up @@ -924,7 +928,7 @@ void MouseMove() {
}
}

MoveWindow(state.hwnd, posx, posy, wndwidth, wndheight, TRUE);
MoveWindowAsync(state.hwnd, posx, posy, wndwidth, wndheight);
}

__declspec(dllexport) LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) {
Expand Down