Usermode/AxWin3 - Duplicate renderer detection, debug changes
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / renderers / widget.c
index 49f1f64..0261bea 100644 (file)
@@ -249,7 +249,7 @@ void Widget_UpdateDimensions(tElement *Element)
                if( child->Flags & ELEFLAG_ABSOLUTEPOS )        continue ;
                
                // --- Width ---
-               if( child->Flags & ELEFLAG_NOEXPAND )
+               if( child->Flags & (bVertical ? ELEFLAG_NOEXPAND : ELEFLAG_NOSTRETCH) )
                        w = child->MinW;
                else if( bVertical )
                        w = child->FixedCross ? child->FixedCross : fullCross;
@@ -257,7 +257,7 @@ void Widget_UpdateDimensions(tElement *Element)
                        w = child->FixedWith ? child->FixedWith : dynWith;
        
                // --- Height ---
-               if( child->Flags & ELEFLAG_NOSTRETCH )
+               if( child->Flags & (bVertical ? ELEFLAG_NOSTRETCH : ELEFLAG_NOEXPAND) )
                        h = child->MinH;
                else if( bVertical )
                        h = child->FixedWith ? child->FixedWith : dynWith;
@@ -536,6 +536,9 @@ int Widget_IPC_NewWidgetSubwin(tWindow *Win, size_t Len, const void *Data)
                return -1;
        if( strnlen(Msg->DebugName, max_debugname_len) == max_debugname_len )
                return -1;
+
+       _SysDebug("Widget_NewWidgetSubwin(%i %i  Type %i Flags 0x%x Subwin %i)",
+               Msg->Parent, Msg->NewID, Msg->Type, Msg->Flags, Msg->WindowHandle);
        
        parent = Widget_GetElementById(Info, Msg->Parent);
        if(!parent)     return 1;
@@ -555,6 +558,8 @@ int Widget_IPC_SetFocus(tWindow *Win, size_t Len, const void *Data)
        tElement        *ele;
        const tWidgetIPC_SetFocus       *msg = Data;
        if(Len < sizeof(*msg))  return -1;
+
+       _SysDebug("Widget_SetFocus(%i)", msg->WidgetID);
        
        ele = Widget_GetElementById(info, msg->WidgetID);
        Widget_SetFocus(info, ele);
@@ -589,6 +594,8 @@ int Widget_IPC_SetSize(tWindow *Win, size_t Len, const void *Data)
        
        if( Len < sizeof(*Msg) )
                return -1;
+
+       _SysDebug("Widget_SetSize(%i, %i)", Msg->WidgetID, Msg->Value);
        
        ele = Widget_GetElementById(Info, Msg->WidgetID);
        if(!ele)        return 1;
@@ -608,6 +615,7 @@ int Widget_IPC_SetText(tWindow *Win, size_t Len, const void *Data)
        if( Msg->Text[Len - sizeof(*Msg) - 1] != '\0' )
                return -1;
 
+       _SysDebug("Widget_SetText(%i, '%.30s')", Msg->WidgetID, Msg->Text);
        ele = Widget_GetElementById(Info, Msg->WidgetID);
        if(!ele)        return 1;
 

UCC git Repository :: git.ucc.asn.au