diff --git a/ahkpm.json b/ahkpm.json index aa2a4d0..92b3087 100644 --- a/ahkpm.json +++ b/ahkpm.json @@ -1,5 +1,5 @@ { - "version": "1.3.0", + "version": "1.3.1", "description": "Control your microphone using keyboard and mouse hotkeys.", "repository": "https://github.com/SaifAqqad/AHK_MicMute", "website": "https://github.com/SaifAqqad/AHK_MicMute", diff --git a/src/MicMute.ahk b/src/MicMute.ahk index f4fe661..0142836 100644 --- a/src/MicMute.ahk +++ b/src/MicMute.ahk @@ -3,9 +3,9 @@ ;compiler directives ;@Ahk2Exe-Let Res = %A_ScriptDir%\resources ;@Ahk2Exe-Let UI = %A_ScriptDir%\UI\config -;@Ahk2Exe-Let Version = 1.3.0 +;@Ahk2Exe-Let Version = 1.3.1 ;@Ahk2Exe-IgnoreBegin - U_Version:= "1.3.0" + U_Version:= "1.3.1" ;@Ahk2Exe-IgnoreEnd ;@Ahk2Exe-SetMainIcon %U_Res%\icons\1000.ico ;@Ahk2Exe-SetVersion %U_Version% @@ -108,7 +108,6 @@ Global A_startupTime:= A_TickCount , updater_UI:="" , WM_SETTINGCHANGE:= 0x001A , WM_DEVICECHANGE := 0x0219 - , WM_DISPLAYCHANGE := 0x007E ; parse cli args parseArgs() diff --git a/src/UI/Overlay.ahk b/src/UI/Overlay.ahk index 7a4d0ea..8b8f614 100644 --- a/src/UI/Overlay.ahk +++ b/src/UI/Overlay.ahk @@ -1,4 +1,4 @@ -class Overlay { +class Overlay { static GDI_TOKEN := 0 , BACKGROUND_COLOR := 0x232323 , BACKGROUND_TRANSPARENCY := 0xef000000 @@ -52,6 +52,8 @@ class Overlay { } _calculatePos(){ + this.changedPos:= "" + if (this.options.pos.Length() > 1) { ; there's multiple positions -> Apply the first available isPositionSet:= 0 @@ -237,10 +239,10 @@ class Overlay { return WinGetPos, xPos, yPos, , , % "ahk_id " this.hwnd - if (xPos == "" || yPos == "") + if (xPos == "" || yPos == "" || (this.lastChangedPos && this.lastChangedPos.x == xPos && this.lastChangedPos.y == yPos)) return - this.changedPos := { x: xPos, y: yPos } + this.lastChangedPos := this.changedPos := { x: xPos, y: yPos } } _onPosChanged(){