mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-21 00:01:26 +02:00
This commit implements an initial attempt at a custom focus follows mouse and autoraise implementation which only responds to hwnds managed by komorebi. I was browsing GitHub and came across the winput crate which has a clean API for tracking both mouse movements and button presses, which seems to be just enough to get this functionality working. Once again, Chromium and Electron are the bane of every platform they run on and Windows is no exception, so I've had to add a hack to work around the legacy Chrome windows that get drawn on top of Electron apps with the Chrome_RenderWidgetHostHWND class. It is fairly naive; it just looks up an alternative (and hopefully correct) hwnd based on the exe name, but this will no doubt be fragile when it comes to applications that have multiple windows spawned from the same exe. For now I've opted to keep the same komorebic commands for enabling, disabling and toggling focus-follows-mouse, in order to preserve backwards compat, but those commands will now enable and disable this custom implementation instead of the native Windows X-Mouse implementation. Perhaps in the future the specific implementation to target could be specified through the use of an optional flag. re #7
38 lines
837 B
TOML
38 lines
837 B
TOML
[package]
|
|
name = "komorebi"
|
|
version = "0.1.3"
|
|
edition = "2018"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
bindings = { package = "bindings", path = "../bindings" }
|
|
komorebi-core = { path = "../komorebi-core" }
|
|
|
|
bitflags = "1"
|
|
color-eyre = "0.5"
|
|
crossbeam-channel = "0.5"
|
|
crossbeam-utils = "0.8"
|
|
ctrlc = "3"
|
|
dirs = "3"
|
|
getset = "0.1"
|
|
hotwatch = "0.4"
|
|
lazy_static = "1"
|
|
nanoid = "0.4"
|
|
parking_lot = { version = "0.11", features = ["deadlock_detection"] }
|
|
paste = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
strum = { version = "0.21", features = ["derive"] }
|
|
sysinfo = "0.20"
|
|
tracing = "0.1"
|
|
tracing-appender = "0.1"
|
|
tracing-subscriber = "0.2"
|
|
uds_windows = "1"
|
|
which = "4"
|
|
winput = "0.2"
|
|
winvd = "0.0.20"
|
|
|
|
[features]
|
|
deadlock_detection = []
|