def _resize(self, *_args): s = screen_get_default() x = s.get_width() y = s.get_height() log("sizing world to %sx%s", x, y) self.set_size_request(x, y) self.resize(x, y)
def __init__(self, screen=screen_get_default()): global world_window assert world_window is None, "a world window already exists! (%s)" % world_window world_window = self super(WorldWindow, self).__init__() self.set_screen(screen) self.set_title("Xpra-WorldWindow") self.set_skip_taskbar_hint(True) self.set_skip_pager_hint(True) self.set_decorated(False) self.set_resizable(False) self.set_opacity(0) # FIXME: This would better be a default handler, but there is a bug in # the superclass's default handler that means we can't call it # properly[0], so as a workaround we let the real default handler run, # and then come in afterward to do what we need to. (See also # Viewport._after_set_focus_child.) # [0] http://bugzilla.gnome.org/show_bug.cgi?id=462368 self.connect_after("set-focus", self._after_set_focus) # Make sure that we are always the same size as the screen self.set_resizable(False) screen.connect("size-changed", self._resize) self.move(0, 0) self._resize() if is_gtk3(): self.add = self._patched_add
def has_transparency(self): return screen_get_default().get_rgba_visual() is not None
def has_transparency(self): return screen_get_default().get_rgba_visual() is not None