Compare commits

...

5 commits

10 changed files with 893 additions and 338 deletions

98
flake.lock generated
View file

@ -25,11 +25,11 @@
}, },
"catppuccin": { "catppuccin": {
"locked": { "locked": {
"lastModified": 1733001911, "lastModified": 1734397929,
"narHash": "sha256-uX/9m0TbdhEzuWA0muM5mI/AaWcLiDLjCCyu5Qr9MRk=", "narHash": "sha256-VCTVpU/RlrI9StxzDnqc1R3ZTQloLVALSkiN/Fgiad4=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "nix", "repo": "nix",
"rev": "a817009ebfd2cca7f70a77884e5098d0a8c83f8e", "rev": "21310cde33d3ee8023679dec01a9724a346c63ff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -219,11 +219,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733754861, "lastModified": 1734344598,
"narHash": "sha256-3JKzIou54yjiMVmvgdJwopekEvZxX3JDT8DpKZs4oXY=", "narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9ebaa80a227eaca9c87c53ed515ade013bc2bca9", "rev": "83ecd50915a09dca928971139d3a102377a8d242",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -239,11 +239,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733572789, "lastModified": 1734366194,
"narHash": "sha256-zjO6m5BqxXIyjrnUziAzk4+T4VleqjstNudSqWcpsHI=", "narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c7ffc9727d115e433fd884a62dc164b587ff651d", "rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -261,11 +261,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733762021, "lastModified": 1734162608,
"narHash": "sha256-QAc+GvjJXLyp7oy2Vt1LEjYnq6UXPAmncwpL5aZUsUM=", "narHash": "sha256-m2AX+3eiVqIK6uO7GbGY7SFnkkYOlR5fQiNI0eRvWOQ=",
"owner": "Jovian-Experiments", "owner": "Jovian-Experiments",
"repo": "Jovian-NixOS", "repo": "Jovian-NixOS",
"rev": "f2180c6fcfca4eaecd79eadba0b5874e9a1c70c1", "rev": "31bdf4c7c91204d65afbde01146deee0259a8fb7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -277,11 +277,11 @@
"lix": { "lix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1733740102, "lastModified": 1733932114,
"narHash": "sha256-zIm58tETZ5Z6Scsjrn9rPISLzH4kWb2MIoC/jdii5ts=", "narHash": "sha256-LN4pgLjGWztTlJ4oDcKWvDuTFeUUVgbmXoZ2EXG20Gw=",
"rev": "369e3f82f066866b4d75abc5fc66e5b8e2149b4c", "rev": "92ed9fee7d169febf53ea85961174fc0a22c2115",
"type": "tarball", "type": "tarball",
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/369e3f82f066866b4d75abc5fc66e5b8e2149b4c.tar.gz?rev=369e3f82f066866b4d75abc5fc66e5b8e2149b4c" "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/92ed9fee7d169febf53ea85961174fc0a22c2115.tar.gz?rev=92ed9fee7d169febf53ea85961174fc0a22c2115"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -336,11 +336,11 @@
}, },
"nix-flatpak": { "nix-flatpak": {
"locked": { "locked": {
"lastModified": 1733345341, "lastModified": 1734128415,
"narHash": "sha256-8S58zrdpzGhax6tmn1i+R3AA0N9DJMu5FQI8JkA0NNU=", "narHash": "sha256-HLwdVNxpuTsLlM3tCkpbQU6yCehdgf3kOS1G2SDlkzY=",
"owner": "gmodena", "owner": "gmodena",
"repo": "nix-flatpak", "repo": "nix-flatpak",
"rev": "ebb0be49fc381112ff37726c6dd6df4df2ef5a1b", "rev": "8bdc2540da516006d07b04019eb57ae0781a04b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -374,11 +374,11 @@
}, },
"nix-impermanence": { "nix-impermanence": {
"locked": { "locked": {
"lastModified": 1731242966, "lastModified": 1734200366,
"narHash": "sha256-B3C3JLbGw0FtLSWCjBxU961gLNv+BOOBC6WvstKLYMw=", "narHash": "sha256-0NursoP4BUdnc+wy+Mq3icHkXu/RgP1Sjo0MJxV2+Dw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "impermanence", "repo": "impermanence",
"rev": "3ed3f0eaae9fcc0a8331e77e9319c8a4abd8a71a", "rev": "c6323585fa0035d780e3d8906eb1b24b65d19a48",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -394,11 +394,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733629314, "lastModified": 1734234111,
"narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=", "narHash": "sha256-icEMqBt4HtGH52PU5FHidgBrNJvOfXH6VQKNtnD1aw8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8", "rev": "311d6cf3ad3f56cb051ffab1f480b2909b3f754d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -414,11 +414,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733629314, "lastModified": 1734234111,
"narHash": "sha256-U0vivjQFAwjNDYt49Krevs1murX9hKBFe2Ye0cHpgbU=", "narHash": "sha256-icEMqBt4HtGH52PU5FHidgBrNJvOfXH6VQKNtnD1aw8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "f1e477a7dd11e27e7f98b646349cd66bbabf2fb8", "rev": "311d6cf3ad3f56cb051ffab1f480b2909b3f754d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -436,11 +436,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733709556, "lastModified": 1734314370,
"narHash": "sha256-u0ll0DDrKlO7tiLGGtmphv3wFy5ReDuf0USo/OlfROU=", "narHash": "sha256-9PhjDAAuXP4tuJg+kM1AozKwBFyHHJ8ZqhQD+peqGtg=",
"owner": "Infinidoge", "owner": "Infinidoge",
"repo": "nix-minecraft", "repo": "nix-minecraft",
"rev": "8d11f147df83fe137d3d94f6f3646e3a52bec855", "rev": "616634de04e87b621bc3d495af114c4e9c6ccd36",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -451,11 +451,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1733481457, "lastModified": 1734352517,
"narHash": "sha256-IS3bxa4N1VMSh3/P6vhEAHQZecQ3oAlKCDvzCQSO5Is=", "narHash": "sha256-mfv+J/vO4nqmIOlq8Y1rRW8hVsGH3M+I2ESMjhuebDs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "e563803af3526852b6b1d77107a81908c66a9fcf", "rev": "b12e314726a4226298fe82776b4baeaa7bcf3dcd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -467,11 +467,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1733581040, "lastModified": 1734424634,
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -483,11 +483,11 @@
}, },
"nixpkgs-raw": { "nixpkgs-raw": {
"locked": { "locked": {
"lastModified": 1733550349, "lastModified": 1734323986,
"narHash": "sha256-NcGumB4Lr6KSDq+nIqXtNA8QwAQKDSZT7N9OTGWbTrs=", "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e2605d0744c2417b09f8bf850dfca42fcf537d34", "rev": "394571358ce82dff7411395829aa6a3aad45b907",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -498,11 +498,11 @@
}, },
"nixpkgs-unstable-raw": { "nixpkgs-unstable-raw": {
"locked": { "locked": {
"lastModified": 1733581040, "lastModified": 1734424634,
"narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01", "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -518,11 +518,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1733824207, "lastModified": 1734529681,
"narHash": "sha256-qGXcFigGMSFba29CtCnTgf/c9h+Dzh6yHcXTK16jXJ8=", "narHash": "sha256-pe/fHd6nuz8nxwyVsLDDilgy+0rXJ1iYhCFojFlV8QE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "f1ea8bb704f71d74dcc885d6bd149b5b661bb858", "rev": "29cbfd0aad3f30ed30312668b3d8dca522175349",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -541,11 +541,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733578387, "lastModified": 1733858086,
"narHash": "sha256-XkMZGeqg0GCRoSXvMcaHP7bdvWPRZxCK1sw1ASsc16E=", "narHash": "sha256-h2BDIDKiqgMpA6E+mu0RgMGy3FeM6k+EuJ9xgOQ1+zw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "plasma-manager", "repo": "plasma-manager",
"rev": "2a64e173f1effdcc86e25cba0601e8feedf89115", "rev": "7e2010249529931a3848054d5ff0dbf24675ab68",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -103,9 +103,7 @@
nixpkgs-unstable-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { nixpkgs-unstable-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches {
name = "patched-nixpkgs-unstable"; name = "patched-nixpkgs-unstable";
src = nixpkgs-unstable-raw; src = nixpkgs-unstable-raw;
patches = [ patches = [];
./nixpkgs-patches/pr361364.patch
];
}; };
nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches {
name = "patched-nixpkgs"; name = "patched-nixpkgs";

View file

@ -1,187 +0,0 @@
From c94ae7a159eb8cd86f46ca1ea81dbdca651510f4 Mon Sep 17 00:00:00 2001
From: Gaetan Lepage <gaetan@glepage.com>
Date: Tue, 3 Dec 2024 08:47:26 +0100
Subject: [PATCH 1/2] handheld-daemon: 3.6.1 -> 3.6.2
Diff: https://github.com/hhd-dev/hhd/compare/refs/tags/v3.6.1...v3.6.2
Changelog: https://github.com/hhd-dev/hhd/releases/tag/v3.6.2
---
pkgs/by-name/ha/handheld-daemon/package.nix | 87 ++++++++++++++-------
1 file changed, 57 insertions(+), 30 deletions(-)
diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix
index b99cd1c581476..6b5965e06e645 100644
--- a/pkgs/by-name/ha/handheld-daemon/package.nix
+++ b/pkgs/by-name/ha/handheld-daemon/package.nix
@@ -1,63 +1,90 @@
{
+ lib,
+ python3Packages,
fetchFromGitHub,
+
+ # dependencies
+ systemd,
hidapi,
+ coreutils,
kmod,
- lib,
- python3,
- toybox,
- lsof
+ dbus,
+ lsof,
}:
-python3.pkgs.buildPythonApplication rec {
+python3Packages.buildPythonApplication rec {
pname = "handheld-daemon";
- version = "3.6.1";
+ version = "3.6.2";
pyproject = true;
src = fetchFromGitHub {
owner = "hhd-dev";
repo = "hhd";
- rev = "refs/tags/v${version}";
- hash = "sha256-IdpSRb66G+WzTv/BC29r2OjO1b4VdWbV6OSzOoiFAO0=";
+ tag = "v${version}";
+ hash = "sha256-W1Ap6yTryBDozKe3aO413Fu0RBul9kEA9ACUTdYyOKM=";
};
- propagatedBuildInputs = with python3.pkgs; [
+ # This package relies on several programs expected to be on the user's PATH.
+ # We take a more reproducible approach by patching the absolute path to each of these required
+ # binaries.
+ postPatch = ''
+ substituteInPlace src/hhd/controller/lib/hid.py \
+ --replace-fail "libhidapi" "${lib.getLib hidapi}/lib/libhidapi"
+
+ substituteInPlace src/hhd/controller/lib/hide.py \
+ --replace-fail "/bin/chmod" "${lib.getExe' coreutils "chmod"}" \
+ --replace-fail "udevadm" "${lib.getExe' systemd "udevadm"}"
+
+ substituteInPlace src/hhd/controller/physical/evdev.py \
+ --replace-fail "udevadm" "${lib.getExe' systemd "udevadm"}"
+
+ substituteInPlace src/hhd/controller/physical/imu.py \
+ --replace-fail '"modprobe' '"${lib.getExe' kmod "modprobe"}'
+
+ substituteInPlace src/hhd/device/oxp/serial.py \
+ --replace-fail "udevadm" "${lib.getExe' systemd "udevadm"}"
+
+ substituteInPlace src/hhd/plugins/overlay/systemd.py \
+ --replace-fail "dbus-monitor" "${lib.getExe' dbus "dbus-monitor"}" \
+ --replace-fail "systemd-inhibit" "${lib.getExe' systemd "systemd-inhibit"}"
+
+ substituteInPlace src/hhd/plugins/overlay/x11.py \
+ --replace-fail "lsof" "${lib.getExe lsof}"
+
+ substituteInPlace src/hhd/plugins/plugin.py \
+ --replace-fail '"id"' '"${lib.getExe' coreutils "id"}"'
+ '';
+
+ build-system = with python3Packages; [
+ setuptools
+ ];
+
+ dependencies = with python3Packages; [
evdev
- hidapi
- kmod
+ pyserial
pyyaml
rich
setuptools
- toybox
xlib
- pyserial
- lsof
];
# This package doesn't have upstream tests.
doCheck = false;
- postPatch = ''
- # handheld-daemon contains a fork of the python module `hid`, so this hook
- # is borrowed from the `hid` derivation.
- hidapi=${hidapi}/lib/
- test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; }
- sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py
-
- # The generated udev rules point to /bin/chmod, which does not exist in NixOS
- chmod=${toybox}/bin/chmod
- sed -i -e "s|/bin/chmod|$chmod|" src/hhd/controller/lib/hide.py
- '';
-
postInstall = ''
install -Dm644 $src/usr/lib/udev/rules.d/83-hhd.rules -t $out/lib/udev/rules.d/
install -Dm644 $src/usr/lib/udev/hwdb.d/83-hhd.hwdb -t $out/lib/udev/hwdb.d/
'';
- meta = with lib; {
+ meta = {
homepage = "https://github.com/hhd-dev/hhd/";
description = "Linux support for handheld gaming devices like the Legion Go, ROG Ally, and GPD Win";
- platforms = platforms.linux;
- license = licenses.mit;
- maintainers = with maintainers; [ appsforartists toast ];
+ platforms = lib.platforms.linux;
+ changelog = "https://github.com/hhd-dev/hhd/releases/tag/v${version}";
+ license = lib.licenses.gpl3Only;
+ maintainers = with lib.maintainers; [
+ appsforartists
+ toast
+ ];
mainProgram = "hhd";
};
}
From 2cf68f2bf37655d730202f2e551b40172181801c Mon Sep 17 00:00:00 2001
From: Gaetan Lepage <gaetan@glepage.com>
Date: Mon, 9 Dec 2024 10:26:53 +0100
Subject: [PATCH 2/2] handheld-daemon: 3.6.2 -> 3.7.0
Diff: https://github.com/hhd-dev/hhd/compare/None...v3.7.0
Changelog: https://github.com/hhd-dev/hhd/releases/tag/v3.7.0
---
pkgs/by-name/ha/handheld-daemon/package.nix | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix
index 6b5965e06e645..2fe0c45eca77f 100644
--- a/pkgs/by-name/ha/handheld-daemon/package.nix
+++ b/pkgs/by-name/ha/handheld-daemon/package.nix
@@ -8,19 +8,20 @@
hidapi,
coreutils,
kmod,
+ efibootmgr,
dbus,
lsof,
}:
python3Packages.buildPythonApplication rec {
pname = "handheld-daemon";
- version = "3.6.2";
+ version = "3.7.0";
pyproject = true;
src = fetchFromGitHub {
owner = "hhd-dev";
repo = "hhd";
tag = "v${version}";
- hash = "sha256-W1Ap6yTryBDozKe3aO413Fu0RBul9kEA9ACUTdYyOKM=";
+ hash = "sha256-DkVdYnSEeaNZj76lhdU+9Pl0yzam2A2QGa3aHCmSHEA=";
};
# This package relies on several programs expected to be on the user's PATH.
@@ -40,6 +41,9 @@ python3Packages.buildPythonApplication rec {
substituteInPlace src/hhd/controller/physical/imu.py \
--replace-fail '"modprobe' '"${lib.getExe' kmod "modprobe"}'
+ substituteInPlace src/hhd/plugins/overlay/power.py \
+ --replace-fail '"efibootmgr"' '"${lib.getExe' efibootmgr "id"}"'
+
substituteInPlace src/hhd/device/oxp/serial.py \
--replace-fail "udevadm" "${lib.getExe' systemd "udevadm"}"

View file

@ -1,96 +0,0 @@
From fa8f6054c992f8f28781933a23bccb91b3341d6e Mon Sep 17 00:00:00 2001
From: Christian Muehlhaeuser <muesli@gmail.com>
Date: Tue, 8 Nov 2022 08:55:14 +0100
Subject: [PATCH] Add support for OSC-52 write-only clipboard access
Implements OSC-52 write-only clipboard access. Already supported by
a wide range of other terminals, including alacritty, foot, kitty,
urxvt, wezterm, xterm, and others.
I've intentionally omitted read access to the clipboard as that
comes with several security concerns, which should be discussed
first.
---
src/Vt102Emulation.cpp | 36 ++++++++++++++++++++++++++++++++++++
src/Vt102Emulation.h | 2 +-
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp
index 49b23c77d4..3b1e389106 100644
--- a/src/Vt102Emulation.cpp
+++ b/src/Vt102Emulation.cpp
@@ -12,8 +12,10 @@
#include <cstdio>
// Qt
+#include <QApplication>
#include <QAudioOutput>
#include <QBuffer>
+#include <QClipboard>
#include <QEvent>
#include <QKeyEvent>
#include <QTimer>
@@ -1153,6 +1155,40 @@ void Vt102Emulation::processSessionAttributeRequest(const int tokenSize, const u
connect(action, &KNotificationAction::activated, this, [this, notification]() {
_currentScreen->currentTerminalDisplay()->notificationClicked(notification->xdgActivationToken());
});
+ }
+ if (attribute == Clipboard) {
+ // Clipboard
+ QStringList params = value.split(QLatin1Char(';'));
+ if (params.length() == 0) {
+ return;
+ }
+
+ bool clipboard = false;
+ bool selection = false;
+ if (params[0].isEmpty() || params[0].contains(QLatin1Char('c')) || params[0].contains(QLatin1Char('s'))) {
+ clipboard = true;
+ }
+ if (params[0].contains(QLatin1Char('p'))) {
+ selection = true;
+ }
+
+ if (params.length() == 2) {
+ // Copy to clipboard
+ if (clipboard) {
+ QApplication::clipboard()->setText(QString::fromUtf8(QByteArray::fromBase64(params[1].toUtf8())), QClipboard::Clipboard);
+ }
+ if (selection) {
+ QApplication::clipboard()->setText(QString::fromUtf8(QByteArray::fromBase64(params[1].toUtf8())), QClipboard::Selection);
+ }
+ } else {
+ // Clear clipboard
+ if (clipboard) {
+ QApplication::clipboard()->clear(QClipboard::Clipboard);
+ }
+ if (selection) {
+ QApplication::clipboard()->clear(QClipboard::Selection);
+ }
+ }
return;
}
diff --git a/src/Vt102Emulation.h b/src/Vt102Emulation.h
index 665e9f026d..3456e068d3 100644
--- a/src/Vt102Emulation.h
+++ b/src/Vt102Emulation.h
@@ -126,7 +126,6 @@ private:
void resetModes();
void resetTokenizer();
-#define MAX_TOKEN_LENGTH 256 // Max length of tokens (e.g. window title)
void addToCurrentToken(uint cc);
int tokenBufferPos;
@@ -183,6 +182,7 @@ private:
enum osc {
// https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands
ReportColors = 4,
+ Clipboard = 52,
ResetColors = 104,
// https://gitlab.freedesktop.org/Per_Bothner/specifications/blob/master/proposals/semantic-prompts.md
SemanticPrompts = 133,
--
GitLab

View file

@ -0,0 +1,41 @@
diff --git a/src/plugins/private/expolayout.cpp b/src/plugins/private/expolayout.cpp
index 52e8bd6616..d4f2a41acc 100644
--- a/src/plugins/private/expolayout.cpp
+++ b/src/plugins/private/expolayout.cpp
@@ -7,6 +7,7 @@
#include "expolayout.h"
+#include <QQmlProperty>
#include <cmath>
#include <deque>
#include <tuple>
@@ -41,6 +42,12 @@ ExpoCell::~ExpoCell()
void ExpoCell::componentComplete()
{
QQuickItem::componentComplete();
+
+ QQmlProperty xProperty(this, "Kirigami.ScenePosition.x", qmlContext(this));
+ xProperty.connectNotifySignal(this, SLOT(updateContentItemGeometry()));
+ QQmlProperty yProperty(this, "Kirigami.ScenePosition.y", qmlContext(this));
+ yProperty.connectNotifySignal(this, SLOT(updateContentItemGeometry()));
+
updateContentItemGeometry();
}
diff --git a/src/plugins/private/expolayout.h b/src/plugins/private/expolayout.h
index 0d4f9d5cde..d980c2aabb 100644
--- a/src/plugins/private/expolayout.h
+++ b/src/plugins/private/expolayout.h
@@ -264,8 +264,10 @@ Q_SIGNALS:
void persistentKeyChanged();
void bottomMarginChanged();
-private:
+private Q_SLOTS:
void updateContentItemGeometry();
+
+private:
void updateLayout();
QString m_persistentKey;

View file

@ -0,0 +1,753 @@
diff --git a/src/plugins/zoom/CMakeLists.txt b/src/plugins/zoom/CMakeLists.txt
index c27bdbbb2d..b5fb343e17 100644
--- a/src/plugins/zoom/CMakeLists.txt
+++ b/src/plugins/zoom/CMakeLists.txt
@@ -4,6 +4,7 @@
set(zoom_SOURCES
main.cpp
zoom.cpp
+ zoom.qrc
)
if (HAVE_ACCESSIBILITY)
diff --git a/src/plugins/zoom/shaders/pixelgrid.frag b/src/plugins/zoom/shaders/pixelgrid.frag
new file mode 100644
index 0000000000..1e9ee9431f
--- /dev/null
+++ b/src/plugins/zoom/shaders/pixelgrid.frag
@@ -0,0 +1,25 @@
+#include "colormanagement.glsl"
+
+uniform sampler2D sampler;
+uniform int textureWidth;
+uniform int textureHeight;
+
+varying vec2 texcoord0;
+
+void main()
+{
+ vec2 texSize = vec2(textureWidth, textureHeight);
+ vec2 samplePosition = texcoord0 * texSize;
+ vec2 pixelCenter = floor(samplePosition) + vec2(0.5);
+ vec2 pixelCenterDistance = abs(samplePosition - pixelCenter);
+
+ vec4 tex;
+ if (pixelCenterDistance.x > 0.4 || pixelCenterDistance.y > 0.4) {
+ tex = vec4(0, 0, 0, 1);
+ } else {
+ tex = texture2D(sampler, pixelCenter / texSize);
+ }
+
+ tex = sourceEncodingToNitsInDestinationColorspace(tex);
+ gl_FragColor = nitsToDestinationEncoding(tex);
+}
diff --git a/src/plugins/zoom/shaders/pixelgrid_core.frag b/src/plugins/zoom/shaders/pixelgrid_core.frag
new file mode 100644
index 0000000000..a1cc7f27f2
--- /dev/null
+++ b/src/plugins/zoom/shaders/pixelgrid_core.frag
@@ -0,0 +1,24 @@
+#version 140
+
+#include "colormanagement.glsl"
+
+uniform sampler2D sampler;
+uniform int textureWidth;
+uniform int textureHeight;
+
+in vec2 texcoord0;
+
+out vec4 fragColor;
+
+void main()
+{
+ vec2 texSize = vec2(textureWidth, textureHeight);
+ vec2 samplePosition = texcoord0 * texSize;
+ vec2 pixelCenter = floor(samplePosition) + vec2(0.5);
+ vec2 pixelCenterDistance = abs(samplePosition - pixelCenter);
+
+ float t = smoothstep(0.4, 0.5, max(pixelCenterDistance.x, pixelCenterDistance.y));
+ vec4 tex = mix(texture(sampler, pixelCenter / texSize), vec4(0, 0, 0, 1), t);
+ tex = sourceEncodingToNitsInDestinationColorspace(tex);
+ fragColor = nitsToDestinationEncoding(tex);
+}
diff --git a/src/plugins/zoom/ui_zoom_config.h b/src/plugins/zoom/ui_zoom_config.h
new file mode 100644
index 0000000000..7e5944a902
--- /dev/null
+++ b/src/plugins/zoom/ui_zoom_config.h
@@ -0,0 +1,195 @@
+/********************************************************************************
+** Form generated from reading UI file 'zoom_config.ui'
+**
+** Created by: Qt User Interface Compiler version 6.8.1
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef UI_ZOOM_CONFIG_H
+#define UI_ZOOM_CONFIG_H
+
+#include <QtCore/QVariant>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QCheckBox>
+#include <QtWidgets/QComboBox>
+#include <QtWidgets/QDoubleSpinBox>
+#include <QtWidgets/QGridLayout>
+#include <QtWidgets/QGroupBox>
+#include <QtWidgets/QHBoxLayout>
+#include <QtWidgets/QLabel>
+#include <QtWidgets/QVBoxLayout>
+#include <QtWidgets/QWidget>
+#include "kshortcutseditor.h"
+
+namespace KWin {
+
+class Ui_ZoomEffectConfigForm
+{
+public:
+ QVBoxLayout *verticalLayout_2;
+ QGroupBox *groupSize;
+ QHBoxLayout *horizontalLayout;
+ QGridLayout *gridLayout;
+ QLabel *label;
+ QDoubleSpinBox *kcfg_ZoomFactor;
+ QCheckBox *kcfg_EnableFocusTracking;
+ QCheckBox *kcfg_EnableTextCaretTracking;
+ QLabel *label_2;
+ QComboBox *kcfg_MousePointer;
+ QComboBox *kcfg_MouseTracking;
+ QLabel *label_3;
+ KShortcutsEditor *editor;
+
+ void setupUi(QWidget *KWin__ZoomEffectConfigForm)
+ {
+ if (KWin__ZoomEffectConfigForm->objectName().isEmpty())
+ KWin__ZoomEffectConfigForm->setObjectName("KWin__ZoomEffectConfigForm");
+ KWin__ZoomEffectConfigForm->resize(304, 288);
+ verticalLayout_2 = new QVBoxLayout(KWin__ZoomEffectConfigForm);
+ verticalLayout_2->setObjectName("verticalLayout_2");
+ groupSize = new QGroupBox(KWin__ZoomEffectConfigForm);
+ groupSize->setObjectName("groupSize");
+ horizontalLayout = new QHBoxLayout(groupSize);
+ horizontalLayout->setObjectName("horizontalLayout");
+ gridLayout = new QGridLayout();
+ gridLayout->setObjectName("gridLayout");
+ label = new QLabel(groupSize);
+ label->setObjectName("label");
+ label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+
+ gridLayout->addWidget(label, 0, 0, 1, 1);
+
+ kcfg_ZoomFactor = new QDoubleSpinBox(groupSize);
+ kcfg_ZoomFactor->setObjectName("kcfg_ZoomFactor");
+ kcfg_ZoomFactor->setDecimals(2);
+ kcfg_ZoomFactor->setMaximum(9999.000000000000000);
+ kcfg_ZoomFactor->setSingleStep(0.050000000000000);
+ kcfg_ZoomFactor->setValue(1.250000000000000);
+
+ gridLayout->addWidget(kcfg_ZoomFactor, 0, 1, 1, 1);
+
+ kcfg_EnableFocusTracking = new QCheckBox(groupSize);
+ kcfg_EnableFocusTracking->setObjectName("kcfg_EnableFocusTracking");
+
+ gridLayout->addWidget(kcfg_EnableFocusTracking, 4, 0, 1, 2);
+
+ kcfg_EnableTextCaretTracking = new QCheckBox(groupSize);
+ kcfg_EnableTextCaretTracking->setObjectName("kcfg_EnableTextCaretTracking");
+
+ gridLayout->addWidget(kcfg_EnableTextCaretTracking, 5, 0, 1, 2);
+
+ label_2 = new QLabel(groupSize);
+ label_2->setObjectName("label_2");
+ label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+
+ gridLayout->addWidget(label_2, 2, 0, 1, 1);
+
+ kcfg_MousePointer = new QComboBox(groupSize);
+ kcfg_MousePointer->addItem(QString());
+ kcfg_MousePointer->addItem(QString());
+ kcfg_MousePointer->addItem(QString());
+ kcfg_MousePointer->setObjectName("kcfg_MousePointer");
+
+ gridLayout->addWidget(kcfg_MousePointer, 2, 1, 1, 1);
+
+ kcfg_MouseTracking = new QComboBox(groupSize);
+ kcfg_MouseTracking->addItem(QString());
+ kcfg_MouseTracking->addItem(QString());
+ kcfg_MouseTracking->addItem(QString());
+ kcfg_MouseTracking->addItem(QString());
+ kcfg_MouseTracking->setObjectName("kcfg_MouseTracking");
+
+ gridLayout->addWidget(kcfg_MouseTracking, 3, 1, 1, 1);
+
+ label_3 = new QLabel(groupSize);
+ label_3->setObjectName("label_3");
+ label_3->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
+
+ gridLayout->addWidget(label_3, 3, 0, 1, 1);
+
+
+ horizontalLayout->addLayout(gridLayout);
+
+
+ verticalLayout_2->addWidget(groupSize);
+
+ editor = new KShortcutsEditor(KWin__ZoomEffectConfigForm);
+ editor->setObjectName("editor");
+ QSizePolicy sizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Expanding);
+ sizePolicy.setHorizontalStretch(0);
+ sizePolicy.setVerticalStretch(0);
+ sizePolicy.setHeightForWidth(editor->sizePolicy().hasHeightForWidth());
+ editor->setSizePolicy(sizePolicy);
+ editor->setActionTypes(KShortcutsEditor::GlobalAction);
+
+ verticalLayout_2->addWidget(editor);
+
+#if QT_CONFIG(shortcut)
+ label->setBuddy(kcfg_ZoomFactor);
+ label_2->setBuddy(kcfg_MousePointer);
+ label_3->setBuddy(kcfg_MouseTracking);
+#endif // QT_CONFIG(shortcut)
+ QWidget::setTabOrder(kcfg_ZoomFactor, kcfg_MousePointer);
+ QWidget::setTabOrder(kcfg_MousePointer, kcfg_MouseTracking);
+ QWidget::setTabOrder(kcfg_MouseTracking, kcfg_EnableFocusTracking);
+ QWidget::setTabOrder(kcfg_EnableFocusTracking, kcfg_EnableTextCaretTracking);
+
+ retranslateUi(KWin__ZoomEffectConfigForm);
+
+ QMetaObject::connectSlotsByName(KWin__ZoomEffectConfigForm);
+ } // setupUi
+
+ void retranslateUi(QWidget *KWin__ZoomEffectConfigForm)
+ {
+ groupSize->setTitle(QString());
+#if QT_CONFIG(whatsthis)
+ label->setWhatsThis(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "On zoom-in and zoom-out change the zoom by the defined zoom-factor.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ label->setText(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Zoom Factor:", nullptr));
+#if QT_CONFIG(whatsthis)
+ kcfg_ZoomFactor->setWhatsThis(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "On zoom-in and zoom-out change the zoom by the defined zoom-factor.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ kcfg_ZoomFactor->setSuffix(QString());
+#if QT_CONFIG(tooltip)
+ kcfg_EnableFocusTracking->setToolTip(QString());
+#endif // QT_CONFIG(tooltip)
+#if QT_CONFIG(whatsthis)
+ kcfg_EnableFocusTracking->setWhatsThis(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Enable tracking of the focused location. This needs QAccessible to be enabled per application (\"export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1\").", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ kcfg_EnableFocusTracking->setText(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Enable Focus Tracking", nullptr));
+#if QT_CONFIG(whatsthis)
+ kcfg_EnableTextCaretTracking->setWhatsThis(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Enable tracking of the text cursor. This needs QAccessible to be enabled per application (\"export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1\").", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ kcfg_EnableTextCaretTracking->setText(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Enable Text Cursor Tracking", nullptr));
+ label_2->setText(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Mouse Pointer:", nullptr));
+ kcfg_MousePointer->setItemText(0, QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Scale", nullptr));
+ kcfg_MousePointer->setItemText(1, QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Keep", nullptr));
+ kcfg_MousePointer->setItemText(2, QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Hide", nullptr));
+
+#if QT_CONFIG(whatsthis)
+ kcfg_MousePointer->setWhatsThis(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Visibility of the mouse-pointer.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ kcfg_MouseTracking->setItemText(0, QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Proportional", nullptr));
+ kcfg_MouseTracking->setItemText(1, QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Centered", nullptr));
+ kcfg_MouseTracking->setItemText(2, QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Push", nullptr));
+ kcfg_MouseTracking->setItemText(3, QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Disabled", nullptr));
+
+#if QT_CONFIG(whatsthis)
+ kcfg_MouseTracking->setWhatsThis(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Track moving of the mouse.", nullptr));
+#endif // QT_CONFIG(whatsthis)
+ label_3->setText(QCoreApplication::translate("KWin::ZoomEffectConfigForm", "Mouse Tracking:", nullptr));
+ (void)KWin__ZoomEffectConfigForm;
+ } // retranslateUi
+
+};
+
+} // namespace KWin
+
+namespace KWin {
+namespace Ui {
+ class ZoomEffectConfigForm: public Ui_ZoomEffectConfigForm {};
+} // namespace Ui
+} // namespace KWin
+
+#endif // UI_ZOOM_CONFIG_H
diff --git a/src/plugins/zoom/zoom.cpp b/src/plugins/zoom/zoom.cpp
index a6eb528767..950583c15b 100644
--- a/src/plugins/zoom/zoom.cpp
+++ b/src/plugins/zoom/zoom.cpp
@@ -31,6 +31,12 @@
using namespace std::chrono_literals;
+static void ensureResources()
+{
+ // Must initialize resources manually because the effect is a static lib.
+ Q_INIT_RESOURCE(zoom);
+}
+
namespace KWin
{
@@ -48,6 +54,8 @@ ZoomEffect::ZoomEffect()
, moveFactor(20.0)
, lastPresentTime(std::chrono::milliseconds::zero())
{
+ ensureResources();
+
ZoomConfig::instance(effects->config());
QAction *a = nullptr;
a = KStandardAction::zoomIn(this, SLOT(zoomIn()), this);
@@ -214,6 +222,7 @@ void ZoomEffect::reconfigure(ReconfigureFlags)
ZoomConfig::self()->read();
// On zoom-in and zoom-out change the zoom by the defined zoom-factor.
zoomFactor = std::max(0.1, ZoomConfig::zoomFactor());
+ m_pixelGridZoom = ZoomConfig::pixelGridZoom();
// Visibility of the mouse-pointer.
mousePointer = MousePointerType(ZoomConfig::mousePointer());
// Track moving of the mouse.
@@ -271,12 +280,10 @@ void ZoomEffect::prePaintScreen(ScreenPrePaintData &data, std::chrono::milliseco
ZoomEffect::OffscreenData *ZoomEffect::ensureOffscreenData(const RenderTarget &renderTarget, const RenderViewport &viewport, Output *screen)
{
- const QRect rect = viewport.renderRect().toRect();
- const qreal devicePixelRatio = viewport.scale();
- const QSize nativeSize = (viewport.renderRect().size() * devicePixelRatio).toSize();
+ const QSize nativeSize = renderTarget.size();
OffscreenData &data = m_offscreenData[effects->waylandDisplay() ? screen : nullptr];
- data.viewport = rect;
+ data.viewport = viewport.renderRect();
data.color = renderTarget.colorDescription();
const GLenum textureFormat = renderTarget.colorDescription() == ColorDescription::sRGB ? GL_RGBA8 : GL_RGBA16F;
@@ -290,9 +297,22 @@ ZoomEffect::OffscreenData *ZoomEffect::ensureOffscreenData(const RenderTarget &r
data.framebuffer = std::make_unique<GLFramebuffer>(data.texture.get());
}
+ data.texture->setContentTransform(renderTarget.transform());
return &data;
}
+GLShader *ZoomEffect::shaderForZoom(double zoom)
+{
+ if (zoom < m_pixelGridZoom) {
+ return ShaderManager::instance()->shader(ShaderTrait::MapTexture | ShaderTrait::TransformColorspace);
+ } else {
+ if (!m_pixelGridShader) {
+ m_pixelGridShader = ShaderManager::instance()->generateShaderFromFile(ShaderTrait::MapTexture, QString(), QStringLiteral(":/effects/zoom/shaders/pixelgrid.frag"));
+ }
+ return m_pixelGridShader.get();
+ }
+}
+
void ZoomEffect::paintScreen(const RenderTarget &renderTarget, const RenderViewport &viewport, int mask, const QRegion &region, Output *screen)
{
OffscreenData *offscreenData = ensureOffscreenData(renderTarget, viewport, screen);
@@ -391,7 +411,8 @@ void ZoomEffect::paintScreen(const RenderTarget &renderTarget, const RenderViewp
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
- auto shader = ShaderManager::instance()->pushShader(ShaderTrait::MapTexture | ShaderTrait::TransformColorspace);
+ GLShader *shader = shaderForZoom(zoom);
+ ShaderManager::instance()->pushShader(shader);
for (auto &[screen, offscreen] : m_offscreenData) {
QMatrix4x4 matrix;
matrix.translate(xTranslation * scale, yTranslation * scale);
@@ -399,6 +420,8 @@ void ZoomEffect::paintScreen(const RenderTarget &renderTarget, const RenderViewp
matrix.translate(offscreen.viewport.x() * scale, offscreen.viewport.y() * scale);
shader->setUniform(GLShader::Mat4Uniform::ModelViewProjectionMatrix, viewport.projectionMatrix() * matrix);
+ shader->setUniform(GLShader::IntUniform::TextureWidth, offscreen.texture->width());
+ shader->setUniform(GLShader::IntUniform::TextureHeight, offscreen.texture->height());
shader->setColorspaceUniforms(offscreen.color, renderTarget.colorDescription(), RenderingIntent::Perceptual);
offscreen.texture->render(offscreen.viewport.size() * scale);
diff --git a/src/plugins/zoom/zoom.h b/src/plugins/zoom/zoom.h
index 2a44395d74..1c9abb4b4e 100644
--- a/src/plugins/zoom/zoom.h
+++ b/src/plugins/zoom/zoom.h
@@ -26,6 +26,7 @@ class ZoomAccessibilityIntegration;
class GLFramebuffer;
class GLTexture;
class GLVertexBuffer;
+class GLShader;
class ZoomEffect
: public Effect
@@ -94,7 +95,7 @@ private:
{
std::unique_ptr<GLTexture> texture;
std::unique_ptr<GLFramebuffer> framebuffer;
- QRect viewport;
+ QRectF viewport;
ColorDescription color = ColorDescription::sRGB;
};
@@ -102,6 +103,8 @@ private:
OffscreenData *ensureOffscreenData(const RenderTarget &renderTarget, const RenderViewport &viewport, Output *screen);
void markCursorTextureDirty();
+ GLShader *shaderForZoom(double zoom);
+
#if HAVE_ACCESSIBILITY
ZoomAccessibilityIntegration *m_accessibilityIntegration = nullptr;
#endif
@@ -136,6 +139,8 @@ private:
double moveFactor;
std::chrono::milliseconds lastPresentTime;
std::map<Output *, OffscreenData> m_offscreenData;
+ std::unique_ptr<GLShader> m_pixelGridShader;
+ double m_pixelGridZoom;
};
} // namespace
diff --git a/src/plugins/zoom/zoom.kcfg b/src/plugins/zoom/zoom.kcfg
index 63887e32aa..ed43e225c8 100644
--- a/src/plugins/zoom/zoom.kcfg
+++ b/src/plugins/zoom/zoom.kcfg
@@ -29,5 +29,8 @@
<entry name="InitialZoom" type="Double">
<default>1.0</default>
</entry>
+ <entry name="PixelGridZoom" type="Double">
+ <default>15.0</default>
+ </entry>
</group>
</kcfg>
diff --git a/src/plugins/zoom/zoom.qrc b/src/plugins/zoom/zoom.qrc
new file mode 100644
index 0000000000..56e7369003
--- /dev/null
+++ b/src/plugins/zoom/zoom.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/effects/zoom/">
+ <file>shaders/pixelgrid.frag</file>
+ <file>shaders/pixelgrid_core.frag</file>
+</qresource>
+</RCC>
diff --git a/src/plugins/zoom/zoom_config.ui b/src/plugins/zoom/zoom_config.ui
index 454f9f9161..4b8a5c000e 100644
--- a/src/plugins/zoom/zoom_config.ui
+++ b/src/plugins/zoom/zoom_config.ui
@@ -6,159 +6,157 @@
<rect>
<x>0</x>
<y>0</y>
- <width>304</width>
- <height>288</height>
+ <width>595</width>
+ <height>551</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QGroupBox" name="groupSize">
- <property name="title">
- <string/>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="formAlignment">
+ <set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="whatsThis">
- <string>On zoom-in and zoom-out change the zoom by the defined zoom-factor.</string>
- </property>
- <property name="text">
- <string>Zoom Factor:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>kcfg_ZoomFactor</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QDoubleSpinBox" name="kcfg_ZoomFactor">
- <property name="whatsThis">
- <string>On zoom-in and zoom-out change the zoom by the defined zoom-factor.</string>
- </property>
- <property name="suffix">
- <string/>
- </property>
- <property name="decimals">
- <number>2</number>
- </property>
- <property name="maximum">
- <double>9999.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>0.050000000000000</double>
- </property>
- <property name="value">
- <double>1.250000000000000</double>
- </property>
- </widget>
- </item>
- <item row="4" column="0" colspan="2">
- <widget class="QCheckBox" name="kcfg_EnableFocusTracking">
- <property name="toolTip">
- <string/>
- </property>
- <property name="whatsThis">
- <string>Enable tracking of the focused location. This needs QAccessible to be enabled per application (&quot;export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1&quot;).</string>
- </property>
- <property name="text">
- <string>Enable Focus Tracking</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0" colspan="2">
- <widget class="QCheckBox" name="kcfg_EnableTextCaretTracking">
- <property name="whatsThis">
- <string>Enable tracking of the text cursor. This needs QAccessible to be enabled per application (&quot;export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1&quot;).</string>
- </property>
- <property name="text">
- <string>Enable Text Cursor Tracking</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Mouse Pointer:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>kcfg_MousePointer</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QComboBox" name="kcfg_MousePointer">
- <property name="whatsThis">
- <string>Visibility of the mouse-pointer.</string>
- </property>
- <item>
- <property name="text">
- <string>Scale</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Keep</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Hide</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QComboBox" name="kcfg_MouseTracking">
- <property name="whatsThis">
- <string>Track moving of the mouse.</string>
- </property>
- <item>
- <property name="text">
- <string>Proportional</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Centered</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Push</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Disabled</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Mouse Tracking:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>kcfg_MouseTracking</cstring>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="whatsThis">
+ <string>On zoom-in and zoom-out change the zoom by the defined zoom-factor.</string>
+ </property>
+ <property name="text">
+ <string>Zoom factor:</string>
+ </property>
+ <property name="buddy">
+ <cstring>kcfg_ZoomFactor</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QDoubleSpinBox" name="kcfg_ZoomFactor">
+ <property name="whatsThis">
+ <string>On zoom-in and zoom-out change the zoom by the defined zoom-factor.</string>
+ </property>
+ <property name="suffix">
+ <string/>
+ </property>
+ <property name="decimals">
+ <number>2</number>
+ </property>
+ <property name="maximum">
+ <double>9999.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.050000000000000</double>
+ </property>
+ <property name="value">
+ <double>1.250000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Show pixel grid at zoom level:</string>
+ </property>
+ <property name="buddy">
+ <cstring>kcfg_PixelGridZoom</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QDoubleSpinBox" name="kcfg_PixelGridZoom"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Mouse pointer:</string>
+ </property>
+ <property name="buddy">
+ <cstring>kcfg_MousePointer</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QComboBox" name="kcfg_MousePointer">
+ <property name="whatsThis">
+ <string>Visibility of the mouse-pointer.</string>
+ </property>
+ <item>
+ <property name="text">
+ <string>Scale</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Keep</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Hide</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Mouse tracking:</string>
+ </property>
+ <property name="buddy">
+ <cstring>kcfg_MouseTracking</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QComboBox" name="kcfg_MouseTracking">
+ <property name="whatsThis">
+ <string>Track moving of the mouse.</string>
+ </property>
+ <item>
+ <property name="text">
+ <string>Proportional</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Centered</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Push</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Disabled</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QCheckBox" name="kcfg_EnableFocusTracking">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="whatsThis">
+ <string>Enable tracking of the focused location. This needs QAccessible to be enabled per application (&quot;export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1&quot;).</string>
+ </property>
+ <property name="text">
+ <string>Enable focus tracking</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QCheckBox" name="kcfg_EnableTextCaretTracking">
+ <property name="whatsThis">
+ <string>Enable tracking of the text cursor. This needs QAccessible to be enabled per application (&quot;export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1&quot;).</string>
+ </property>
+ <property name="text">
+ <string>Enable text cursor tracking</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<widget class="KShortcutsEditor" name="editor">
@@ -183,13 +181,6 @@
<container>1</container>
</customwidget>
</customwidgets>
- <tabstops>
- <tabstop>kcfg_ZoomFactor</tabstop>
- <tabstop>kcfg_MousePointer</tabstop>
- <tabstop>kcfg_MouseTracking</tabstop>
- <tabstop>kcfg_EnableFocusTracking</tabstop>
- <tabstop>kcfg_EnableTextCaretTracking</tabstop>
- </tabstops>
<resources/>
<connections/>
</ui>

View file

@ -0,0 +1,39 @@
From 5301b211fc87f1b2253e87da61ff82618be9e899 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niccol=C3=B2=20Venerandi?= <niccolo@venerandi.com>
Date: Thu, 5 Dec 2024 16:12:58 +0100
Subject: [PATCH] Only return valid task item size if task manager has been
resized to fit panel
Previously the task manager would briefly have null width and height, before
being resized to fit the panel. However, the "preferredMaxWidth" for tasks
would still be positive, as it adds margins to it, and tasks would then
assume a positive width. When the proper values are set, this casuses
an extra resize animation.
CCBUG:447476
---
.../taskmanager/package/contents/ui/code/layoutmetrics.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/applets/taskmanager/package/contents/ui/code/layoutmetrics.js b/applets/taskmanager/package/contents/ui/code/layoutmetrics.js
index c7f11c99a6..895cc725d2 100644
--- a/applets/taskmanager/package/contents/ui/code/layoutmetrics.js
+++ b/applets/taskmanager/package/contents/ui/code/layoutmetrics.js
@@ -63,8 +63,14 @@ function preferredMinWidth() {
function preferredMaxWidth() {
if (tasks.iconsOnly) {
if (tasks.vertical) {
+ if (tasks.width === 0) {
+ return 0
+ }
return tasks.width + verticalMargins();
} else {
+ if (tasks.height === 0) {
+ return 0
+ }
return tasks.height + horizontalMargins();
}
}
--
GitLab

View file

@ -56,6 +56,13 @@ in {
./patches/plasma_workspace-pr4883.patch ./patches/plasma_workspace-pr4883.patch
]; ];
}; };
plasma-desktop = kPrev.plasma-desktop.overrideAttrs {
patches =
kPrev.plasma-desktop.patches
++ [
./patches/plasma_desktop-pr2661.patch
];
};
} }
); );
} }

View file

@ -22,9 +22,7 @@ in {
kdePackages = prev.kdePackages.overrideScope ( kdePackages = prev.kdePackages.overrideScope (
kFinal: kPrev: { kFinal: kPrev: {
konsole = kPrev.konsole.overrideAttrs { konsole = kPrev.konsole.overrideAttrs {
patches = [ patches = [];
../patches/konsole-pr767.patch
];
}; };
} }
); );

View file

@ -9,6 +9,8 @@
kPrev.kwin.patches kPrev.kwin.patches
++ [ ++ [
../patches/kwin-pr6406.patch ../patches/kwin-pr6406.patch
../patches/kwin-pr6878.patch
../patches/kwin-pr6844.patch
]; ];
}; };
} }