def on_window_configure_notify(self, event): rect = Rect.from_object(event) if rect.width != self.style['width'] or rect.height != self.style['height']: self.style['width'] = rect.width self.style['height'] = rect.height self.recreate_surface() self.layout()
def window_on_configure_notify(self, evt): """ if the window is configured, configure the actor, too """ log.debug('%s got window configure notify event, configure counter=%d' % (self, self._window_configures)) if self._window_configures == 0: geom = Rect.from_object(evt) compute_actor_geom(geom) self.client.actor.configure(**geom.to_dict()) self.client.conn.flush() else: self._window_configures -= 1
def window_on_configure_notify(self, event): if self._window_configures != 0: self._window_configures -=1 else: self._window_configures += 1 geom = Rect.from_object(event) if geom.width != self.clientwin.style['width'] or geom.height != self.clientwin.style['height']: self.clientwin.style['width'] = geom.width self.clientwin.style['height'] = geom.height self.ui.fit() # put the width and height back because we want these to be # automatic self.clientwin.style['width'] = None self.clientwin.style['height'] = None