Skip to content

Commit

Permalink
applets: workaround 'garbage on sides of embedded windows' bug on Win…
Browse files Browse the repository at this point in the history
…dows
sbourdeauducq committed Feb 21, 2016
1 parent 1299274 commit e3e4221
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions artiq/applets/simple.py
Original file line number Diff line number Diff line change
@@ -134,10 +134,15 @@ def create_main_widget(self):
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:

0 comments on commit e3e4221

Please sign in to comment.