+void WM_DecorateWindow(tWindow *Window, int bDecorate)
+{
+ if( !(Window->Flags & WINFLAG_NODECORATE) == !!bDecorate )
+ return ;
+
+ if(bDecorate)
+ Window->Flags &= ~WINFLAG_NODECORATE;
+ else
+ Window->Flags |= WINFLAG_NODECORATE;
+
+ // Needed because the window size changes
+ if(Window->RenderBuffer) {
+ free(Window->RenderBuffer);
+ Window->RenderBuffer = NULL;
+ }
+
+ WM_Invalidate(Window);
+}
+
+void WM_SetRelative(tWindow *Window, int bRelativeToParent)
+{
+// _SysDebug("WM_SetRelative: (%p{Parent=%p},%i)", Window, Window->Parent, bRelativeToParent);
+ // No meaning if no parent
+ if( !Window->Parent )
+ return ;
+
+ // Check that the flag is changing
+ if( !!bRelativeToParent == !!(Window->Flags & WINFLAG_RELATIVE) )
+ return ;
+
+ if( bRelativeToParent ) {
+ // Set
+ Window->Flags |= WINFLAG_RELATIVE;
+ WM_MoveWindow(Window, Window->X, Window->Y);
+ }
+ else {
+ // Clear
+ Window->Flags &= ~WINFLAG_RELATIVE;
+ WM_MoveWindow(Window, Window->X - Window->Parent->X, Window->Y - Window->Parent->Y);
+ }
+}
+