mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	Merge pull request #49 from telent/primary-selection-gtk-workaround
workaround Gtk primary selection bug by changing order of globals
This commit is contained in:
		
						commit
						ec5603dbd0
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		
							
								
								
									
										12
									
								
								src/server.c
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/server.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -156,6 +156,17 @@ server_init(struct server *server)
 | 
			
		|||
		exit(EXIT_FAILURE);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* empirically, primary selection doesn't work with Gtk apps unless the
 | 
			
		||||
	 * device manager is one of the earliest globals to be advertised. All
 | 
			
		||||
	 * credit to Wayfire for discovering this, though their symptoms
 | 
			
		||||
	 * (crash) are not the same as ours (silently does nothing). When adding
 | 
			
		||||
	 * more globals above this line it would be as well to check that
 | 
			
		||||
	 * middle-button paste still works with any Gtk app of your choice
 | 
			
		||||
	 *
 | 
			
		||||
	 * https://wayfire.org/2020/08/04/Wayfire-0-5.html
 | 
			
		||||
	*/
 | 
			
		||||
	wlr_primary_selection_v1_device_manager_create(server->wl_display);
 | 
			
		||||
 | 
			
		||||
	output_init(server);
 | 
			
		||||
	seat_init(server);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -195,7 +206,6 @@ server_init(struct server *server)
 | 
			
		|||
	wlr_screencopy_manager_v1_create(server->wl_display);
 | 
			
		||||
	wlr_data_control_manager_v1_create(server->wl_display);
 | 
			
		||||
	wlr_gamma_control_manager_v1_create(server->wl_display);
 | 
			
		||||
	wlr_primary_selection_v1_device_manager_create(server->wl_display);
 | 
			
		||||
 | 
			
		||||
	server->foreign_toplevel_manager =
 | 
			
		||||
		wlr_foreign_toplevel_manager_v1_create(server->wl_display);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue