Skip to content

Commit

Permalink
Prepare 1.51
Browse files Browse the repository at this point in the history
  • Loading branch information
RamonUnch authored Feb 20, 2022
1 parent de1ab28 commit e727639
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 20 deletions.
10 changes: 9 additions & 1 deletion AltSnap.txt
Original file line number Diff line number Diff line change
@@ -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/ *
Expand Down Expand Up @@ -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 ==

Expand Down
8 changes: 1 addition & 7 deletions altsnap.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions altsnap.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions hooks.rc
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions tray.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 5 additions & 0 deletions unfuck.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit e727639

Please sign in to comment.