stop the mouse centering timer if the main window is not active

Co-authored-by: Narr the Reg <juangerman-13@hotmail.com>
This commit is contained in:
Purple
2022-04-12 01:16:14 +06:00
committed by GitHub
parent 90841b3e8d
commit 3a8f5d385f

View File

@@ -3310,6 +3310,10 @@ void GMainWindow::CenterMouseCursor() {
mouse_center_timer.stop();
return;
}
if (!this->isActiveWindow()) {
mouse_center_timer.stop();
return;
}
const int center_x = render_window->width() / 2;
const int center_y = render_window->height() / 2;