mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:12:44 +00:00 
			
		
		
		
	Clipboard: Move the system clipboard to a dedicated service process :^)
This commit moves the clipboard from WindowServer into a new Clipboard service program. Clipboard runs as the unprivileged "clipboard" user and with a much tighter pledge than WindowServer. To keep things working as before, all GUI::Application users now make a connection to Clipboard after making the connection to WindowServer. It could be interesting to connect to Clipboard on demand, but right now that would necessitate expanding every GUI app's pledge to include "unix" and also unveiling the clipboard portal, which I prefer not to.
This commit is contained in:
		
							parent
							
								
									f4c60740bd
								
							
						
					
					
						commit
						244efe050a
					
				
					 25 changed files with 447 additions and 146 deletions
				
			
		|  | @ -607,7 +607,7 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio | |||
|         }, | ||||
|         window); | ||||
| 
 | ||||
|     GUI::Clipboard::the().on_content_change = [&](const String& data_type) { | ||||
|     GUI::Clipboard::the().on_change = [&](const String& data_type) { | ||||
|         auto current_location = directory_view.path(); | ||||
|         paste_action->set_enabled(data_type == "file-list" && access(current_location.characters(), W_OK) == 0); | ||||
|     }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling