WSEventLoop: Treat invalid window types the same as unknown window types

And forcefully disconnect the client in both cases.
This commit is contained in:
Robin Burchell 2019-07-13 23:50:50 +02:00 committed by Andreas Kling
parent 559a999852
commit bee4544192
Notes: sideshowbarker 2024-07-19 13:17:05 +09:00

View file

@ -212,10 +212,7 @@ bool WSEventLoop::on_receive_from_client(int client_id, const WSAPI_ClientMessag
ws_window_type = WSWindowType::Menubar;
break;
case WSAPI_WindowType::Invalid:
break; // handled below
}
if (ws_window_type == WSWindowType::Invalid) {
default:
dbgprintf("Unknown WSAPI_WindowType: %d\n", message.window.type);
client.did_misbehave();
return false;