mirror of
				https://github.com/swaywm/sway.git
				synced 2025-10-29 05:40:18 -04:00 
			
		
		
		
	fix swaybar ipc handling
Swap return with break in IPC_EVENT_WORKSPACE case to free resp. Change default return value to true. This causes IPC_EVENT_MODE changes to be rendered instantly.
This commit is contained in:
		
							parent
							
								
									4240ede065
								
							
						
					
					
						commit
						39e3319394
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -331,7 +331,7 @@ bool handle_ipc_readable(struct swaybar *bar) { | |||
| 	switch (resp->type) { | ||||
| 	case IPC_EVENT_WORKSPACE: | ||||
| 		ipc_get_workspaces(bar); | ||||
| 		return true; | ||||
| 		break; | ||||
| 	case IPC_EVENT_MODE: { | ||||
| 		json_object *result = json_tokener_parse(resp->payload); | ||||
| 		if (!result) { | ||||
|  | @ -367,5 +367,5 @@ bool handle_ipc_readable(struct swaybar *bar) { | |||
| 		return false; | ||||
| 	} | ||||
| 	free_ipc_response(resp); | ||||
| 	return false; | ||||
| 	return true; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 db
						db