def _on_new_xdg_surface(self, _listener, surface: XdgSurface): logger.debug("Signal: xdg_shell new_surface_event") assert self.qtile is not None if surface.role != XdgSurfaceRole.TOPLEVEL: return wid = max(self.qtile.windows_map.keys(), default=0) + 1 win = window.Window(self, self.qtile, surface, wid) logger.info(f"Managing new top-level window with window ID: {wid}") self.qtile.manage(win)
def _on_new_xdg_surface(self, _listener, surface: XdgSurface): logger.debug("Signal: xdg_shell new_surface_event") assert self.qtile is not None if surface.role != XdgSurfaceRole.TOPLEVEL: return wid = self.new_wid() win = window.Window(self, self.qtile, surface, wid) logger.info(f"Managing new top-level window with window ID: {wid}") self._poll() # Give the window the chance to map itself before focussing it self.qtile.manage(win)
def _on_new_xdg_surface(self, _listener, surface: xdg_shell.XdgSurface): logger.debug("Signal: xdg_shell new_surface_event") assert self.qtile is not None if surface.role != xdg_shell.XdgSurfaceRole.TOPLEVEL: return wid = 0 wids = self.qtile.windows_map.keys() while True: if wid not in wids: break wid += 1 win = window.Window(self, self.qtile, surface, wid) logger.info(f"Managing new top-level window with window ID: {wid}") self.qtile.manage(win)
def _on_new_xdg_surface(self, _listener, surface: XdgSurface): logger.debug("Signal: xdg_shell new_surface_event") if surface.role == XdgSurfaceRole.TOPLEVEL: assert self.qtile is not None win = window.Window(self, self.qtile, surface, self.new_wid()) self.pending_windows.append(win)