fix: input to cropped tiled windows should be bound to the tile
This commit is contained in:
parent
b8807a541f
commit
2329cea5c9
2 changed files with 14 additions and 1 deletions
|
|
@ -788,7 +788,12 @@ impl State {
|
||||||
let shell = self.common.shell.read();
|
let shell = self.common.shell.read();
|
||||||
State::element_under(global_position, &output, &shell, &seat)
|
State::element_under(global_position, &output, &shell, &seat)
|
||||||
};
|
};
|
||||||
if let Some(target) = under {
|
// Grabbing a tiling resize handle (the gap between tiles) must not change keyboard focus
|
||||||
|
let on_resize_fork = matches!(
|
||||||
|
seat.get_pointer().unwrap().current_focus(),
|
||||||
|
Some(PointerFocusTarget::ResizeFork(_))
|
||||||
|
);
|
||||||
|
if let Some(target) = under.filter(|_| !on_resize_fork) {
|
||||||
if let Some(surface) = target.toplevel().map(Cow::into_owned)
|
if let Some(surface) = target.toplevel().map(Cow::into_owned)
|
||||||
&& seat.get_keyboard().unwrap().modifier_state().logo
|
&& seat.get_keyboard().unwrap().modifier_state().logo
|
||||||
&& !shortcuts_inhibited
|
&& !shortcuts_inhibited
|
||||||
|
|
|
||||||
|
|
@ -3180,6 +3180,10 @@ impl TilingLayout {
|
||||||
let location = location_f64.to_i32_round();
|
let location = location_f64.to_i32_round();
|
||||||
|
|
||||||
for (mapped, geo) in self.mapped() {
|
for (mapped, geo) in self.mapped() {
|
||||||
|
// Tiled windows are rendered cropped to their tile (`geo`), so input must be bound to the tile as well
|
||||||
|
if !geo.contains(location) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if !mapped.bbox().contains((location - geo.loc).as_logical()) {
|
if !mapped.bbox().contains((location - geo.loc).as_logical()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -3244,6 +3248,10 @@ impl TilingLayout {
|
||||||
|
|
||||||
if matches!(overview, OverviewMode::None) {
|
if matches!(overview, OverviewMode::None) {
|
||||||
for (mapped, geo) in self.mapped() {
|
for (mapped, geo) in self.mapped() {
|
||||||
|
// Tiled windows are rendered cropped to their tile (`geo`), so input must be bound to the tile as well
|
||||||
|
if !geo.contains(location) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if !mapped.bbox().contains((location - geo.loc).as_logical()) {
|
if !mapped.bbox().contains((location - geo.loc).as_logical()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue