mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	ipc: remove class key from view json
It turns out that i3 does not have a `class` key in the json description
of a view, but provides it through `window_properties.class`. Since
`window_properties` has been added by 8fc9328, we can remove `class`
altogether.
Signed-off-by: Franklin "Snaipe" Mathieu <snaipe@diacritic.io>
			
			
This commit is contained in:
		
							parent
							
								
									6409a109f6
								
							
						
					
					
						commit
						259fe1e76f
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
					@ -229,10 +229,6 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
 | 
				
			||||||
	json_object_object_add(object, "app_id",
 | 
						json_object_object_add(object, "app_id",
 | 
				
			||||||
			app_id ? json_object_new_string(app_id) : NULL);
 | 
								app_id ? json_object_new_string(app_id) : NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	const char *class = view_get_class(c->view);
 | 
					 | 
				
			||||||
	json_object_object_add(object, "class",
 | 
					 | 
				
			||||||
			class ? json_object_new_string(class) : NULL);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	json_object *marks = json_object_new_array();
 | 
						json_object *marks = json_object_new_array();
 | 
				
			||||||
	list_t *view_marks = c->view->marks;
 | 
						list_t *view_marks = c->view->marks;
 | 
				
			||||||
	for (int i = 0; i < view_marks->length; ++i) {
 | 
						for (int i = 0; i < view_marks->length; ++i) {
 | 
				
			||||||
| 
						 | 
					@ -269,6 +265,7 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		json_object *window_props = json_object_new_object();
 | 
							json_object *window_props = json_object_new_object();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							const char *class = view_get_class(c->view);
 | 
				
			||||||
		json_object_object_add(window_props, "class",
 | 
							json_object_object_add(window_props, "class",
 | 
				
			||||||
				class ? json_object_new_string(class) : NULL);
 | 
									class ? json_object_new_string(class) : NULL);
 | 
				
			||||||
		const char *instance = view_get_instance(c->view);
 | 
							const char *instance = view_get_instance(c->view);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue