Match hover focus to pointer surface hit testing
This commit is contained in:
1 parent
9b78aabf0a
commit
c73d11b2c9
2 files changed
+18
-3
No files matched your search
@@ -624,6 +624,9 @@ impl Ferese {
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if self.layer_under(position).is_some() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let Some(window) = self.window_under_visual(position) else {
|
let Some(window) = self.window_under_visual(position) else {
|
||||||
return;
|
return;
|
||||||
|
|||||||
+15
-3
@@ -862,11 +862,23 @@ impl Ferese {
|
|||||||
|
|
||||||
let visual = self.presented_window_rect(*id)?;
|
let visual = self.presented_window_rect(*id)?;
|
||||||
let caption_height = if overview_active { 34.0 } else { 0.0 };
|
let caption_height = if overview_active { 34.0 } else { 0.0 };
|
||||||
(position.x >= visual.x
|
let inside_visual = position.x >= visual.x
|
||||||
&& position.y >= visual.y
|
&& position.y >= visual.y
|
||||||
&& position.x < visual.x + visual.width
|
&& position.x < visual.x + visual.width
|
||||||
&& position.y < visual.y + visual.height + caption_height)
|
&& position.y < visual.y + visual.height + caption_height;
|
||||||
.then_some(window.clone())
|
if !inside_visual {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
|
if !overview_active {
|
||||||
|
let (source_x, source_y) =
|
||||||
|
self.inverse_presented_window_point(*id, position.x, position.y)?;
|
||||||
|
let source_point =
|
||||||
|
Point::from((source_x, source_y)) + window.geometry().loc.to_f64();
|
||||||
|
window.surface_under(source_point, WindowSurfaceType::ALL)?;
|
||||||
|
}
|
||||||
|
|
||||||
|
Some(window.clone())
|
||||||
};
|
};
|
||||||
|
|
||||||
if overview_active {
|
if overview_active {
|
||||||
|
|||||||
Reference in new issue
Block a user