[packages/qutebrowser] add upstream fix for page focus regression; rel 2
atler
atler at pld-linux.org
Mon Oct 27 16:56:50 CET 2025
commit e3413248a085c2f61f9416a2afdf438e96c39738
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Oct 27 16:54:17 2025 +0100
add upstream fix for page focus regression; rel 2
see: https://github.com/qutebrowser/qutebrowser/issues/8750
page-focus.patch | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
qutebrowser.spec | 4 ++-
2 files changed, 91 insertions(+), 1 deletion(-)
---
diff --git a/qutebrowser.spec b/qutebrowser.spec
index 12fc229..83d0a61 100644
--- a/qutebrowser.spec
+++ b/qutebrowser.spec
@@ -3,11 +3,12 @@
Summary: A keyboard-driven, vim-like browser based on PyQt6
Name: qutebrowser
Version: 3.6.0
-Release: 1
+Release: 2
License: GPL v3+
Group: X11/Applications/Networking
Source0: https://github.com/qutebrowser/qutebrowser/releases/download/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 9470bc6786cc1e55ddac64a6f92732ed
+Patch0: page-focus.patch
URL: https://www.qutebrowser.org/
BuildRequires: python3 >= 1:3.8.0
BuildRequires: python3-setuptools
@@ -240,6 +241,7 @@ qutebrowser userscript: Views the current web page in mpv.
%prep
%setup -q
+%patch -P0 -p1
grep -r '#!.*env bash' -l . | xargs %{__sed} -i -e '1 s,#!.*env bash.*,#!/bin/bash,'
grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python.*,#!%{__python3},'
diff --git a/page-focus.patch b/page-focus.patch
new file mode 100644
index 0000000..cf8ea2e
--- /dev/null
+++ b/page-focus.patch
@@ -0,0 +1,88 @@
+From b646d606d7710244ab95b3c624212ff3c8f33b0a Mon Sep 17 00:00:00 2001
+From: Florian Bruhin <me at the-compiler.org>
+Date: Sat, 25 Oct 2025 16:43:06 +0200
+Subject: [PATCH] Fix releasing focus when leaving command mode
+
+The fix for #8223 in 6f21accfaecaa7fbde585eaa88219844ae11ea24
+was misguided: We don't really care about the statusbar being hidden,
+controlled release of keyboard focus needs to happen in any case where
+we're hiding the command widget (as that's when we lose keyboard focus).
+
+Fixes #8750.
+---
+ doc/changelog.asciidoc | 11 +++++++++++
+ qutebrowser/mainwindow/statusbar/bar.py | 5 +----
+ tests/end2end/features/completion.feature | 8 ++++++++
+ 3 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
+index b7a3d807cfa..371678d7ae0 100644
+--- a/doc/changelog.asciidoc
++++ b/doc/changelog.asciidoc
+@@ -15,6 +15,17 @@ breaking changes (such as renamed commands) can happen in minor releases.
+ // `Fixed` for any bug fixes.
+ // `Security` to invite users to upgrade in case of vulnerabilities.
+
++[[v3.6.1]]
++v3.6.1 (unreleased)
++-------------------
++
++Fixed
++~~~~~
++
++- A regression in v3.6.1 where the page didn't have keyboard focus after closing
++ the completion, so e.g. typing in an input field after hinting didn't work.
++ (#8750)
++
+ [[v3.6.0]]
+ v3.6.0 (2025-10-24)
+ -------------------
+diff --git a/qutebrowser/mainwindow/statusbar/bar.py b/qutebrowser/mainwindow/statusbar/bar.py
+index 4b72ad59f0c..cce9e2c399d 100644
+--- a/qutebrowser/mainwindow/statusbar/bar.py
++++ b/qutebrowser/mainwindow/statusbar/bar.py
+@@ -286,20 +286,16 @@ def maybe_hide(self):
+ strategy = config.val.statusbar.show
+ tab = self._current_tab()
+ if tab is not None and tab.data.fullscreen:
+- self.release_focus.emit()
+ self.hide()
+ elif strategy == 'never':
+- self.release_focus.emit()
+ self.hide()
+ elif strategy == 'in-mode':
+ try:
+ mode_manager = modeman.instance(self._win_id)
+ except modeman.UnavailableError:
+- self.release_focus.emit()
+ self.hide()
+ else:
+ if mode_manager.mode == usertypes.KeyMode.normal:
+- self.release_focus.emit()
+ self.hide()
+ else:
+ self.show()
+@@ -371,6 +367,7 @@ def _show_cmd_widget(self):
+ def _hide_cmd_widget(self):
+ """Show temporary text instead of command widget."""
+ log.statusbar.debug("Hiding cmd widget")
++ self.release_focus.emit()
+ self._stack.setCurrentWidget(self.txt)
+ self.maybe_hide()
+
+diff --git a/tests/end2end/features/completion.feature b/tests/end2end/features/completion.feature
+index 782fe198898..4fd12271561 100644
+--- a/tests/end2end/features/completion.feature
++++ b/tests/end2end/features/completion.feature
+@@ -103,3 +103,11 @@ Feature: Using completion
+ And I run :completion-item-focus next
+ And I run :cmd-set-text -s :set
+ Then the completion model should be option
++
++ Scenario: Page focus after using completion (#8750)
++ When I open data/insert_mode_settings/html/input.html
++ And I run :cmd-set-text :
++ And I run :mode-leave
++ And I run :click-element id qute-input
++ And I run :fake-key -g someinput
++ Then the javascript message "contents: someinput" should be logged
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qutebrowser.git/commitdiff/e3413248a085c2f61f9416a2afdf438e96c39738
More information about the pld-cvs-commit
mailing list