Created attachment 213727 [details] Patch for x11-servers/xorg-server I would like to commit the attached patch to x11-servers/xorg-server. This is an upstream fix for a problem in xorg-server 1.20 that causes spurious FocusIn+FocusOut events to be sent. https://gitlab.freedesktop.org/xorg/xserver/-/commit/364d64981549544213e2bca8de6ff8a5b2b5a69e The problem is easily seen with games/burgerspace. If burgerspace is started in fullscreen mode (burgerspace --full-screen), the game keeps getting paused every few seconds. You don't need to start any gameplay, it already happens in attract mode. Press P to continue and it soon pauses again. The game purposely pauses when its window loses focus, i.e. it receives a FocusOut event. The bug in xserver 1.20 spams the game with spurious events. Here is the upstream description: ---- dix: do not send focus event when grab actually does not change c67f2eac ("dix: always send focus event on grab change") made dix always sent events when it's a NotifyGrab or NotifyUngrab, even if from == to, because 'from' can just come from a previous XSetInputFocus call. However, when an application calls XGrabKeyboard several times on the same window, we are now sending spurious FocusOut+FocusIn with NotifyGrab, even if the grab does not actually change. This makes screen readers for blind people spuriously emit activity events which disturb screen reading workflow when e.g. switching between menus. This commit avoids calling DoFocusEvents in that precise case, i.e. when oldWin is a previous grab and the new grab is the same window.
A commit references this bug: Author: zeising Date: Sun May 3 20:22:31 UTC 2020 New revision: 533807 URL: https://svnweb.freebsd.org/changeset/ports/533807 Log: xorg-server: Do not send spurious focus events Apply an upstream patch to avoid sending focus evens when grab actually does not change. This fixes certain full screen applications. [1] Ensure that we actually don't try to find and link against HAL even if it's around on the system we're compiling on [2] Add CPE information [3] PR: 245854 [1] (with changes), 245604 [2], 197712 [3] Submitted by: naddy@ [1], mi@ [2], arrowd [3] Reported by: shun [3] MFH: 2020Q2 Changes: head/x11-servers/xorg-server/Makefile head/x11-servers/xorg-server/distinfo
Committed, awaiting MFH.
A commit references this bug: Author: zeising Date: Mon May 4 16:08:17 UTC 2020 New revision: 533929 URL: https://svnweb.freebsd.org/changeset/ports/533929 Log: MFH: r533807 xorg-server: Do not send spurious focus events Apply an upstream patch to avoid sending focus evens when grab actually does not change. This fixes certain full screen applications. [1] Ensure that we actually don't try to find and link against HAL even if it's around on the system we're compiling on [2] Add CPE information [3] PR: 245854 [1] (with changes), 245604 [2], 197712 [3] Submitted by: naddy@ [1], mi@ [2], arrowd [3] Reported by: shun [3] Approved by: ports-secteam (joenum) Changes: _U branches/2020Q2/ branches/2020Q2/x11-servers/xorg-server/Makefile branches/2020Q2/x11-servers/xorg-server/distinfo
Merged, thanks!