mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix urgency IPC events
This commit is contained in:
		
							parent
							
								
									315d5311b2
								
							
						
					
					
						commit
						f86087d78f
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -197,6 +197,9 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
 | 
				
			||||||
		json_object_object_add(object, "layout",
 | 
							json_object_object_add(object, "layout",
 | 
				
			||||||
			json_object_new_string(ipc_json_layout_description(c->layout)));
 | 
								json_object_new_string(ipc_json_layout_description(c->layout)));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						json_object_object_add(object, "urgent",
 | 
				
			||||||
 | 
								json_object_new_boolean(view_is_urgent(c->sway_view)));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void focus_inactive_children_iterator(struct sway_container *c, void *data) {
 | 
					static void focus_inactive_children_iterator(struct sway_container *c, void *data) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1070,8 +1070,10 @@ void view_set_urgent(struct sway_view *view, bool enable) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	container_damage_whole(view->swayc);
 | 
						container_damage_whole(view->swayc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ipc_event_window(view->swayc, "urgent");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
 | 
						struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
 | 
				
			||||||
	ipc_event_workspace(ws, NULL, "urgent");
 | 
						ipc_event_workspace(NULL, ws, "urgent");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool view_is_urgent(struct sway_view *view) {
 | 
					bool view_is_urgent(struct sway_view *view) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue