https://bugs.kde.org/show_bug.cgi?id=521859

            Bug ID: 521859
           Summary: Gtk4: Parent widgets not receive clicks, when closing
                    nested popover first
    Classification: Plasma
           Product: kwin
      Version First 6.7.0
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 193432
  --> https://bugs.kde.org/attachment.cgi?id=193432&action=edit
Screenshot

DESCRIPTION

I am not sure if this is a Gtk or Kwin issue.

When having a popover tree with two levels, opening and closing the last level
results in the UI no longer receiving clicks. I.e. clicking somewhere like on
the first popover does not close the second popup.

Closing all popups together works, when the last popover stays open. Pressing
ESC always works. 


STEPS TO REPRODUCE
Please see the screenshot and the demo application. 


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 44
KDE Plasma Version: 6.7.0
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
Kernel Version: 7.0.12-201.fc44.x86_64 (64-bit)
Graphics Platform: Wayland
GTK Version: 4.22.4
PyGObject Version: 3.56.3


ADDITIONAL INFORMATION

Demo application

```
import gi

gi.require_version("Gtk", "4.0")
from gi.repository import Gtk


class DemoWindow(Gtk.ApplicationWindow):
    def __init__(self, app):
        super().__init__(application=app)

        self.set_title("Nested Popovers Demo")
        self.set_default_size(300, 200)

        # Main button
        main_button = Gtk.Button(label="Open First Popover")
        self.set_child(main_button)

        # First popover
        first_popover = Gtk.Popover()
        first_popover.set_parent(main_button)

        inner_button = Gtk.Button(label="Open Second Popover")
        first_popover.set_child(inner_button)

        # Show first popover when main button is clicked
        main_button.connect(
            "clicked",
            lambda *_: first_popover.popup()
        )

        # Second popover
        second_popover = Gtk.Popover()
        second_popover.set_parent(inner_button)

        label = Gtk.Label(label="Hello from the second popover!")
        second_popover.set_child(label)

        # Show second popover when inner button is clicked
        inner_button.connect(
            "clicked",
            lambda *_: second_popover.popup()
        )


class DemoApplication(Gtk.Application):
    def __init__(self):
        super().__init__(application_id="com.example.NestedPopovers")

    def do_activate(self):
        window = DemoWindow(self)
        window.present()


app = DemoApplication()
app.run()
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to