Exemplo n.º 1
0
    def init_window(self, metadata):
        #TODO: no idea how to do the window-type with gtk3
        #maybe not even be possible..
        window_type = Gtk.WindowType.TOPLEVEL
        if self._override_redirect:
            window_type = Gtk.WindowType.POPUP
        Gtk.Window.__init__(self,
                            type=window_type,
                            decorated=not self._override_redirect,
                            app_paintable=True)
        GTKClientWindowBase.init_window(self, metadata)

        # tell KDE/oxygen not to intercept clicks
        # see: https://bugs.kde.org/show_bug.cgi?id=274485
        # does not work with gtk3? what the??
        #self.set_data(strtobytes("_kde_no_window_grab"), 1)
        def motion(w, event):
            self.do_motion_notify_event(event)

        self.connect("motion-notify-event", motion)

        def press(w, event):
            self.do_button_press_event(event)

        self.connect("button-press-event", press)

        def release(w, event):
            self.do_button_release_event(event)

        self.connect("button-release-event", release)

        def scroll(w, event):
            self.do_scroll_event(event)

        self.connect("scroll-event", scroll)
Exemplo n.º 2
0
    def init_window(self, metadata):
        # TODO: no idea how to do the window-type with gtk3
        # maybe not even be possible..
        window_type = Gtk.WindowType.TOPLEVEL
        if self._override_redirect:
            window_type = Gtk.WindowType.POPUP
        Gtk.Window.__init__(self, type=window_type, decorated=not self._override_redirect, app_paintable=True)
        GTKClientWindowBase.init_window(self, metadata)
        # tell KDE/oxygen not to intercept clicks
        # see: https://bugs.kde.org/show_bug.cgi?id=274485
        # does not work with gtk3? what the??
        # self.set_data(strtobytes("_kde_no_window_grab"), 1)
        def motion(w, event):
            self.do_motion_notify_event(event)

        self.connect("motion-notify-event", motion)

        def press(w, event):
            self.do_button_press_event(event)

        self.connect("button-press-event", press)

        def release(w, event):
            self.do_button_release_event(event)

        self.connect("button-release-event", release)

        def scroll(w, event):
            self.do_scroll_event(event)

        self.connect("scroll-event", scroll)
Exemplo n.º 3
0
 def init_window(self, metadata):
     if self._override_redirect:
         gtk.Window.__init__(self, gtk.WINDOW_POPUP)
     else:
         gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
     GTKClientWindowBase.init_window(self, metadata)
     # tell KDE/oxygen not to intercept clicks
     # see: https://bugs.kde.org/show_bug.cgi?id=274485
     self.set_data("_kde_no_window_grab", 1)
Exemplo n.º 4
0
 def init_window(self, metadata):
     if self._override_redirect:
         gtk.Window.__init__(self, gtk.WINDOW_POPUP)
     else:
         gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
     GTKClientWindowBase.init_window(self, metadata)
     # tell KDE/oxygen not to intercept clicks
     # see: https://bugs.kde.org/show_bug.cgi?id=274485
     self.set_data("_kde_no_window_grab", 1)
Exemplo n.º 5
0
 def init_window(self, metadata):
     #TODO: no idea how to do the window-type with gtk3
     #maybe not even be possible..
     Gtk.Window.__init__(self)
     GTKClientWindowBase.init_window(self, metadata)
Exemplo n.º 6
0
 def init_window(self, metadata):
     #TODO: no idea how to do the window-type with gtk3
     #maybe not even be possible..
     Gtk.Window.__init__(self)
     GTKClientWindowBase.init_window(self, metadata)