Remember window positions as preferences

This commit is contained in:
2025-04-09 16:03:31 -05:00
parent c89ea6aa45
commit 3ba9259482
6 changed files with 43 additions and 8 deletions

View File

@@ -742,13 +742,9 @@ void cDialog::handle_one_event(const sf::Event& currentEvent, cFramerateLimiter&
case sf::Event::GainedFocus:
case sf::Event::MouseMoved:
// Did the window move, potentially dirtying the canvas below it?
auto winPosition = win.getPosition();
if (winLastX != winPosition.x || winLastY != winPosition.y) {
if(check_window_moved(win, winLastX, winLastY))
if (redraw_everything != NULL)
redraw_everything();
}
winLastX = winPosition.x;
winLastY = winPosition.y;
bool inField = false;
for(auto& ctrl : controls) {