Skip the pointer hit test outside Overview presenting
visual_scale_for_window returns 1.0 whenever Overview is not presenting, so gate the window_under_visual walk behind is_presenting() and read the scale straight from the constant. Use hash_map::Entry for the window geometry insert so client_size is only computed on the vacant path, and reuse the elapsed time already sampled for the frame in expire_wait and presentation_size_request instead of calling start_time.elapsed() a second time.
This commit is contained in:
1 parent
2eb5fe7b73
commit
e7ee2f14db
2 files changed
+17
-13
No files matched your search
@@ -239,10 +239,13 @@ impl Ferese {
|
||||
let pointer = self.seat.get_pointer().expect("seat has a pointer");
|
||||
let position = pointer.current_location();
|
||||
let focus = self.surface_under(position);
|
||||
let (scale_x, scale_y) = self
|
||||
.window_under_visual(position)
|
||||
.and_then(|window| self.visual_scale_for_window(&window))
|
||||
.unwrap_or((1.0, 1.0));
|
||||
let (scale_x, scale_y) = if self.overview.is_presenting() {
|
||||
self.window_under_visual(position)
|
||||
.and_then(|window| self.visual_scale_for_window(&window))
|
||||
.unwrap_or((1.0, 1.0))
|
||||
} else {
|
||||
(1.0, 1.0)
|
||||
};
|
||||
let delta = event.delta();
|
||||
let delta_unaccel = event.delta_unaccel();
|
||||
|
||||
|
||||
Reference in new issue
Block a user