@@ -19,7 +19,7 @@ use crate::{
19
19
grabs:: { ReleaseMode , ResizeEdge } ,
20
20
layout:: {
21
21
floating:: ResizeGrabMarker ,
22
- tiling:: { NodeDesc , TilingLayout } ,
22
+ tiling:: { NodeDesc , SwapWindowGrab , TilingLayout } ,
23
23
} ,
24
24
SeatExt , Trigger ,
25
25
} ,
@@ -44,7 +44,7 @@ use smithay::{
44
44
TabletToolButtonEvent , TabletToolEvent , TabletToolProximityEvent , TabletToolTipEvent ,
45
45
TabletToolTipState , TouchEvent ,
46
46
} ,
47
- desktop:: { utils:: under_from_surface_tree, WindowSurfaceType } ,
47
+ desktop:: { utils:: under_from_surface_tree, PopupKeyboardGrab , WindowSurfaceType } ,
48
48
input:: {
49
49
keyboard:: { FilterResult , KeysymHandle , ModifiersState } ,
50
50
pointer:: {
@@ -1428,7 +1428,12 @@ impl State {
1428
1428
1429
1429
let keyboard = seat. get_keyboard ( ) . unwrap ( ) ;
1430
1430
let pointer = seat. get_pointer ( ) . unwrap ( ) ;
1431
- let is_grabbed = keyboard. is_grabbed ( ) || pointer. is_grabbed ( ) ;
1431
+ // We're only interested in filtering keyboard grabs if we initiated them.
1432
+ // The easiest way to check that is to check the type of the grab.
1433
+ let keyboard_grabbed = keyboard. with_grab ( |_serial, grab| {
1434
+ grab. is :: < SwapWindowGrab > ( ) || grab. is :: < PopupKeyboardGrab < State > > ( )
1435
+ } ) == Some ( true ) ;
1436
+ let is_grabbed = keyboard_grabbed || pointer. is_grabbed ( ) ;
1432
1437
1433
1438
let current_focus = keyboard. current_focus ( ) ;
1434
1439
//this should fall back to active output since there may not be a focused output
0 commit comments