only re-render popup when needed

This commit is contained in:
Felix Kratz 2024-02-29 16:22:43 +01:00
parent e7a54130e9
commit 6fbf9edf75

View file

@ -332,7 +332,9 @@ void popup_draw(struct popup* popup) {
windows_freeze(); windows_freeze();
if (!popup->window.id) popup_create_window(popup); if (!popup->window.id) popup_create_window(popup);
window_apply_frame(&popup->window, false); if (!window_apply_frame(&popup->window, false)
&& !popup->host->needs_update ) return;
CGContextClearRect(popup->window.context, popup->background.bounds); CGContextClearRect(popup->window.context, popup->background.bounds);
window_assign_mouse_tracking_area(&popup->window, popup->window.frame); window_assign_mouse_tracking_area(&popup->window, popup->window.frame);