20 Oct
2023
20 Oct
'23
9:31 p.m.
Jinoh Kang (@iamahuman) commented about dlls/win32u/window.c:
return TRUE; }
+static BOOL set_real_window_class_id( HWND hwnd, DWORD param ) +{ + WND *win = get_win_ptr( hwnd ); + + if (!win) return FALSE; + if (win == WND_OTHER_PROCESS || win == WND_DESKTOP) + { + ERR("Tried to set real window class on a window belonging to another process.\n"); + return FALSE; + } + + if (!win->real_class_id)
Is this merely an optimization to opportunistically avoid server calls? If so, it should behave the same as if the `if()` guard did not exist. ```suggestion:-0+0 if (win->real_class_id != param) ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4092#note_49480