From e727639650a09343fca97e4a60da18bbfcec0bf8 Mon Sep 17 00:00:00 2001 From: RamonUnch <74856804+RamonUnch@users.noreply.github.com> Date: Sun, 20 Feb 2022 21:27:09 +0100 Subject: [PATCH] Prepare 1.51 --- AltSnap.txt | 10 +++++++++- altsnap.nsi | 8 +------- altsnap.rc | 6 +++--- hooks.c | 3 +-- hooks.h | 2 +- hooks.rc | 6 +++--- tray.c | 3 --- unfuck.h | 5 +++++ 8 files changed, 23 insertions(+), 20 deletions(-) diff --git a/AltSnap.txt b/AltSnap.txt index 4f9110ce..0c3ec473 100644 --- a/AltSnap.txt +++ b/AltSnap.txt @@ -1,7 +1,7 @@ *=========================================================================* * ALTSNAP for NT4 to Win10 * * Modified by Raymond Gillibert from original AltDrag by Stefan Sundin * -* release 1.50 (February 18, 2022) * +* release 1.51 (February 21, 2022) * *-------------------------------------------------------------------------* * Download MEGA: https://mega.nz/folder/mW5ExCCT#gI8DQICICk-y4FIjxaqtGg * * Download GitHub: https://github.com/RamonUnch/AltSnap/releases/ * @@ -183,6 +183,14 @@ Note that this version has some more feature. =========================================================================== == CHANGELOG == +== AltSnap 1.51 == + + * Fixed regression that would make it impossible to select alternate action + for mouse button 4 and 5. + + * Fixed: Now the LongClick Move will no longer trigger if the cursor is + pointing toward a system menu or a scroll bar or any of the caption + buttons [?][_][O][X], in the titlebar. == AltSnap 1.50 == diff --git a/altsnap.nsi b/altsnap.nsi index 606f4578..285bb39d 100644 --- a/altsnap.nsi +++ b/altsnap.nsi @@ -2,7 +2,7 @@ # define the name of the installer !define APP_NAME "AltSnap" -!define APP_VERSION "1.50" +!define APP_VERSION "1.51" # define the name of the installer OutFile "${APP_NAME}${APP_VERSION}-inst.exe" Name "${APP_NAME} ${APP_VERSION}" @@ -35,12 +35,6 @@ Section ifFileExists "hooks_x64.dll" 0 +2 File AltSnap.ini - ; Delete files that existed in earlier versions - Delete /REBOOTOK "$INSTDIR\info.txt" ; existed in <= 0.9 - Delete /REBOOTOK "$INSTDIR\Config.exe" ; existed in 1.0b1 - Delete /REBOOTOK "$INSTDIR\HookWindows_x64.exe" ; existed in 1.1 - Delete /REBOOTOK "$INSTDIR\hooks_x64.dll" ; existed in 1.1 - # define what to install and place it in the output path File AltSnap.exe File AltSnap.txt diff --git a/altsnap.rc b/altsnap.rc index 8e405999..4355b389 100644 --- a/altsnap.rc +++ b/altsnap.rc @@ -8,8 +8,8 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "AltSnap.exe.manifest" #define VS_VERSION_INFO 1 VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,5,0,0 - PRODUCTVERSION 1,5,0,0 + FILEVERSION 1,5,1,0 + PRODUCTVERSION 1,5,1,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -21,7 +21,7 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "AltSnap" - VALUE "FileVersion", "1.50" + VALUE "FileVersion", "1.51" VALUE "InternalName", "altsnap" VALUE "OriginalFilename", "AltSnap.exe" VALUE "CompanyName", "Gillibert Software" diff --git a/hooks.c b/hooks.c index c0c7d7f3..0916d487 100644 --- a/hooks.c +++ b/hooks.c @@ -2933,7 +2933,6 @@ static xpure enum buttonstate GetButtonState(WPARAM wParam) : (wParam==WM_MOUSEWHEEL ||wParam==WM_MOUSEHWHEEL)? STATE_DOWN : STATE_NONE; } -#define SamePt(a, b) (a.x == b.x && a.y ==b.y) ///////////////////////////////////////////////////////////////////////////// // This is somewhat the main function, it is active only when the ALT key is // pressed, or is always on when conf.keepMousehook is enabled. @@ -3145,7 +3144,7 @@ LRESULT CALLBACK TimerWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar // This can often happen if locking or sleeping the computer a lot POINT pt; GetCursorPos(&pt); - if (mousehook && (pt.x != state.prevpt.x || pt.y != state.prevpt.y)) { + if (mousehook && !SamePt(state.prevpt, pt)) { UnhookWindowsHookEx(mousehook); mousehook = SetWindowsHookEx(WH_MOUSE_LL, LowLevelMouseProc, hinstDLL, 0); } diff --git a/hooks.h b/hooks.h index b240ccce..c686374d 100644 --- a/hooks.h +++ b/hooks.h @@ -18,7 +18,7 @@ // App #define APP_NAME L"AltSnap" #define APP_NAMEA "AltSnap" -#define APP_VERSION "1.50" +#define APP_VERSION "1.51" #define APP_PROPPT APP_NAMEA"-RDim" #define APP_PROPFL APP_NAMEA"-RFlag" #define APP_PROPOFFSET APP_NAMEA"-ROffset" diff --git a/hooks.rc b/hooks.rc index df7f71a2..92181354 100644 --- a/hooks.rc +++ b/hooks.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO - FILEVERSION 1,5,0,0 - PRODUCTVERSION 1,5,0,0 + FILEVERSION 1,5,1,0 + PRODUCTVERSION 1,5,1,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -14,7 +14,7 @@ BEGIN VALUE "FileDescription", "Hooks for AltSnap" VALUE "InternalName", "hooks" VALUE "OriginalFilename", "hooks.dll" - VALUE "FileVersion", "1.50" + VALUE "FileVersion", "1.51" VALUE "CompanyName", "Gillibert Software" VALUE "LegalCopyright", "Gillibert" END diff --git a/tray.c b/tray.c index 84059764..c3a39bb1 100644 --- a/tray.c +++ b/tray.c @@ -120,9 +120,6 @@ static wchar_t *RectToStr(RECT *rc, wchar_t *rectstr) static void SaveZone(RECT *rc, unsigned num) { wchar_t txt[128], name[32]; -// LOG("Saving %d", num); -// LOG("%S", ZidxToZonestr(num, name)) -// LOG("%S", RectToStr(rc, txt)) WritePrivateProfileString(L"Zones", ZidxToZonestr(num, name), RectToStr(rc, txt), inipath); } static void ClearAllZones() diff --git a/unfuck.h b/unfuck.h index ead51c31..a9cff76a 100644 --- a/unfuck.h +++ b/unfuck.h @@ -568,6 +568,11 @@ static int IsWindowSnapped(HWND hwnd) return (W != nW || H != nH); } +static xpure int SamePt(const POINT a, const POINT b) +{ + return (a.x == b.x && a.y ==b.y); +} + /* If pt and ptt are it is the same points with 4px tolerence */ static xpure int IsSamePTT(const POINT *pt, const POINT *ptt) {