Skip to content

Commit

Permalink
Fix layer-shell popup coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Dec 18, 2023
1 parent b5f56cc commit 47de917
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handlers/layer_shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use smithay::wayland::shell::wlr_layer::{
use smithay::wayland::shell::xdg::PopupSurface;

use crate::niri::State;
use crate::popups::unconstrain_popup;
use crate::popups::{get_popup_toplevel_coords, unconstrain_popup};

impl WlrLayerShellHandler for State {
fn shell_state(&mut self) -> &mut WlrLayerShellState {
Expand Down Expand Up @@ -125,6 +125,7 @@ impl State {
// The target geometry for the positioner should be relative to its parent's geometry, so
// we will compute that here.
let mut target = Rectangle::from_loc_and_size((0, 0), output_geo.size);
target.loc -= get_popup_toplevel_coords(popup);
target.loc -= layer_geo.loc;

unconstrain_popup(target, popup)
Expand Down

0 comments on commit 47de917

Please sign in to comment.