mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-28 20:53:35 +08:00
gui: force xcb instead of wayland
This commit is contained in:
parent
2241a32c9a
commit
9f9acb3528
@ -140,7 +140,12 @@ def main():
|
||||
args.db_file = os.path.join(get_user_config_dir(), "artiq_browser.pyon")
|
||||
widget_log_handler = log.init_log(args, "browser")
|
||||
|
||||
app = QtWidgets.QApplication(["ARTIQ Browser"])
|
||||
forced_platform = []
|
||||
if (QtGui.QGuiApplication.platformName() == "wayland" and
|
||||
not os.getenv("QT_QPA_PLATFORM")):
|
||||
# force XCB instead of Wayland due to applets not embedding
|
||||
forced_platform = ["-platform", "xcb"]
|
||||
app = QtWidgets.QApplication(["ARTIQ Browser"] + forced_platform)
|
||||
loop = QEventLoop(app)
|
||||
asyncio.set_event_loop(loop)
|
||||
atexit.register(loop.close)
|
||||
|
@ -133,7 +133,12 @@ def main():
|
||||
server=args.server.replace(":", "."),
|
||||
port=args.port_notify))
|
||||
|
||||
app = QtWidgets.QApplication(["ARTIQ Dashboard"])
|
||||
forced_platform = []
|
||||
if (QtGui.QGuiApplication.platformName() == "wayland" and
|
||||
not os.getenv("QT_QPA_PLATFORM")):
|
||||
# force XCB instead of Wayland due to applets not embedding
|
||||
forced_platform = ["-platform", "xcb"]
|
||||
app = QtWidgets.QApplication(["ARTIQ Dashboard"] + forced_platform)
|
||||
loop = QEventLoop(app)
|
||||
asyncio.set_event_loop(loop)
|
||||
atexit.register(loop.close)
|
||||
|
Loading…
Reference in New Issue
Block a user