mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	scaled-scene-buffer: block sharing of buffers created before reconfigure
This prevents potential bugs that buffers created by scaled_scene_buffers before Reconfigure are reused by other newly created scaled_scene_buffers. This is targeted for scaled_icon_buffer whose buffer creation depends on server->sfdo.
This commit is contained in:
		
							parent
							
								
									c49f577c6b
								
							
						
					
					
						commit
						925360ffba
					
				
					 3 changed files with 20 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -251,3 +251,13 @@ scaled_scene_buffer_request_update(struct scaled_scene_buffer *self,
 | 
			
		|||
		_update_buffer(self, self->active_scale);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
scaled_scene_buffer_invalidate_sharing(void)
 | 
			
		||||
{
 | 
			
		||||
	struct scaled_scene_buffer *scene_buffer, *tmp;
 | 
			
		||||
	wl_list_for_each_safe(scene_buffer, tmp, &all_scaled_buffers, link) {
 | 
			
		||||
		wl_list_remove(&scene_buffer->link);
 | 
			
		||||
		wl_list_init(&scene_buffer->link);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,6 +31,7 @@
 | 
			
		|||
 | 
			
		||||
#include "drm-lease-v1-protocol.h"
 | 
			
		||||
#include "common/macros.h"
 | 
			
		||||
#include "common/scaled-scene-buffer.h"
 | 
			
		||||
#include "config/rcxml.h"
 | 
			
		||||
#include "config/session.h"
 | 
			
		||||
#include "decorations.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -68,6 +69,7 @@ static struct wl_event_source *sigchld_source;
 | 
			
		|||
static void
 | 
			
		||||
reload_config_and_theme(struct server *server)
 | 
			
		||||
{
 | 
			
		||||
	scaled_scene_buffer_invalidate_sharing();
 | 
			
		||||
	rcxml_finish();
 | 
			
		||||
	rcxml_read(rc.config_file);
 | 
			
		||||
	theme_finish(server->theme);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue