From ae2ef1d2dfbc85e8d6a1bfa85cc9109ba3750e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Bon=C3=A9?= Date: Mon, 21 Jul 2025 11:46:37 +0200 Subject: [PATCH] Add patch to paraver to prevent focus stealing See: https://github.com/bsc-performance-tools/wxparaver/issues/18 Reviewed-by: Rodrigo Arias Mallo --- pkgs/paraver/default.nix | 2 ++ .../do-not-steal-focus-on-redraw.patch | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/paraver/do-not-steal-focus-on-redraw.patch diff --git a/pkgs/paraver/default.nix b/pkgs/paraver/default.nix index 49cbfe0..9130f06 100644 --- a/pkgs/paraver/default.nix +++ b/pkgs/paraver/default.nix @@ -29,6 +29,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-YsO5gsuEFQdki3lQudEqgo5WXOt/fPdvNw5OxZQ86Zo="; }; + patches = [ ./do-not-steal-focus-on-redraw.patch ]; + hardeningDisable = [ "all" ]; # Fix the PARAVER_HOME variable diff --git a/pkgs/paraver/do-not-steal-focus-on-redraw.patch b/pkgs/paraver/do-not-steal-focus-on-redraw.patch new file mode 100644 index 0000000..3c66967 --- /dev/null +++ b/pkgs/paraver/do-not-steal-focus-on-redraw.patch @@ -0,0 +1,26 @@ +From 2b185e1b5ce52808b3026334851dbcd5a640ed4d Mon Sep 17 00:00:00 2001 +From: aleixbonerib +Date: Mon, 10 Jun 2024 20:59:45 +0200 +Subject: [PATCH] fix: do not set focus on redraw + +Some wm can change the window size without focusing. Right now, when the +plot is resized it takes back focus. +--- + src/gtimeline.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/gtimeline.cpp b/src/gtimeline.cpp +index 23ebef2..a896066 100644 +--- a/src/gtimeline.cpp ++++ b/src/gtimeline.cpp +@@ -899,7 +899,6 @@ void gTimeline::redraw() + + drawZone->Refresh(); + +- SetFocus(); + } + + +-- +2.44.1 +