~sircmpwn/hiprompt-gtk-py

3524ebf3dd6479016f49ab9d4fe2d669bdf2a53d — Martijn Braam 2 years ago f0d2af6
Fix displaying the window in layer shell
2 files changed, 4 insertions(+), 6 deletions(-)

M hiprompt_gtk/display.py
M hiprompt_gtk/window.py
M hiprompt_gtk/display.py => hiprompt_gtk/display.py +3 -2
@@ 44,8 44,9 @@ class Application(Gtk.Application):
        if has_layershell and GtkLayerShell.is_supported():
            sys.stderr.write("Loading layer shell support\n")
            GtkLayerShell.init_for_window(window.window)
            GtkLayerShell.set_keyboard_interactivity(True)
            GtkLayerShell.set_layer(GtkLayerShell.Layer.OVERLAY)
            window.window.set_decorated(True)
            GtkLayerShell.set_keyboard_interactivity(window.window, True)
            GtkLayerShell.set_layer(window.window, GtkLayerShell.Layer.OVERLAY)
        else:
            sys.stderr.write("Skipping layer shell\n")
        window.window.show_all()

M hiprompt_gtk/window.py => hiprompt_gtk/window.py +1 -4
@@ 31,6 31,7 @@ class Window:
            self.make_disclose_ui()
        else:
            raise ValueError("Unexpected mode")
        self.header.show_all()

    def on_close(self, *args):
        Gtk.main_quit()


@@ 113,8 114,6 @@ class Window:
        self.entry.set_visibility(False)
        self.entry.connect('activate', self.on_unlock_grant)

        self.window.show_all()

    def make_disclose_ui(self):
        for child in self.box:
            self.box.remove(child)


@@ 149,8 148,6 @@ class Window:
        box.add(label)
        box.add(self.make_key_box())

        self.window.show_all()

    def make_key_box(self):
        box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=8)