Bug 390115 - On wayland, keyboard input that causes Firefox focus passes key presses to Firefox
Summary: On wayland, keyboard input that causes Firefox focus passes key presses to Fi...
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.12.0
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-09 00:01 UTC by Marcus Harrison
Modified: 2018-02-12 21:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: Wayland+
mgraesslin: X11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Harrison 2018-02-09 00:01:33 UTC
Sorry for the poorly-worded summary.

This only appears when running plasma-wayland.

If a keyboard press causes a previously-focused window to become unfocused, and makes Firefox the newly-focused window, the key-press is passed to Firefox as a duplicate.

To reproduce:

Example 1

1. Make Firefox the selected window. Focus a textarea HTML widget.
2. Open plasma's default Application Launcher.
3. Hit "Enter" to open any selected item.

Expected behaviour:
No key press is passed to Firefox and the selected item is opened.

Actual behaviour:
The "Enter" keypress is passed to Firefox, creating a newline in the text area. 
If Firefox has a HTML anchor element selected, it is activated, potentially switching pages. Forms can be unintentionally submitted, etc.


Example 2

1. Make Firefox the focused window.
2. Open a new application window, e.g. Kwrite or Konsole.
3. Use Alt+F4 to close the new window and make Firefox the focused window again.

Expected behaviour:
No key press is passed to Firefox and the previously-opened window is closed.

Actual behaviour:
The window is closed and the Firefox application menu (file, edit etc.) is focused.
Comment 1 Martin Flöser 2018-02-09 18:52:43 UTC
Which XWayland version are you using?
Comment 2 Marcus Harrison 2018-02-12 12:37:42 UTC
Sorry, how would I go about finding the version number? Thanks.
Comment 3 Martin Flöser 2018-02-12 15:55:13 UTC
(In reply to Marcus Harrison from comment #2)
> Sorry, how would I go about finding the version number? Thanks.

qdbus org.kde.KWin /KWin supportInformation
Comment 4 Marcus Harrison 2018-02-12 16:48:28 UTC
Here's the output, hopefully it helps. Cheers.

KWin-Unterstützungsinformationen:
Benutzen Sie die folgenden Informationen, wenn Sie nach Unterstützung fragen, z. B. auf http://forum.kde.org.
Sie enthalten Informationen über die momentan laufende Instanz, welche Optionen verwendet werden,
welcher OpenGL-Treiber verwendet wird und welche Effekte laufen.
Bitte geben Sie die unten stehenden Informationen bei einem Pastebin-Dienst wie http://paste.kde.org ein, anstatt sie direkt in die Hilfediskussionen zu schreiben.

==========================

Version
=======
KWin version: 5.12.0
Qt Version: 5.9.3
Qt compile version: 5.9.3
XCB compile version: 1.11.1

Operation Mode: Xwayland

Build Options
=============
KWIN_BUILD_DECORATIONS: yes
KWIN_BUILD_TABBOX: yes
KWIN_BUILD_ACTIVITIES: yes
HAVE_INPUT: yes
HAVE_DRM: yes
HAVE_GBM: yes
HAVE_X11_XCB: yes
HAVE_EPOXY_GLX: yes
HAVE_WAYLAND_EGL: yes

X11
===
Vendor: The X.Org Foundation
Vendor Release: 11804000
Protocol Version/Revision: 11/0
SHAPE: yes; Version: 0x11
RANDR: yes; Version: 0x14
DAMAGE: yes; Version: 0x11
Composite: yes; Version: 0x4
RENDER: yes; Version: 0xb
XFIXES: yes; Version: 0x50
SYNC: yes; Version: 0x31
GLX: yes; Version: 0x0

Decoration
==========
Plugin: org.kde.breeze
Theme: 
Blur: 0
onAllDesktopsAvailable: false
alphaChannelSupported: true
closeOnDoubleClickOnMenu: false
decorationButtonsLeft: 5, 3, 4
decorationButtonsRight: 
borderSize: 0
gridUnit: 12
font: Oxygen-Sans,11,-1,5,50,0,0,0,0,0,Sans-Book
smallSpacing: 3
largeSpacing: 12

Platform
==========
Name: DRM
Active: true
Atomic Mode Setting: true

Options
=======
focusPolicy: 0
nextFocusPrefersMouse: false
clickRaise: true
autoRaise: false
autoRaiseInterval: 0
delayFocusInterval: 0
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
rollOverDesktops: true
focusStealingPreventionLevel: 1
legacyFullscreenSupport: false
operationTitlebarDblClick: 5000
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: 0
commandActiveTitlebar2: 30
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 30
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 31
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
showGeometryTip: false
condensedTitle: false
electricBorderMaximize: true
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
glSmoothScale: 0
xrenderSmoothScale: false
maxFpsInterval: 16666666
refreshRate: 0
vBlankTime: 6000000
glStrictBinding: false
glStrictBindingFollowsDriver: true
glCoreProfile: true
glPreferBufferSwap: 101
glPlatformInterface: 2
windowsBlockCompositing: true

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: false
cursorPushBackDistance: 1x1
timeThreshold: 0
reActivateThreshold: 350
actionTopLeft: 0
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0

Screens
=======
Multi-Head: no
Active screen follows mouse:  no
Number of Screens: 1

Screen 0:
---------
Name: MEI eDP-1-VVX13F009G10
Geometry: 0,0,1920x1080
Scale: 1
Refresh Rate: 60.011


Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
OpenGL version string: 4.5 (Core Profile) Mesa 17.2.4
OpenGL platform interface: EGL
OpenGL shading language version string: 4.50
Driver: Intel
GPU class: Unknown
OpenGL version: 4.5
GLSL version: 4.50
Mesa version: 17.2.4
Linux kernel version: 4.13
Direct rendering: Requires strict binding: no
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used
Painting blocks for vertical retrace:  no

Loaded Effects:
---------------
zoom
kwin4_effect_logout
kwin4_effect_windowaperture
kwin4_effect_dialogparent
kwin4_effect_translucency
kwin4_effect_login
kwin4_effect_morphingpopups
kwin4_effect_frozenapp
kwin4_effect_fade
slidingpopups
slideback
slide
screenshot
minimizeanimation
desktopgrid
colorpicker
presentwindows
highlightwindow
blur
contrast
startupfeedback
screenedge
kscreen

Currently Active Effects:
-------------------------
blur
contrast

Effect Settings:
----------------
zoom:
zoomFactor: 1.2
mousePointer: 0
mouseTracking: 0
enableFocusTracking: false
followFocus: true
focusDelay: 350
moveFactor: 20
targetZoom: 1

kwin4_effect_logout:

kwin4_effect_windowaperture:

kwin4_effect_dialogparent:

kwin4_effect_translucency:

kwin4_effect_login:

kwin4_effect_morphingpopups:

kwin4_effect_frozenapp:

kwin4_effect_fade:

slidingpopups:
fadeInTime: 150
fadeOutTime: 250

slideback:

slide:

screenshot:

minimizeanimation:

desktopgrid:
zoomDuration: 300
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: true

colorpicker:

presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 20
fillGaps: true
fadeDuration: 150
showPanel: false
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0

highlightwindow:

blur:
blurRadius: 12
cacheTexture: false

contrast:

startupfeedback:
type: 1

screenedge:

kscreen:
Comment 5 Martin Flöser 2018-02-12 20:20:50 UTC
Hmm I thought that XWayland version has this bug fixed...
Comment 6 Martin Flöser 2018-02-12 21:04:04 UTC
Ok, I just compared. I'm already on XWayland 1.19 on Neon. Please update XWayland, it will fix this issue.