Jinoh Kang (@iamahuman) commented about dlls/win32u/class.c:
{ - req->window = wine_server_user_handle( hwnd ); - req->flags = 0; - req->extra_offset = -1; - req->extra_size = 0; + req->handle = wine_server_user_handle( hwnd ); if (!wine_server_call_err( req )) + { + real_class_id = reply->real_class_id; atom = reply->base_atom; } + } SERVER_END_REQ;
- return NtUserGetAtomName( atom, name ); + if (!real || (real && !real_class_id)) return NtUserGetAtomName( atom, name );
This condition is exactly equivalent to `!real || !real_class_id`[^1], which is the inverted version of `real && real_class_id` below. Code duplication often encourages code rot: someone could update the latter code but not former[^2], or vice versa. Instead, I suggest deleting this code... ```suggestion:-0+0 ``` [^1]: `(~P | (P & ~Q)) = ((~P | P) & (~P | ~Q)) = (1 & (~P | ~Q)) = (~P | ~Q)` [^2]: I've dealt with a similar problem before, in https://gitlab.winehq.org/wine/wine/-/merge_requests/3322. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4092#note_49537