For me this causes problem in KDE too. Not just border but an ugly caption too :-( See http://www.winehq.org/pipermail/wine-devel/2007-September/059366.html
MWM_DECOR_MINIMIZE;
if (style & WS_MAXIMIZEBOX) mwm_hints.decorations |=
MWM_DECOR_MAXIMIZE;
mwm_hints.decorations |= MWM_DECOR_BORDER;
MWM_DECOR_BORDER;
MWM_DECOR_BORDER;
}
XChangeProperty( display, data->whole_window,
x11drv_atom(_MOTIF_WM_HINTS),
You overdid here a little: WS_THICKFRAME must have thick border.
As I think, we should not mix WS_BORDER and MWM_DECOR_BORDER. They have DIFFERENT semantics. WS_BORDER is 1px border, but MWM_DECOR_BORDER is a thick border. What for me, I'd deleted just these lines:
MWM_DECOR_BORDER;
MWM_DECOR_BORDER;
and draw thin 1px border 'manually' (I mean, in user32, do not left it to Window Manager)
-- Kirill