Skip to content

Commit 59af189

Browse files
committed
add missing line for toggling fullscreen inside the loop
1 parent 5aea005 commit 59af189

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

generic_interface.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
# create window by name (as resizable)
8585

8686
cv2.namedWindow(window_name, cv2.WINDOW_NORMAL)
87+
cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN,
88+
cv2.WINDOW_FULLSCREEN & args.fullscreen)
8789

8890
while (keep_processing):
8991

@@ -115,8 +117,6 @@
115117
# display image
116118

117119
cv2.imshow(window_name, frame)
118-
cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN,
119-
cv2.WINDOW_FULLSCREEN & args.fullscreen)
120120

121121
# stop the timer and convert to ms. (to see how long processing and
122122
# display takes)
@@ -148,6 +148,8 @@
148148
keep_processing = False
149149
elif (key == ord('f')):
150150
args.fullscreen = not (args.fullscreen)
151+
cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN,
152+
cv2.WINDOW_FULLSCREEN & args.fullscreen)
151153

152154
# close all windows
153155

0 commit comments

Comments
 (0)