[fix] prevent cursor relocation when stream window resized

This commit is contained in:
dijunkun
2024-11-27 17:24:45 +08:00
parent e0457213ea
commit ce3ae03bef
2 changed files with 8 additions and 5 deletions

View File

@@ -96,11 +96,8 @@ int Render::ControlWindow() {
new_cursor_pos_y =
new_control_window_pos_y + mouse_diff_control_bar_pos_y_;
if (new_cursor_pos_x < stream_window_width_ &&
new_cursor_pos_y < stream_window_height_) {
SDL_WarpMouseInWindow(stream_window_, (int)new_cursor_pos_x,
(int)new_cursor_pos_y);
}
SDL_WarpMouseInWindow(stream_window_, (int)new_cursor_pos_x,
(int)new_cursor_pos_y);
}
reset_control_bar_pos_ = false;
} else if (!reset_control_bar_pos_ &&