[Lazarus] Window sizing on gtk
Max Vlasov
max.vlasov at gmail.com
Fri Oct 28 09:57:42 CEST 2011
Hi,
I noticed a little difference between gtk and win32 in handling window
sizing programmatically and appreciate any advice on the subject.
On Windows it is possible to create user-drawn window that formally is not
resizable and has no system decoration, but behaves like normal resizable
window. So I had BorderStyle = bsNone and custom buttons and my own border
for resizing. It was easy because WindowState still responds to wsMaximized
in this case and borders can be also responsive by implementing WM_NCHITTEST
handler. But both seems to not work on gtk (no visible change for
WindowState changing and no visiting both WM_NCHitTest and CM_HITTEST
handlers)
I can fix the first problem just by little extra code that switches between
the current size and Bounds(0, 0, Screen.Width, Screen.Height), but the
borders emulation is a harder task (I should track the areas, cursors and
window sizing arithmetics, not mentioning that the program doesn't obey the
system way of resizing for example frame drawing instead of window drawing).
Is there some other solution or maybe setting/option I miss? With Nchittest
the question is also does it work at all on gtk? I see that there are plenty
of places in lcl so not working for forms look a little strange.
Thanks
Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20111028/3257429d/attachment-0002.html>
More information about the Lazarus
mailing list