Ejemplo n.º 1
0
void DEHandleDesktopEvent(DecEvent* event) 
{
	DecEventDesktop* desktopEvent = dec_event_desktop_new(event); 
	if (desktopEvent == NULL)
		return; 
	
	int* eventTargets		= dec_event_targets_get(event); 
	int	 eventTargetsSize	= dec_event_targets_size_get(event); 
	
	if (eventTargets == NULL || eventTargetsSize == 0) {
		dec_event_desktop_free(desktopEvent); 
		return; 
	}	
	
	CGSConnection oConnection = _CGSDefaultConnection(); 
	
	/* carry out operation */ 
	CGSMoveWorkspaceWindowList(oConnection, dec_event_targets_get(event), dec_event_targets_size_get(event), dec_event_desktop_value_get(desktopEvent));	
	dec_event_desktop_free(desktopEvent); 
}
void moveToWorkspace(int wid, int workspace) {
	CGSConnection cid;

	cid = _CGSDefaultConnection();
	CGSMoveWorkspaceWindowList(cid,&wid,1,workspace);
}