Rémi Bernon (@rbernon) commented about programs/explorer/systray.c:
if (icon->display != ICON_DISPLAY_HIDDEN) return TRUE; /* already displayed */
- if (!enable_taskbar && NtUserMessageCall( icon->window, WINE_SYSTRAY_DOCK_INSERT, icon_cx, icon_cy,
- if (!enable_taskbar)
- {
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 );
if (NtUserMessageCall( icon->window, WINE_SYSTRAY_DOCK_INSERT, icon_cx, icon_cy, icon, NtUserSystemTrayCall, FALSE )) {
Nit, but I find it much more readable to keep short cases near the beginning of if/else blocks.
```suggestion:-2+0 if (!NtUserMessageCall( icon->window, WINE_SYSTRAY_DOCK_INSERT, icon_cx, icon_cy, icon, NtUserSystemTrayCall, FALSE )) SetWindowLongW( icon->window, GWL_EXSTYLE, old_exstyle ); else { ```
It avoids having to skip far down to some unknown else location, see if something else is done in the other case, and at the same time forget about the context of the if. In this case it's not too bad, but it's a good habit IMO.