Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[powerkey] Add state machine for home key handling. JB#34962
On devices that have physical home key, it can used by ui for example as a shortcut to application grid. However handling home key press when display is off needs to be subjected to display unblanking policy which resides in mce. Add a state machine that deals with input & blanking policies on mce side and then signals compositor about the home key press when/if appropriate state is reached and ui should take some action.
- Loading branch information
Showing
3 changed files
with
224 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* -*- mode: c -*- */ | ||
|
||
/* Extra documentation for state transitions made while | ||
* handling home key presses. | ||
* | ||
* To create PNG image, execute: | ||
* dot -Tpng homekey.dot -o homekey.png | ||
*/ | ||
|
||
digraph home_key_state_machine { | ||
fontsize=10; | ||
label = "MCE HOME KEY STATE MACHINE"; | ||
nodesep=0.3; | ||
ranksep=0.4; | ||
node[fontsize=7]; | ||
edge[fontsize=7]; | ||
edge[arrowsize=0.3]; | ||
node[style=filled,fillcolor=skyblue,shape=box]; | ||
node[width=0.00001]; | ||
node[height=0.00001]; | ||
|
||
node[fillcolor=yellow]; | ||
|
||
WAIT_PRESS; | ||
WAIT_UNBLANK; | ||
WAIT_RELEASE; | ||
SEND_SIGNAL; | ||
|
||
node[shape=oval,fillcolor=pink]; | ||
|
||
WAIT_PRESS -> WAIT_UNBLANK [label=" pressed==true\l"]; | ||
WAIT_UNBLANK -> WAIT_RELEASE [label=" display_state_next!=on\l"]; | ||
WAIT_UNBLANK -> SEND_SIGNAL [label=" display_state==on\l"]; | ||
SEND_SIGNAL -> WAIT_RELEASE [label=" (always)\l"]; | ||
WAIT_RELEASE -> WAIT_PRESS [label=" pressed==false\l"]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters