Cursor: Don't passthrough() on update if hidden
Currently when the surface under the hidden cursor changes, we passthrough() which results in the cursor being made visible and giving pointer focus to the surface under the cursor if any. Obviously this is not desirable as the cursor is supposed to remain hidden until moved. This added check prevents this.
This commit is contained in:
parent
a8491eb13e
commit
e0246c0410
@ -927,6 +927,10 @@ pub fn updateState(self: *Self) void {
|
||||
}
|
||||
|
||||
fn shouldPassthrough(self: Self) bool {
|
||||
// We clear focus on hiding the cursor and should not re-focus until the cursor is moved
|
||||
// and shown again.
|
||||
if (self.hidden) return false;
|
||||
|
||||
switch (self.mode) {
|
||||
.passthrough => {
|
||||
// If we are not currently in down/resize/move mode, we *always* need to passthrough()
|
||||
|
Loading…
Reference in New Issue
Block a user