[Lazarus] GetWindowSize misleading documentation or bug?
Luca Olivetti
luca at wetron.es
Fri Sep 26 22:47:43 CEST 2014
El 26/09/14 22:45, Luca Olivetti ha escrit:
> El 26/09/14 20:47, Giuliano Colla ha escrit:
>
>> I was too hasty in my reply. After some tests here are the results:
>
> Yes, I was puzzled when you said it didn't work in an xp vm, since
> that's exactly the configuration I tested
>
>>
>> GetWindowSize returns the window client area in all platforms.
>>
>> GetWindowRect here returns the full window area (decoration and borders
>> included) in all the configurations tested:
>>
>> Windows XP running in a VM under Linux, with Lazarus 1.2.4
>> Linux CentOs 6, Gtk2 and Qt, desktop KDE and XFce, Lazarus 1.2.2 and
>> Lazarus 1.3 (trunk)
>
> Strange, on mageia 4, kde, lazarus 1.2.4 it doesn't work. What I'm
> trying to do is to tile windows one next to the other. Using
> GetWindowRect under windows I can do it properly, while on linux gtk the
> windows overlap (i.e. with this layout
>
>
> A B C
> D E
>
> A overlaps D and B overlaps E, the amount of overlap seems to be equal
> to the height of the title bar).
Oh, and there's also a slight overlap between A-B, B-C and D-E
>
>
>>
>> Apparently the documentation isn't accurate, and there's a mix-up of the
>> two functions
>
> So in theory GetWindowRect is the "right" function while GetWindowSize
> is redundant (since there's already width and height)?
>
>
> Bye
>
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es
Tel. +34 935883004 Fax +34 935883007
More information about the Lazarus
mailing list