diff --git a/bin/dimmer b/bin/dimmer index 7352ca2..229ab34 100755 --- a/bin/dimmer +++ b/bin/dimmer @@ -8,17 +8,11 @@ import gi gi.require_version("Gtk", "3.0") -gi.require_version("Wnck", "3.0") -from gi.repository import Gtk, Gdk, GLib, Wnck +from gi.repository import Gtk, Gdk, GLib import cairo import argparse -def on_window_opened(screen, window, options): - if window.get_class_group_name() == options.quit_when: - Gtk.main_quit() - - def on_realize(widget): window = widget.get_window() window.set_override_redirect(True) @@ -75,7 +69,6 @@ if __name__ == "__main__": options = parser.parse_args() display = Gdk.Display.get_default() - screen = Wnck.Screen.get_default(); for i in range(display.get_n_monitors()): geom = display.get_monitor(i).get_geometry() once = [] @@ -92,7 +85,6 @@ if __name__ == "__main__": window.connect("draw", on_draw, options, []) window.connect("delete-event", Gtk.main_quit) window.connect("realize", on_realize) - screen.connect("window-opened", on_window_opened, options) window.show_all()