Merge pull request #93490 from bruvzg/vp_subw_os
Fix subwindow titlebar redraw on oversampling change.
This commit is contained in:
commit
5ca01c4847
2 changed files with 11 additions and 1 deletions
|
@ -309,7 +309,8 @@ void Viewport::_sub_window_update(Window *p_window) {
|
||||||
int index = _sub_window_find(p_window);
|
int index = _sub_window_find(p_window);
|
||||||
ERR_FAIL_COND(index == -1);
|
ERR_FAIL_COND(index == -1);
|
||||||
|
|
||||||
const SubWindow &sw = gui.sub_windows[index];
|
SubWindow &sw = gui.sub_windows.write[index];
|
||||||
|
sw.pending_window_update = false;
|
||||||
|
|
||||||
Transform2D pos;
|
Transform2D pos;
|
||||||
pos.set_origin(p_window->get_position());
|
pos.set_origin(p_window->get_position());
|
||||||
|
@ -972,6 +973,14 @@ void Viewport::update_canvas_items() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_embedding_subwindows()) {
|
||||||
|
for (Viewport::SubWindow w : gui.sub_windows) {
|
||||||
|
if (w.window && !w.pending_window_update) {
|
||||||
|
w.pending_window_update = true;
|
||||||
|
callable_mp(this, &Viewport::_sub_window_update).call_deferred(w.window);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
_update_canvas_items(this);
|
_update_canvas_items(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -340,6 +340,7 @@ private:
|
||||||
Window *window = nullptr;
|
Window *window = nullptr;
|
||||||
RID canvas_item;
|
RID canvas_item;
|
||||||
Rect2i parent_safe_rect;
|
Rect2i parent_safe_rect;
|
||||||
|
bool pending_window_update = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// VRS
|
// VRS
|
||||||
|
|
Loading…
Add table
Reference in a new issue