aboutsummaryrefslogtreecommitdiff
path: root/x11-wm
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2021-05-03 18:17:12 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2021-05-03 18:19:43 +0000
commit2a92ce401f52d3744457b7782cd0fa4a14a66ae2 (patch)
treee004cd2d09404eab19e8833efda420a160b2c55a /x11-wm
parent7d49bd2a1d6d506c3c6889b836e87496aa8df0b6 (diff)
downloadports-2a92ce401f52d3744457b7782cd0fa4a14a66ae2.tar.gz
ports-2a92ce401f52d3744457b7782cd0fa4a14a66ae2.zip
KDE Plasma Wayland: improve Wayland experience
- Backport an upstream fix for focus-follows-mouse (focus-changing by moving the mouse slowwwwwly didn't work), thanks upstream. - Simplify startplasma-wayland.sh script down to little more than documentation comments and ck-launch dbus-launch, thanks jbeich@
Diffstat (limited to 'x11-wm')
-rw-r--r--x11-wm/plasma5-kwin/Makefile2
-rw-r--r--x11-wm/plasma5-kwin/files/patch-git-425170b7814c1ff27b165982b93d78422621bddb83
2 files changed, 84 insertions, 1 deletions
diff --git a/x11-wm/plasma5-kwin/Makefile b/x11-wm/plasma5-kwin/Makefile
index fceab4c12ef4..a60e5dca2c88 100644
--- a/x11-wm/plasma5-kwin/Makefile
+++ b/x11-wm/plasma5-kwin/Makefile
@@ -1,6 +1,6 @@
PORTNAME= kwin
DISTVERSION= ${KDE_PLASMA_VERSION}
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= x11-wm kde kde-plasma
MAINTAINER= kde@FreeBSD.org
diff --git a/x11-wm/plasma5-kwin/files/patch-git-425170b7814c1ff27b165982b93d78422621bddb b/x11-wm/plasma5-kwin/files/patch-git-425170b7814c1ff27b165982b93d78422621bddb
new file mode 100644
index 000000000000..7d3a2293fe63
--- /dev/null
+++ b/x11-wm/plasma5-kwin/files/patch-git-425170b7814c1ff27b165982b93d78422621bddb
@@ -0,0 +1,83 @@
+commit 425170b7814c1ff27b165982b93d78422621bddb (origin/work/wayland-fix-focus-follows-mouse)
+Author: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Mon May 3 11:24:22 2021 +0300
+
+ wayland: Fix focus follows mouse policy
+
+ We want to update the input focus only if the pointer is moved. Due to
+ that, AbstractClient::enterEvent() checks the last seen pointer position
+ to decide whether the window needs to be focused.
+
+ The issue is that when the pointer moves from a decoration to a surface,
+ the cached pointer position will be updated to the current pointer
+ position, and thus the check in AbstractClient::enterEvent() will fail.
+
+ We need to update the cached pointer position only if there is a focused
+ decoration.
+
+diff --git src/input.cpp src/input.cpp
+index 9377e9334..b1b961e39 100644
+--- input.cpp
++++ input.cpp
+@@ -2846,6 +2846,7 @@ void InputDeviceHandler::update()
+ setAt(toplevel);
+
+ if (focusUpdatesBlocked()) {
++ workspace()->updateFocusMousePosition(position().toPoint());
+ return;
+ }
+
+@@ -2860,21 +2861,20 @@ void InputDeviceHandler::update()
+ // went onto or off from decoration, update focus
+ updateFocus();
+ }
+- return;
+- }
+- updateInternalWindow(nullptr);
++ } else {
++ updateInternalWindow(nullptr);
+
+- if (m_focus.focus != m_at.at) {
+- // focus change
+- updateDecoration();
+- updateFocus();
+- return;
+- }
+- // check if switched to/from decoration while staying on the same Toplevel
+- if (updateDecoration()) {
+- // went onto or off from decoration, update focus
+- updateFocus();
++ if (m_focus.focus != m_at.at) {
++ // focus change
++ updateDecoration();
++ updateFocus();
++ } else if (updateDecoration()) {
++ // went onto or off from decoration, update focus
++ updateFocus();
++ }
+ }
++
++ workspace()->updateFocusMousePosition(position().toPoint());
+ }
+
+ Toplevel *InputDeviceHandler::at() const
+diff --git src/pointer_input.cpp src/pointer_input.cpp
+index bf59197d3..a93c2cf55 100644
+--- pointer_input.cpp
++++ pointer_input.cpp
+@@ -473,7 +473,6 @@ void PointerInputRedirection::cleanupDecoration(Decoration::DecoratedClientImpl
+ {
+ disconnect(m_decorationGeometryConnection);
+ m_decorationGeometryConnection = QMetaObject::Connection();
+- workspace()->updateFocusMousePosition(position().toPoint());
+
+ if (old) {
+ // send leave event to old decoration
+@@ -524,7 +523,6 @@ void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow
+
+ if (AbstractClient *ac = qobject_cast<AbstractClient*>(focusNow)) {
+ ac->enterEvent(m_pos.toPoint());
+- workspace()->updateFocusMousePosition(m_pos.toPoint());
+ }
+
+ if (internalWindow()) {