feat(ffm): explicitly require flag to enable

Following the discovery that the custom FFM implementation significantly
increases CPU usage, and that the underlying library used to track mouse
events is already as optimised as possible for CPU usage, this commit
makes the enabling of custom FFM explicit via a command line flag when
launching the window manager.

The underlying library does not provide for a way to clean up and
recreate a message loop on demand, which means that once it starts,
there is no way of reclaiming those CPU cycles even when FFM is
disabled.

If a user has not started komorebi with the --ffm flag and tries to
enable or toggle custom FFM, a warning will be shown in the logs and
komorebi will override their selection to operate on the Windows FFM
implementation.

In light of this, the default implementation values for komorebic's FFM
commands have been updated to 'windows'.

This commit also takes the opportunity to allow the state and stop
commands to pass when the window manager is in a paused state.

resolve #33
This commit is contained in:
LGUG2Z
2021-09-16 09:36:53 -07:00
parent 28a641609c
commit b8a27a93fe
7 changed files with 225 additions and 145 deletions

1
Cargo.lock generated
View File

@@ -509,6 +509,7 @@ version = "0.1.3"
dependencies = [
"bindings",
"bitflags",
"clap",
"color-eyre",
"crossbeam-channel",
"crossbeam-utils",