From e3e42216a2037bf46a4f749ff8088a0507d783f9 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 21 Feb 2016 21:32:21 +0800 Subject: [PATCH] applets: workaround 'garbage on sides of embedded windows' bug on Windows --- artiq/applets/simple.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/artiq/applets/simple.py b/artiq/applets/simple.py index 2b9f248fe..a77b1f817 100644 --- a/artiq/applets/simple.py +++ b/artiq/applets/simple.py @@ -134,10 +134,15 @@ class SimpleApplet: if self.args.embed is not None: self.ipc.set_close_cb(self.main_widget.close) if os.name == "nt": + # HACK: if the window has a frame, there will be garbage + # (usually white) displayed at its right and bottom borders + # after it is embedded. + self.main_widget.setWindowFlags(QtCore.Qt.FramelessWindowHint) self.main_widget.show() win_id = int(self.main_widget.winId()) self.loop.run_until_complete(self.ipc.embed(win_id)) else: + # HACK: # Qt window embedding is ridiculously buggy, and empirical # testing has shown that the following procedure must be # followed exactly on Linux: