On 05.01.2016 17:34 Manolo Gouy wrote:
>
>> Le 5 janv. 2016 à 16:48, Albrecht wrote :
>> ...
>> I did a quick test under Win8 by adding a printf statement at the end
>> of fake_X_wm(), and it appears to show a similar behavior as under
>> Win10. I got:
>> ...
>> The border width (bx, by) always seems to be 8. I don't see a
>> difference whether the window is resizable nor if it is modal on the
>> display (i.e. the /observed/ border size is always 8), but the
>> calculated size is 3 for non-resizable windows ('valuators') and modal
>> windows (lines 2-4 of 'ask'), which are not resizable as well.
>
> I don’t have Win8 available, so cannot test. Under XP and WIn7 the
> border width differences
> between resizable/non-resizable windows computed by fake_X_wm() are
> actually visible
> on screen (I had never noticed that before today).
On my Win8 the border width is constant, AFAICT. I measured the width
with Greg's fl_ruler app, and it confirms it's really 8.
> Under Win10, the actual, visible difference is in the title bar height,
> as reported by the new
> border_width_title_bar_height() function.
>
> So, apparently there is no visible difference under Win8. Is it a
> transitional stage between
> border differences (Win7) and title-bar differences (Win10)?
>
> I attach the modified widths table, with your WIn8-related values.
I believe you can remove the question mark ("8 ?") from the table at
Win8 not-resizable.
> The issue here is whether bx, by, and bt values computed by fake_X_wm()
> are correct.
> If there is no actual border difference according to window
> resizability, then the answer is INCORRECT,
> because your test shows that returned values do differ.
Yes, they do, but the window borders have all the same width. So yes,
the computation appears to be wrong.
>> I don't know how to test the other values, and my time doesn't permit
>> further tests now, but I'd be glad to assist and test more under win7
>> and win8 if you can provide a test program and/or patch like the one
>> used by me (see attachment). Maybe you have one readily available…
>
> It is possible to test the second computation as follows:
> - compile Fl.cxx with -DUSE_PRINT_BUTTON
> - add a print bx,by,bt statement at the end of function
> border_width_title_bar_height() in Fl_win32.cxx
> - use the "Print front window" button with diverse windows and test apps.
Okay, I tried another patch and your proposed test. Here are the results:
$ bin/examples/ask.exe
fake_X_wm_style() returns: bx=8, by=8, bt=23
fake_X_wm_style() returns: bx=3, by=3, bt=23
fake_X_wm_style() returns: bx=3, by=3, bt=23
border_width_title_bar_height() returns: bx=8, by=8, bt=23
border_width_title_bar_height() returns: bx=8, by=8, bt=23
border_width_title_bar_height() returns: bx=8, by=8, bt=23
fake_X_wm_style() returns: bx=3, by=3, bt=23
fake_X_wm_style() returns: bx=3, by=3, bt=23
fake_X_wm_style() returns: bx=3, by=3, bt=23
border_width_title_bar_height() returns: bx=8, by=8, bt=23
border_width_title_bar_height() returns: bx=8, by=8, bt=23
border_width_title_bar_height() returns: bx=8, by=8, bt=23
fake_X_wm_style() returns: bx=3, by=3, bt=23
fake_X_wm_style() returns: bx=3, by=3, bt=23
Note: all window borders are 8 px wide on screen, despite the different
numbers.
Attachments:
window_borders.diff: my new test (patch) with printf()'s
window_borders.png: screen shot of test (ask.exe)
window_borders.pdf: print output to a PDF printer
I hope these attachments make it to the mailing list...
I encourage everybody to test on different Windows versions with my
supplied test patch (and -DUSE_PRINT_BUTTON as Manolo suggested).