forked from M-Labs/artiq
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