diff --git a/src/conio/x_events.c b/src/conio/x_events.c
index e2ff5847002e3bfe7ceaf0fbd1cff1e652b1cdc8..fcf89661e0ef52c6d2b28a074c03a29ace9ed852 100644
--- a/src/conio/x_events.c
+++ b/src/conio/x_events.c
@@ -1650,8 +1650,8 @@ x11_event(XEvent *ev)
 						resize = false;
 						if (fullscreen) {
 							fullscreen = false;
-							x_cvstat.scaling = saved_scaling;
 							pthread_mutex_lock(&vstatlock);
+							x_cvstat.scaling = saved_scaling;
 							/*
 							 * Mode may have changed while in fullscreen... recalculate scaling to
 							 * fit inside the old window size