Hi,
I may have solve the problem. At least at the system I was testing were
the problem is reproduced using that sample it was solved.
It is on SVN. But it is actually very simple in iupgtk_dialog.c:
#define iupABS(_x) ((_x)<0? -(_x): (_x))
static void gtkDialogGetWindowDecor(Ihandle* ih, int *win_border, int
*win_caption)
{
int x, y, frame_x, frame_y;
gdk_window_get_origin(iupgtkGetWindow(ih->handle), &x, &y);
gdk_window_get_root_origin(iupgtkGetWindow(ih->handle), &frame_x,
&frame_y);
*win_border = iupABS(x - frame_x); /* For unknown reason GTK sometimes
give negative results */
*win_caption = iupABS(y - frame_y) - *win_border;
}
Let me know if it improves your situation.
Best,
Scuri
2018-04-04 15:02 GMT-03:00 Antonio Scuri <[email protected]>:
> At least, for a small difference at the bottom of the dialog I could
> reproduce it here. It is not always, but much easier to reproduce. I'll let
> you know the results.
>
> Best,
> Scuri
>
>
> Em qua, 4 de abr de 2018 00:43, Eric Wing <[email protected]> escreveu:
>
>> Here's a different sample program that can trigger the bug (simplified
>> from a real program that is having problems.) No images this time, but
>> only labels. Though there is a IupFill() and MINSIZE that seems to be
>> needed to trigger the problem.
>>
>>
>> Ihandle* label_description = IupLabel("Hello World");
>> Ihandle* label_identifier = IupLabel("Label: ");
>>
>> Ihandle* vbox_for_all = IupVbox(
>> label_description,
>> IupFill(),
>> label_identifier,
>> NULL
>> );
>>
>> Ihandle* a_dialog = IupDialog(vbox_for_all);
>> IupSetAttribute(a_dialog, "MINSIZE", "400x300");
>>
>> IupShow(a_dialog);
>>
>>
>>
>> In the good image, both labels are visible, at the top and bottom of
>> the window. In the bad image, the bottom label is not visible.
>>
>> The first set is what the window looks like at launch.
>> https://blurrrsdk.com/tempdownload/images/IupSizeBugTest2_gooda.png
>> https://blurrrsdk.com/tempdownload/images/IupSizeBugTest2_bada.png
>>
>> The second set is with the window maximized.
>> https://blurrrsdk.com/tempdownload/images/IupSizeBugTest2_goodb.png
>> https://blurrrsdk.com/tempdownload/images/IupSizeBugTest2_badb.png
>>
>>
>>
>> Thanks,
>> Eric
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Iup-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users