1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//! Where in its window the control a press answered stands, by the press's serial.
//!
//! The compositor attests a press to the window it delivered it to, and for a pointer or a
//! finger it knows where on the window it landed. Only the window knows which of its controls
//! answered it (the one under the pointer, the one that declares the key, else the one the
//! keyboard is in), and that control's rect is what a question the press asks stands beside. The
//! window notes that rect here as it handles the press, and a call the press makes carries it
//! ([`super::RemoteActionFrame::pressed`]). It says where in the app's own window a question
//! stands, and nothing more: the host takes it only for a press the compositor attested in that
//! app's window.
//!
//! The system's own surfaces (the shell's palette, menus and shortcuts) have no window of an app:
//! the press they act on is the one [`handling`] names while they act on it.
use VecDeque;
use Mutex;
use PressRect;
/// The presses whose place is remembered: a window handles one press at a time, and the calls
/// one makes leave soon after it.
const KEPT: usize = 16;
static POINTS: = new;
/// The press of `serial` answered the control standing at `at` in its window.
/// The press the person is making on the shell's own surfaces answered the control standing at
/// `rect`: noted under the serial [`handled`] names, where a call the press makes reads it, as a
/// window's own press notes the control it answered.
/// Where the control the press of `serial` answered stands, when the window said.
thread_local!
/// Run `act` as what the person's press of `serial` on the system's own surfaces does (a
/// palette's row, a menu's item, a shortcut's key, as the compositor delivered it): a call the
/// person's shell makes for them within it names the press ([`handled`]), and runs as their own
/// act once the compositor's record of that press proves it. `None` runs `act` as no press's.
/// Only what runs inside `act` on this thread names it: a call made later, or for someone else
/// (an agent driving the same surfaces), follows no press.
/// The person's press the system's own surfaces act on now ([`handling`]), if any.