def send_updated_screen_size(self): log("send_updated_screen_size") X11ServerCore.send_updated_screen_size(self) #remove all existing models and re-create them: for model in self._id_to_window.values(): model.close_capture() self._remove_window(model) for model in self.makeRootWindowModels(): self._add_new_window(model)
def send_updated_screen_size(self): log("send_updated_screen_size") X11ServerCore.send_updated_screen_size(self) for wid, window in self._id_to_window.items(): w, h = window.get_dimensions() geomlog("%i new window dimensions: %s", wid, (w, h)) for ss in self._server_sources.values(): #first, make sure the size-hints are updated: ss.window_metadata(wid, window, "size-hints") #tell client to resize now: ss.resize_window(wid, window, w, h) #refresh to ensure the client gets the new window contents: ss.damage(wid, window, 0, 0, w, h)