Exemplo n.º 1
0
    def _cb_realize_event(self, user_data):
        """ Gdk window created """
        # Disable maximize function (LP #859288)
        # unity:    no effect, but double click on top bar unhides anyway
        # unity-2d: works and avoids the bug
        self.get_window().set_functions(Gdk.WMFunction.RESIZE | \
                                        Gdk.WMFunction.MOVE | \
                                        Gdk.WMFunction.MINIMIZE | \
                                        Gdk.WMFunction.CLOSE)

        set_unity_property(self)

        if not config.xid_mode:   # not when embedding
            ord = self.is_override_redirect_mode()
            if ord:
                self.get_window().set_override_redirect(True)

            self._override_redirect = ord

            self.update_taskbar_hint()
            self.restore_window_rect(startup = True)

        # set min window size for unity MT grab handles
        geom = Gdk.Geometry()
        geom.min_width, geom.min_height = self.keyboard_widget.get_min_window_size()
        self.set_geometry_hints(self, geom, Gdk.WindowHints.MIN_SIZE)
Exemplo n.º 2
0
 def _cb_realize_event(self, user_data):
     # Disable maximize function (LP #859288)
     # unity:    no effect, but double click on top bar unhides anyway
     # unity-2d: works and avoids the bug
     if self.get_window():
         self.get_window().set_functions(Gdk.WMFunction.RESIZE | \
                                         Gdk.WMFunction.MOVE | \
                                         Gdk.WMFunction.MINIMIZE | \
                                         Gdk.WMFunction.CLOSE)
     set_unity_property(self)
Exemplo n.º 3
0
 def _on_realize_event(self, user_data):
     """ Gdk window created """
     set_unity_property(self)
     if config.is_force_to_top():
         self.get_window().set_override_redirect(True)
     self.restore_window_rect(True)