Exemple #1
0
void HandleMessage_CreateWindow(CClient& client, CDeserialiser& message)
{
	uint16_t	new_id = message.ReadU16();
	//uint16_t	parent_id = message.ReadU16();
	//CWindow* parent = client.GetWindow( parent_id );
	::std::string	name = message.ReadString();
	
	::_SysDebug("_CreateWindow: (%i, '%s')", new_id, name.c_str());
	client.SetWindow( new_id, new CWindow(*gpCompositor, client, name, new_id) );
}
Exemple #2
0
void HandleMessage_DestroyWindow(CClient& client, CDeserialiser& message)
{
	uint16_t	win_id = message.ReadU16();
	_SysDebug("_DestroyWindow: (%i)", win_id);
	
	CWindow*	win = client.GetWindow(win_id);
	if(!win) {
		throw IPC::CClientFailure("_DestroyWindow: Bad window");
	}
	client.SetWindow(win_id, 0);	
	
	// TODO: Directly inform compositor?
	delete win;
}