From owner-dev-commits-ports-all@freebsd.org Mon May 3 18:19:46 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B0C66399B6; Mon, 3 May 2021 18:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FYrq60mSGz3LBF; Mon, 3 May 2021 18:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 02502226FB; Mon, 3 May 2021 18:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 143IJjIJ075217; Mon, 3 May 2021 18:19:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 143IJjlc075216; Mon, 3 May 2021 18:19:45 GMT (envelope-from git) Date: Mon, 3 May 2021 18:19:45 GMT Message-Id: <202105031819.143IJjlc075216@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Adriaan de Groot Subject: git: 2a92ce401f52 - main - KDE Plasma Wayland: improve Wayland experience MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adridg X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a92ce401f52d3744457b7782cd0fa4a14a66ae2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2021 18:19:46 -0000 The branch main has been updated by adridg: URL: https://cgit.FreeBSD.org/ports/commit/?id=2a92ce401f52d3744457b7782cd0fa4a14a66ae2 commit 2a92ce401f52d3744457b7782cd0fa4a14a66ae2 Author: Adriaan de Groot AuthorDate: 2021-05-03 18:17:12 +0000 Commit: Adriaan de Groot CommitDate: 2021-05-03 18:19:43 +0000 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@ --- x11-wm/plasma5-kwin/Makefile | 2 +- ...ch-git-425170b7814c1ff27b165982b93d78422621bddb | 83 ++++++++++++++++++++++ x11/plasma5-plasma-workspace/Makefile | 2 +- .../files/startplasma-wayland.sh | 39 +++++----- 4 files changed, 107 insertions(+), 19 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 +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(focusNow)) { + ac->enterEvent(m_pos.toPoint()); +- workspace()->updateFocusMousePosition(m_pos.toPoint()); + } + + if (internalWindow()) { diff --git a/x11/plasma5-plasma-workspace/Makefile b/x11/plasma5-plasma-workspace/Makefile index fbaacd9b9af0..52a6cfb40717 100644 --- a/x11/plasma5-plasma-workspace/Makefile +++ b/x11/plasma5-plasma-workspace/Makefile @@ -1,6 +1,6 @@ PORTNAME= plasma-workspace DISTVERSION= ${KDE_PLASMA_VERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11 kde kde-plasma MAINTAINER= kde@FreeBSD.org diff --git a/x11/plasma5-plasma-workspace/files/startplasma-wayland.sh b/x11/plasma5-plasma-workspace/files/startplasma-wayland.sh index cfd30dacc18a..b94c59f82efa 100755 --- a/x11/plasma5-plasma-workspace/files/startplasma-wayland.sh +++ b/x11/plasma5-plasma-workspace/files/startplasma-wayland.sh @@ -1,16 +1,21 @@ #! /bin/sh # -# Try to run a Plasma Wayland session; to be invoked from a text console +# Try to run a Plasma Wayland session; to be invoked from a text console. +# This script is far longer than it needs to be, because it documents +# all kinds of settings that you **might** want to set for specific +# use-cases or testing. ### TOOLKIT SETTINGS # -# Tell toolkits to use wayland -export MOZ_ENABLE_WAYLAND=1 -export GDK_BACKEND=wayland -export QT_QPA_PLATFORM=wayland-egl -export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 +# Force toolkits to use wayland. +# - MOZ is for Firefox +# - GDK is for GDK, will crash non-Wayland GDK-users like emacs +# - QPA is for Qt, forces EGL, causes graphics glitches +# export MOZ_ENABLE_WAYLAND=1 +# export GDK_BACKEND=wayland +# export QT_QPA_PLATFORM=wayland-egl -# Possible settings for drivers +### DRIVER SETTINGS # # Some (older) Intel HD iGPU need this: # export LIBVA_DRIVER_NAME=i965 @@ -18,27 +23,27 @@ export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 ### XDG SETTINGS # # -if test -z "$XDG_RUNTIME_DIR"; then - export XDG_RUNTIME_DIR=/tmp/`id -u`-runtime-dir - if ! test -d "$XDG_RUNTIME_DIR"; then - mkdir "$XDG_RUNTIME_DIR" - chmod 0700 "$XDG_RUNTIME_DIR" - fi -fi -export XDG_SESSION_TYPE=wayland +# export XDG_SESSION_TYPE=wayland -### KDE / Plasma / Qt settings +### KDE / Plasma / Qt SETTINGS # # # To switch on software rendering: # export KWIN_COMPOSE=Q +# Disable client-side-decorations: +# export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 # To log debug things: # export QT_LOGGING_RULES="kwin_core.debug=true;kwin_libinput.debug=true" # To log to a specific file (recommended if you're using the logging rules # and want to debug startup problems): # LOGFILE=/tmp/plasma-wayland.log -# TODO: check if ck-launch-session is needed +### STARTUP SEQUENCE +# +# Plasma needs a DBus session-bus, and it needs to have access to +# the DRM GPU (e.g. to /dev/dri/card0) which we arrange through +# ConsoleKit2. +# scaffolding="ck-launch-session" if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] ; then scaffolding="$scaffolding dbus-run-session"