1
0
Fork 0

svc: Create windows without URLs
dustin/hudctrl/pipeline/head This commit looks good Details

Every screen needs a window, even if it does not have a URL, otherwise
no URL can ever be assigned to it.
master
Dustin 2022-12-18 13:24:10 -06:00
parent d278eedcbd
commit 2325da85fd
1 changed files with 6 additions and 5 deletions

View File

@ -91,7 +91,7 @@ class HUDService:
try:
url = self.urls[monitor.name]
except KeyError:
continue
url = None
if window is None:
window = await self.marionette.new_window('window')
self.windows[monitor.name] = window
@ -101,10 +101,11 @@ class HUDService:
y=1,
)
await self.marionette.fullscreen()
log.info('Screen %s: Opening URL %s', monitor.name, url)
tasks.append(
asyncio.create_task(self.marionette.navigate(url))
)
if url is not None:
log.info('Screen %s: Opening URL %s', monitor.name, url)
tasks.append(
asyncio.create_task(self.marionette.navigate(url))
)
window = None
if tasks:
await asyncio.wait(tasks)