示例#1
0
 def setup_listener(self, qtile: Qtile) -> None:
     """Setup a listener for the given qtile instance"""
     logger.debug("Adding io watch")
     self.qtile = qtile
     self.fd = lib.wl_event_loop_get_fd(self.event_loop._ptr)
     if self.fd:
         asyncio.get_running_loop().add_reader(self.fd, self._poll)
     else:
         raise RuntimeError(
             "Failed to get Wayland event loop file descriptor.")
示例#2
0
文件: core.py 项目: dpiegdon/qtile
 def setup_listener(self, qtile: Qtile) -> None:
     """Setup a listener for the given qtile instance"""
     logger.debug("Adding io watch")
     self.qtile = qtile
     self.fd = lib.wl_event_loop_get_fd(self.event_loop._ptr)
     asyncio.get_running_loop().add_reader(self.fd, self._poll)