wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Attached modal dialogs are not clickable in scale or expo.

Open soreau opened this issue 1 year ago • 0 comments

#!/usr/bin/python3

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

class MyWindow(Gtk.Window):
    def __init__(self):
        super().__init__(title="what's up")

        button = Gtk.Button(label="Open Modal")
        button.connect("clicked", self.on_button_clicked)
        self.add(button)

        self.set_default_size(400, 400)

    def on_button_clicked(self, widget):
        dialog = Gtk.Dialog(title="Modal DiaLOLg", parent=self, modal=True, destroy_with_parent=True)
        dialog.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK)
        dialog.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL)
        dialog.set_default_size(200, 100)

        label = Gtk.Label(label="killown, does this work?")
        dialog.get_content_area().add(label)
        dialog.show_all()
        
        response = dialog.run()
        if response == Gtk.ResponseType.OK:
            print("OK clicked")
        elif response == Gtk.ResponseType.CANCEL:
            print("Cancel clicked")
        
        dialog.destroy()

win = MyWindow()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()

Using the above code, after clicking on the button to open the dialog and subsequently clicking on the dialog to end scale or drag in expo, it does not permit clicks. Instead it does nothing in scale and ends expo. Incoming PR to fix.

soreau avatar Aug 24 '24 18:08 soreau