Skip to content

Commit e3e4221

Browse files
committedFeb 21, 2016
applets: workaround 'garbage on sides of embedded windows' bug on Windows
1 parent 1299274 commit e3e4221

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

Diff for: ‎artiq/applets/simple.py

+5
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,15 @@ def create_main_widget(self):
134134
if self.args.embed is not None:
135135
self.ipc.set_close_cb(self.main_widget.close)
136136
if os.name == "nt":
137+
# HACK: if the window has a frame, there will be garbage
138+
# (usually white) displayed at its right and bottom borders
139+
# after it is embedded.
140+
self.main_widget.setWindowFlags(QtCore.Qt.FramelessWindowHint)
137141
self.main_widget.show()
138142
win_id = int(self.main_widget.winId())
139143
self.loop.run_until_complete(self.ipc.embed(win_id))
140144
else:
145+
# HACK:
141146
# Qt window embedding is ridiculously buggy, and empirical
142147
# testing has shown that the following procedure must be
143148
# followed exactly on Linux:

0 commit comments

Comments
 (0)