fix(ffm): raise when switching focus from anywhere

Previously, when switching focus from unmanaged windows such as the
taskbar and the system tray, komorebi would still recognise its last
known focused window as the currently focused window although that would
not be strictly true, making the ffm functionality stop working until
focus was set to a known window specifically either via a click or an
alt-tab.

This commit fixes that by always also comparing against what the OS has
registered as the current foreground window.

There is another little fix here to reset the pending raise op tracker
whenever ffm is toggled or disabled in the event that it ever gets
stuck.
This commit is contained in:
LGUG2Z
2021-09-05 22:45:57 -07:00
parent 2b7c51b87b
commit 368d41e3e0
3 changed files with 24 additions and 14 deletions
+5 -5
View File
@@ -166,9 +166,9 @@ komorebic.exe identify-tray-application exe Discord.exe
#### Focus Follows Mouse
Komorebi supports two focus-follows-mouse implementations; the native Windows X-Mouse implementation, which treats the
desktop, the task bar and the system tray as windows and switches focus to them eagerly, and a custom `komorebi`
implementation which only considers windows managed by `komorebi` as valid targets to switch focus to when moving the
`komorebi` supports two focus-follows-mouse implementations; the native Windows Xmouse implementation, which treats the
desktop, the task bar, and the system tray as windows and switches focus to them eagerly, and a custom `komorebi`
implementation, which only considers windows managed by `komorebi` as valid targets to switch focus to when moving the
mouse.
When calling any of the `komorebic` commands related to focus-follows-mouse functionality, the `komorebi`
@@ -278,8 +278,8 @@ used [is available here](komorebi.sample.with.lib.ahk).
- [x] Toggle floating windows
- [x] Toggle monocle window
- [x] Toggle native maximization
- [x] Toggle X-Mouse (Native Windows) focus follows mouse
- [x] Toggle custom Komorebi focus follows mouse (desktop and system tray-aware)
- [x] Toggle Xmouse/Windows focus follows mouse implementation
- [x] Toggle Komorebi focus follows mouse implementation (desktop and system tray-aware)
- [x] Toggle automatic tiling
- [x] Pause all window management
- [x] Load configuration on startup