[Mono-winforms-list] Non-client areas on X

Rolf Bjarne Kvinge rolflists at ya.com
Fri Mar 30 07:49:34 EDT 2007


Hello,

Here is a rather big patch that fixes the broken non-client areas in X, and
since it involves quite a few changes in key areas I'd appreciate any
comments .

The first thing I found is that when sending a WM_NCCALCSIZE, we were
initializing the message with a proposed client area, while MS initializes
it to the entire window area and then they calculate the client area in
their DefWndProc. This got broken when Winforms handles WM_NCCALCSIZE
somewhere and doesn't send it to DefWndProc for further processing, in which
case the borders on X were calculated twice. This was hidden by the fact
that Hwnd.GetClientRectangle didn't calculate the borders correctly, but
when I fixed that very weird things started to happen (windows jumping
around when moving them for instance), so that's the reason for the rest of
the changes. Hopefully I didn't get completely lost in there :)

Rolf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ncpublic.patch
Type: application/octet-stream
Size: 31995 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20070330/a0c9466b/attachment-0001.obj 


More information about the Mono-winforms-list mailing list