_SysDebug("WM_MoveWindow: (%i,%i)", X, Y);
Window->X = X; Window->Y = Y;
- // TODO: Why invalidate buffer?
- WM_Invalidate(Window);
+ // Mark up the tree that a child window has changed
+ while( (Window = Window->Parent) )
+ Window->Flags &= ~WINFLAG_CHILDCLEAN;
return 0;
}
if( !(Window->Flags & WINFLAG_SHOW) )
return ;
+ if( (Window->Flags & WINFLAG_RELATIVE) && Window->Parent )
+ {
+ Window->RealX = Window->Parent->RealX + Window->Parent->BorderL + Window->X;
+ Window->RealY = Window->Parent->RealY + Window->Parent->BorderT + Window->Y;
+ }
+ else
+ {
+ Window->RealX = Window->X;
+ Window->RealY = Window->Y;
+ }
+
// Render
if( !(Window->Flags & WINFLAG_CLEAN) )
{
Window->RealW = Window->W;
Window->RealH = Window->H;
}
-
- if( (Window->Flags & WINFLAG_RELATIVE) && Window->Parent )
- {
- Window->RealX = Window->Parent->RealX + Window->Parent->BorderL + Window->X;
- Window->RealY = Window->Parent->RealY + Window->Parent->BorderT + Window->Y;
- }
- else
- {
- Window->RealX = Window->X;
- Window->RealY = Window->Y;
- }
Window->Renderer->Redraw(Window);
Window->Flags |= WINFLAG_CLEAN;
// Ignore hidden windows
if( !(Window->Flags & WINFLAG_SHOW) )
return ;
+
+ // Duplicated position update to handle window moving
+ if( (Window->Flags & WINFLAG_RELATIVE) && Window->Parent )
+ {
+ Window->RealX = Window->Parent->RealX + Window->Parent->BorderL + Window->X;
+ Window->RealY = Window->Parent->RealY + Window->Parent->BorderT + Window->Y;
+ }
+ else
+ {
+ Window->RealX = Window->X;
+ Window->RealY = Window->Y;
+ }
// _SysDebug("Blit %p (%p) to (%i,%i) %ix%i", Window, Window->RenderBuffer,
// Window->RealX, Window->RealY, Window->RealW, Window->RealH);