Viewport: Fix viewport updates being applied to shaded windows
This commit is contained in:
@@ -1559,7 +1559,7 @@ void DrawDirtyBlocks()
|
|||||||
w->flags &= ~WF_WIDGETS_DIRTY;
|
w->flags &= ~WF_WIDGETS_DIRTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w->viewport != nullptr) {
|
if (w->viewport != nullptr && !w->IsShaded()) {
|
||||||
ViewPort *vp = w->viewport;
|
ViewPort *vp = w->viewport;
|
||||||
if (vp->is_drawn) {
|
if (vp->is_drawn) {
|
||||||
vp->ClearDirty();
|
vp->ClearDirty();
|
||||||
|
@@ -2002,8 +2002,8 @@ void NWidgetViewport::UpdateViewportCoordinates(Window *w)
|
|||||||
if (vp != nullptr) {
|
if (vp != nullptr) {
|
||||||
vp->left = w->left + this->pos_x;
|
vp->left = w->left + this->pos_x;
|
||||||
vp->top = w->top + this->pos_y;
|
vp->top = w->top + this->pos_y;
|
||||||
vp->width = this->current_x;
|
vp->width = w->IsShaded() ? 0 : this->current_x;
|
||||||
vp->height = this->current_y;
|
vp->height = w->IsShaded() ? 0 : this->current_y;
|
||||||
|
|
||||||
vp->virtual_width = ScaleByZoom(vp->width, vp->zoom);
|
vp->virtual_width = ScaleByZoom(vp->width, vp->zoom);
|
||||||
vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);
|
vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);
|
||||||
|
Reference in New Issue
Block a user