Commit 8a71a4a3 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

explorer: Set layered style on systray icons before calling into the driver.

Fixes a regression introduced by b5c57b9a, which broke the systray integration outside of virtual desktops on some DEs like XFCE. Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
parent 223292da
......@@ -619,13 +619,23 @@ static BOOL show_icon(struct icon *icon)
if (icon->display != ICON_DISPLAY_HIDDEN) return TRUE; /* already displayed */
if (!enable_taskbar && NtUserMessageCall( icon->window, WINE_SYSTRAY_DOCK_INSERT, icon_cx, icon_cy,
icon, NtUserSystemTrayCall, FALSE ))
if (!enable_taskbar)
{
icon->display = ICON_DISPLAY_DOCKED;
icon->layered = TRUE;
SetWindowLongW( icon->window, GWL_EXSTYLE, GetWindowLongW( icon->window, GWL_EXSTYLE ) | WS_EX_LAYERED );
SendMessageW( icon->window, WM_SIZE, SIZE_RESTORED, MAKELONG( icon_cx, icon_cy ) );
DWORD old_exstyle = GetWindowLongW( icon->window, GWL_EXSTYLE );
/* make sure it is layered before calling into the driver */
SetWindowLongW( icon->window, GWL_EXSTYLE, old_exstyle | WS_EX_LAYERED );
paint_layered_icon( icon );
if (!NtUserMessageCall( icon->window, WINE_SYSTRAY_DOCK_INSERT, icon_cx, icon_cy,
icon, NtUserSystemTrayCall, FALSE ))
SetWindowLongW( icon->window, GWL_EXSTYLE, old_exstyle );
else
{
icon->display = ICON_DISPLAY_DOCKED;
icon->layered = TRUE;
SendMessageW( icon->window, WM_SIZE, SIZE_RESTORED, MAKELONG( icon_cx, icon_cy ) );
}
}
systray_add_icon( icon );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment