diff --git a/src/tests/servers/app/newClipping/Clipping.proj b/src/tests/servers/app/newClipping/Clipping.proj index 3cd3eee6dd..d5cecc18bf 100644 Binary files a/src/tests/servers/app/newClipping/Clipping.proj and b/src/tests/servers/app/newClipping/Clipping.proj differ diff --git a/src/tests/servers/app/newClipping/Layer.cpp b/src/tests/servers/app/newClipping/Layer.cpp index 411a1027a9..254e59bf1d 100644 --- a/src/tests/servers/app/newClipping/Layer.cpp +++ b/src/tests/servers/app/newClipping/Layer.cpp @@ -276,7 +276,7 @@ Layer::resize_layer_frame_by(float x, float y) } } -void +inline void Layer::rezize_layer_redraw_more(BRegion ®, float dx, float dy) { if (dx == 0 && dy == 0) @@ -329,20 +329,29 @@ Layer::rezize_layer_redraw_more(BRegion ®, float dx, float dy) } } } -/* + inline void Layer::resize_layer_full_update_on_resize(BRegion ®, float dx, float dy) { if (dx == 0 && dy == 0) return; - if (flags & B_FULL_UPDATE_ON_RESIZE && fVisible.CountRects() > 0) - reg.Include(&fVisible); - for (Layer *lay = VirtualBottomChild(); lay; lay = VirtualUpperSibling()) - lay->resize_layer_full_update_on_resize(); + { + uint16 rm = lay->fResizeMode & 0x0000FFFF; + + if ((rm & 0x0F0F) == (uint16)B_FOLLOW_LEFT_RIGHT || (rm & 0xF0F0) == (uint16)B_FOLLOW_TOP_BOTTOM) + { + if (lay->fFlags & B_FULL_UPDATE_ON_RESIZE && lay->fVisible.CountRects() > 0) + reg.Include(&lay->fVisible); + + lay->resize_layer_full_update_on_resize(reg, + (rm & 0x0F0F) == (uint16)B_FOLLOW_LEFT_RIGHT? dx: 0, + (rm & 0xF0F0) == (uint16)B_FOLLOW_TOP_BOTTOM? dy: 0); + } + } } -*/ + void Layer::ResizeBy(float dx, float dy) { @@ -399,7 +408,8 @@ Layer::ResizeBy(float dx, float dy) // include layer's visible region in case we want a full update on resize if (fFlags & B_FULL_UPDATE_ON_RESIZE && fVisible.Frame().IsValid()) { -// TODO: fFlags & B_FULL_UPDATE_ON_RESIZE - do that for descendants. + resize_layer_full_update_on_resize(GetRootLayer()->fRedrawReg, dx, dy); + GetRootLayer()->fRedrawReg.Include(&fVisible); GetRootLayer()->fRedrawReg.Include(&oldVisible); } diff --git a/src/tests/servers/app/newClipping/Layer.h b/src/tests/servers/app/newClipping/Layer.h index b73cff960c..9d105d56aa 100644 --- a/src/tests/servers/app/newClipping/Layer.h +++ b/src/tests/servers/app/newClipping/Layer.h @@ -73,6 +73,7 @@ private: void clear_visible_regions(); void resize_layer_frame_by(float x, float y); void rezize_layer_redraw_more(BRegion ®, float dx, float dy); + void resize_layer_full_update_on_resize(BRegion ®, float dx, float dy); char fName[50]; BRegion fVisible;