@ -375,26 +375,27 @@ public:
auto keyboard = waylandServer ( ) - > seat ( ) - > keyboard ( ) ;
auto surface = keyboard - > focusedSurface ( ) ;
if ( ! surface ) {
return ;
}
ClientConnection * client = surface - > client ( ) ;
ClientConnection * xwaylandClient = waylandServer ( ) - > xWaylandConnection ( ) ;
if ( xwaylandClient & & xwaylandClient ! = client ) {
KeyboardKeyState state { event - > type ( ) = = QEvent : : KeyPress } ;
if ( ! updateKey ( event - > nativeScanCode ( ) , state ) ) {
if ( surface ) {
ClientConnection * client = surface - > client ( ) ;
if ( xwaylandClient & & xwaylandClient = = client ) {
return ;
}
}
auto xkb = input ( ) - > keyboard ( ) - > xkb ( ) ;
keyboard - > sendModifiers ( xkb - > modifierState ( ) . depressed ,
xkb - > modifierState ( ) . latched ,
xkb - > modifierState ( ) . locked ,
xkb - > currentLayout ( ) ) ;
keyboard - > sendKey ( event - > nativeScanCode ( ) , state , xwaylandClient ) ;
KeyboardKeyState state { event - > type ( ) = = QEvent : : KeyPress } ;
if ( ! updateKey ( event - > nativeScanCode ( ) , state ) ) {
return ;
}
auto xkb = input ( ) - > keyboard ( ) - > xkb ( ) ;
keyboard - > sendModifiers ( xkb - > modifierState ( ) . depressed ,
xkb - > modifierState ( ) . latched ,
xkb - > modifierState ( ) . locked ,
xkb - > currentLayout ( ) ) ;
keyboard - > sendKey ( event - > nativeScanCode ( ) , state , xwaylandClient ) ;
}
void pointerEvent ( KWin : : MouseEvent * event ) override
@ -406,17 +407,17 @@ public:
auto pointer = waylandServer ( ) - > seat ( ) - > pointer ( ) ;
auto surface = pointer - > focusedSurface ( ) ;
if ( ! surface ) {
return ;
}
ClientConnection * client = surface - > client ( ) ;
ClientConnection * xwaylandClient = waylandServer ( ) - > xWaylandConnection ( ) ;
if ( xwaylandClient & & xwaylandClient ! = client ) {
PointerButtonState state { event - > type ( ) = = QEvent : : MouseButtonPress } ;
pointer - > sendButton ( event - > nativeButton ( ) , state , xwaylandClient ) ;
if ( surface ) {
ClientConnection * client = surface - > client ( ) ;
if ( xwaylandClient & & xwaylandClient = = client ) {
return ;
}
}
PointerButtonState state { event - > type ( ) = = QEvent : : MouseButtonPress } ;
pointer - > sendButton ( event - > nativeButton ( ) , state , xwaylandClient ) ;
}
bool updateKey ( quint32 key , KeyboardKeyState state )