mirror of
https://github.com/Smithay/smithay.git
synced 2024-09-28 03:21:14 +02:00
layer: Take popup geometry loc into account
Some checks failed
Continuous Integration / format (push) Has been cancelled
Continuous Integration / clippy-check (push) Has been cancelled
Continuous Integration / smithay-check-features (push) Has been cancelled
Continuous Integration / check-msrv (push) Has been cancelled
Continuous Integration / check-minimal (push) Has been cancelled
Continuous Integration / smithay-tests (push) Has been cancelled
Continuous Integration / smallvil-check (push) Has been cancelled
Continuous Integration / anvil-check-features (push) Has been cancelled
Continuous Integration / WLCS: Bad Buffer Test (push) Has been cancelled
Continuous Integration / WLCS: Core tests (push) Has been cancelled
Continuous Integration / WLCS: Output tests (push) Has been cancelled
Continuous Integration / WLCS: Pointer input tests (push) Has been cancelled
Continuous Integration / Documentation on Github Pages (push) Has been cancelled
Some checks failed
Continuous Integration / format (push) Has been cancelled
Continuous Integration / clippy-check (push) Has been cancelled
Continuous Integration / smithay-check-features (push) Has been cancelled
Continuous Integration / check-msrv (push) Has been cancelled
Continuous Integration / check-minimal (push) Has been cancelled
Continuous Integration / smithay-tests (push) Has been cancelled
Continuous Integration / smallvil-check (push) Has been cancelled
Continuous Integration / anvil-check-features (push) Has been cancelled
Continuous Integration / WLCS: Bad Buffer Test (push) Has been cancelled
Continuous Integration / WLCS: Core tests (push) Has been cancelled
Continuous Integration / WLCS: Output tests (push) Has been cancelled
Continuous Integration / WLCS: Pointer input tests (push) Has been cancelled
Continuous Integration / Documentation on Github Pages (push) Has been cancelled
Fixes offset cursor position.
This commit is contained in:
parent
10c3f5a34a
commit
13333624f8
1 changed files with 4 additions and 2 deletions
|
@ -585,7 +585,8 @@ impl LayerSurface {
|
|||
let mut bounding_box = self.bbox();
|
||||
let surface = self.0.surface.wl_surface();
|
||||
for (popup, location) in PopupManager::popups_for_surface(surface) {
|
||||
bounding_box = bounding_box.merge(bbox_from_surface_tree(popup.wl_surface(), location));
|
||||
let offset = location - popup.geometry().loc;
|
||||
bounding_box = bounding_box.merge(bbox_from_surface_tree(popup.wl_surface(), offset));
|
||||
}
|
||||
|
||||
bounding_box
|
||||
|
@ -605,7 +606,8 @@ impl LayerSurface {
|
|||
if surface_type.contains(WindowSurfaceType::POPUP) {
|
||||
for (popup, location) in PopupManager::popups_for_surface(surface) {
|
||||
let surface = popup.wl_surface();
|
||||
if let Some(result) = under_from_surface_tree(surface, point, location, surface_type) {
|
||||
let offset = location - popup.geometry().loc;
|
||||
if let Some(result) = under_from_surface_tree(surface, point, offset, surface_type) {
|
||||
return Some(result);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue