https://bugs.kde.org/show_bug.cgi?id=501829
Bug ID: 501829
Summary: Permanent focus stealing with non-sense Gtk4 code
Classification: Plasma
Product: kwin
Version: 6.3.3
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: wayland-generic
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
I've stumbled over the following two issues by accident:
If a Gtk4 popovermenu is set visible in the _closed_ event, it will re-open and
steal the focus:
You can basically no longer click anything else.
However, if you click fast and often enough onto the "x" button in the titlebar
of the sample app, you can make it close eventually.
You can also click into into another app, e.g. Konsole, until eventually
Konsole will gain focus. The main window will hide behind Konsole, but the
popover keeps staying on top of all windows.
The code of course makes no sense, but I wanted to report it nonetheless.
STEPS TO REPRODUCE
Here's a minimal reproducer:
```
import gi
gi.require_version("Gtk", "4.0")
from gi.repository import Gtk
from gi.repository import GLib
def on_closed(popover):
print("popover closed")
popover.set_visible(True)
def on_activate(app):
win = Gtk.ApplicationWindow(application=app)
popovermenu = Gtk.PopoverMenu()
popovermenu.connect("closed", on_closed)
popovermenu.set_size_request(100, 100)
win.set_child(popovermenu)
win.present()
popovermenu.popup()
app = Gtk.Application(application_id='org.gtk.Example')
app.connect('activate', on_activate)
app.run(None)
```
SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250318
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.6-1-default (64-bit)
--
You are receiving this mail because:
You are watching all bug changes.