mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	ipc: show marks of containers without view in tree
This commit is contained in:
		
							parent
							
								
									1d3681f521
								
							
						
					
					
						commit
						848a6fdb21
					
				
					 1 changed files with 8 additions and 8 deletions
				
			
		| 
						 | 
					@ -471,14 +471,6 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
 | 
				
			||||||
	bool visible = view_is_visible(c->view);
 | 
						bool visible = view_is_visible(c->view);
 | 
				
			||||||
	json_object_object_add(object, "visible", json_object_new_boolean(visible));
 | 
						json_object_object_add(object, "visible", json_object_new_boolean(visible));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	json_object *marks = json_object_new_array();
 | 
					 | 
				
			||||||
	list_t *con_marks = c->marks;
 | 
					 | 
				
			||||||
	for (int i = 0; i < con_marks->length; ++i) {
 | 
					 | 
				
			||||||
		json_object_array_add(marks, json_object_new_string(con_marks->items[i]));
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	json_object_object_add(object, "marks", marks);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	struct wlr_box window_box = {
 | 
						struct wlr_box window_box = {
 | 
				
			||||||
		c->content_x - c->x,
 | 
							c->content_x - c->x,
 | 
				
			||||||
		(c->current.border == B_PIXEL) ? c->current.border_thickness : 0,
 | 
							(c->current.border == B_PIXEL) ? c->current.border_thickness : 0,
 | 
				
			||||||
| 
						 | 
					@ -582,6 +574,14 @@ static void ipc_json_describe_container(struct sway_container *c, json_object *o
 | 
				
			||||||
	get_deco_rect(c, &deco_box);
 | 
						get_deco_rect(c, &deco_box);
 | 
				
			||||||
	json_object_object_add(object, "deco_rect", ipc_json_create_rect(&deco_box));
 | 
						json_object_object_add(object, "deco_rect", ipc_json_create_rect(&deco_box));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						json_object *marks = json_object_new_array();
 | 
				
			||||||
 | 
						list_t *con_marks = c->marks;
 | 
				
			||||||
 | 
						for (int i = 0; i < con_marks->length; ++i) {
 | 
				
			||||||
 | 
							json_object_array_add(marks, json_object_new_string(con_marks->items[i]));
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						json_object_object_add(object, "marks", marks);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (c->view) {
 | 
						if (c->view) {
 | 
				
			||||||
		ipc_json_describe_view(c, object);
 | 
							ipc_json_describe_view(c, object);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue