From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/bitblt.c | 10 ++++------ dlls/winex11.drv/window.c | 14 +++++--------- dlls/winex11.drv/x11drv.h | 3 +-- 3 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index b6e08eaa6b8..f073a3d5140 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1880,8 +1880,7 @@ static const struct window_surface_funcs x11drv_surface_funcs = /*********************************************************************** * create_surface */ -static struct window_surface *create_surface( HWND hwnd, Window window, const XVisualInfo *vis, const RECT *rect, - BOOL use_alpha ) +static struct window_surface *create_surface( HWND hwnd, Window window, const XVisualInfo *vis, const RECT *rect ) { const XPixmapFormatValues *format = pixmap_formats[vis->depth]; char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; @@ -1902,7 +1901,7 @@ static struct window_surface *create_surface( HWND hwnd, Window window, const XV info->bmiHeader.biPlanes = 1; info->bmiHeader.biBitCount = format->bits_per_pixel; info->bmiHeader.biSizeImage = get_dib_image_size( info ); - set_color_info( vis, info, use_alpha ); + set_color_info( vis, info, TRUE );
if (!(image = x11drv_image_create( info, vis ))) return NULL;
@@ -1984,7 +1983,7 @@ BOOL X11DRV_CreateWindowSurface( HWND hwnd, BOOL layered, const RECT *surface_re if (layered) { data->layered = TRUE; - if (!data->embedded && argb_visual.visualid) set_window_visual( data, &argb_visual, TRUE ); + if (!data->embedded && argb_visual.visualid) set_window_visual( data, &argb_visual ); } else if (enable_direct_drawing( data, layered )) { @@ -1992,8 +1991,7 @@ BOOL X11DRV_CreateWindowSurface( HWND hwnd, BOOL layered, const RECT *surface_re goto done; /* draw directly to the window */ }
- *surface = create_surface( data->hwnd, data->whole_window, &data->vis, surface_rect, - layered ? data->use_alpha : FALSE ); + *surface = create_surface( data->hwnd, data->whole_window, &data->vis, surface_rect );
done: release_win_data( data ); diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index b13c54531ac..faece375b79 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2219,15 +2219,11 @@ static void destroy_whole_window( struct x11drv_win_data *data, BOOL already_des * * Change the visual by destroying and recreating the X window if needed. */ -void set_window_visual( struct x11drv_win_data *data, const XVisualInfo *vis, BOOL use_alpha ) +void set_window_visual( struct x11drv_win_data *data, const XVisualInfo *vis ) { - BOOL same_visual = (data->vis.visualid == vis->visualid); Window client_window = data->client_window;
- if (!data->use_alpha == !use_alpha && same_visual) return; - data->use_alpha = use_alpha; - - if (same_visual) return; + if (data->vis.visualid == vis->visualid) return; client_window = data->client_window; /* detach the client before re-creating whole_window */ detach_client_window( data, client_window ); @@ -2273,7 +2269,7 @@ void X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style ) if (offset == GWL_EXSTYLE && (changed & WS_EX_LAYERED)) /* changing WS_EX_LAYERED resets attributes */ { data->layered = FALSE; - set_window_visual( data, &default_visual, FALSE ); + set_window_visual( data, &default_visual ); sync_window_opacity( data->display, data->whole_window, 0, 0 ); } done: @@ -2641,7 +2637,7 @@ BOOL X11DRV_SystrayDockInsert( HWND hwnd, UINT cx, UINT cy, void *icon ) get_systray_visual_info( display, systray_window, &visual );
if (!(data = get_win_data( hwnd ))) return FALSE; - set_window_visual( data, &visual, TRUE ); + set_window_visual( data, &visual ); make_window_embedded( data ); window = data->whole_window; release_win_data( data ); @@ -3151,7 +3147,7 @@ void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO
if (data) { - set_window_visual( data, &default_visual, FALSE ); + set_window_visual( data, &default_visual );
if (data->whole_window) sync_window_opacity( data->display, data->whole_window, alpha, flags ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index ee5bbe07dd4..fb894771a83 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -629,7 +629,6 @@ struct x11drv_win_data UINT embedded : 1; /* is window an XEMBED client? */ UINT shaped : 1; /* is window using a custom region shape? */ UINT layered : 1; /* is window layered and with valid attributes? */ - UINT use_alpha : 1; /* does window use an alpha channel? */ UINT skip_taskbar : 1; /* does window should be deleted from taskbar */ UINT add_taskbar : 1; /* does window should be added to taskbar regardless of style */ UINT net_wm_fullscreen_monitors_set : 1; /* is _NET_WM_FULLSCREEN_MONITORS set */ @@ -677,7 +676,7 @@ extern Window create_client_window( HWND hwnd, const XVisualInfo *visual, Colorm extern void detach_client_window( struct x11drv_win_data *data, Window client_window ); extern void attach_client_window( struct x11drv_win_data *data, Window client_window ); extern void destroy_client_window( HWND hwnd, Window client_window ); -extern void set_window_visual( struct x11drv_win_data *data, const XVisualInfo *vis, BOOL use_alpha ); +extern void set_window_visual( struct x11drv_win_data *data, const XVisualInfo *vis ); extern void change_systray_owner( Display *display, Window systray_window ); extern BOOL update_clipboard( HWND hwnd ); extern void init_win_context(void);