mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-10-29 05:40:16 -04:00 
			
		
		
		
	server: add wl_display getter for wl_global
This can be useful if the compositor wants to call wl_global_destroy() with some delay but it doesn't have the wl_display object associated with the global, which is needed to get access to the event loop. Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
This commit is contained in:
		
							parent
							
								
									727c7903b2
								
							
						
					
					
						commit
						2b22160fb6
					
				
					 2 changed files with 17 additions and 0 deletions
				
			
		|  | @ -279,6 +279,9 @@ wl_display_set_global_filter(struct wl_display *display, | |||
| const struct wl_interface * | ||||
| wl_global_get_interface(const struct wl_global *global); | ||||
| 
 | ||||
| struct wl_display * | ||||
| wl_global_get_display(const struct wl_global *global); | ||||
| 
 | ||||
| void * | ||||
| wl_global_get_user_data(const struct wl_global *global); | ||||
| 
 | ||||
|  |  | |||
|  | @ -1277,6 +1277,20 @@ wl_global_get_interface(const struct wl_global *global) | |||
| 	return global->interface; | ||||
| } | ||||
| 
 | ||||
| /** Get the display object for the given global
 | ||||
|  * | ||||
|  * \param global The global object | ||||
|  * \return The display object the global is associated with. | ||||
|  * | ||||
|  * \memberof wl_global | ||||
|  * \since 1.20 | ||||
|  */ | ||||
| WL_EXPORT struct wl_display * | ||||
| wl_global_get_display(const struct wl_global *global) | ||||
| { | ||||
| 	return global->display; | ||||
| } | ||||
| 
 | ||||
| WL_EXPORT void * | ||||
| wl_global_get_user_data(const struct wl_global *global) | ||||
| { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vlad Zahorodnii
						Vlad Zahorodnii