Ejemplo n.º 1
0
Archivo: ipc.c Proyecto: berkus/acess2
void IPC_int_DropClient(tIPC_Client *Client)
{
	// Remove from client list
	 int	pos;
	if( !IPC_int_BSearchClients(Client, &pos) ) {
		_SysDebug("IPC_int_DropClient: Can't find client %p", Client);
		return ;
	}

	giIPC_ClientCount --;
	memmove(&gIPC_Clients[pos], &gIPC_Clients[pos+1], (giIPC_ClientCount-pos)*sizeof(tIPC_Client*));

	// Terminate client's windows
	// - If there were active windows, show an error?
	 int	nWindowsDestroyed = 0;
	for(int i = 0; i < Client->nWindows; i ++)
	{
		if( Client->Windows[i] )
		{
			_SysDebug("Window %p:%i %p still exists", Client, i, Client->Windows[i]);
			WM_DestroyWindow(Client->Windows[i]);
			nWindowsDestroyed ++;
		}
	}
	if( nWindowsDestroyed )
	{
		_SysDebug("TODO: Show notice that application exited without destroying windows");
	}
	
	// Free client structure
	free(Client);
	_SysDebug("Dropped client %p", Client);
}
Ejemplo n.º 2
0
Archivo: ipc.c Proyecto: berkus/acess2
int IPC_Msg_DestroyWin(tIPC_Client *Client, tAxWin_IPCMessage *Msg)
{
	tWindow	*win;
	
	ASSERT(Msg->ID == IPCMSG_DESTROYWIN);

	win = IPC_int_GetWindow(Client, Msg->Window);
	if( !win )
		return 0;
	
	WM_DestroyWindow(win);
	IPC_int_SetWindow(Client, Msg->Window, NULL);
	return 0;
}
Ejemplo n.º 3
0
	Window::~Window(){
		if(id && owned){
			Select();
			WM_DestroyWindow();
		}
	}