[PATCH] Fix Ugly borders around undecorated windows in Gnome
Kirill K. Smirnov
lich at math.spbu.ru
Mon Oct 1 07:40:37 CDT 2007
>This is my first attempt at submitting a patch to WINE, so please excuse
>me if I have broken any conventions or am going through the wrong
>channel. As it currently stands, wine is setting the 'MWM_DECOR_BORDER'
>hint on managed but undecorated windows, such as iTunes, or Winamp.
>This does not cause problems in KDE, but in Gnome it puts a gray border
>around such windows.
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
>Not setting this hint does not seem to cause
>problems in KDE and fixes the problem in Gnome. A patch to do just that
>is attached. Comments?
>--- dlls/winex11.drv/window_orig.c 2007-09-30 18:14:56.281259713 -0400
>+++ dlls/winex11.drv/window.c 2007-09-30 18:18:44.724576520 -0400
>@@ -591,11 +591,6 @@
> if (style & WS_MINIMIZEBOX) mwm_hints.decorations |=
MWM_DECOR_MINIMIZE;
> if (style & WS_MAXIMIZEBOX) mwm_hints.decorations |=
MWM_DECOR_MAXIMIZE;
> }
>- if (ex_style & WS_EX_DLGMODALFRAME) mwm_hints.decorations |=
>MWM_DECOR_BORDER;
>- else if (style & WS_THICKFRAME) mwm_hints.decorations |=
>MWM_DECOR_BORDER | MWM_DECOR_RESIZEH;
>- else if ((style & (WS_DLGFRAME|WS_BORDER)) == WS_DLGFRAME)
mwm_hints.decorations |= MWM_DECOR_BORDER;
>- else if (style & WS_BORDER) mwm_hints.decorations |=
MWM_DECOR_BORDER;
>- else if (!(style & (WS_CHILD|WS_POPUP))) mwm_hints.decorations |=
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:
>- else if (style & WS_BORDER) mwm_hints.decorations |=
MWM_DECOR_BORDER;
>- else if (!(style & (WS_CHILD|WS_POPUP))) mwm_hints.decorations |=
MWM_DECOR_BORDER;
and draw thin 1px border 'manually' (I mean, in user32, do not left it to
Window Manager)
--
Kirill
More information about the wine-devel
mailing list