mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:42:43 +00:00 
			
		
		
		
	WindowServer+LibGUI: Store a "data type" with the clipboard content
This will allow us to distinguish between different types of data stored on the clipboard.
This commit is contained in:
		
							parent
							
								
									9d2c4d223a
								
							
						
					
					
						commit
						c543ee5c5b
					
				
					 10 changed files with 94 additions and 15 deletions
				
			
		|  | @ -15,6 +15,7 @@ | |||
| #include <LibCore/CObject.h> | ||||
| #include <LibGUI/GAction.h> | ||||
| #include <LibGUI/GApplication.h> | ||||
| #include <LibGUI/GClipboard.h> | ||||
| #include <LibGUI/GDesktop.h> | ||||
| #include <LibGUI/GMenu.h> | ||||
| #include <LibGUI/GWidget.h> | ||||
|  | @ -244,6 +245,11 @@ void GWindowServerConnection::postprocess_bundles(Vector<IncomingMessageBundle>& | |||
|             continue; | ||||
|         } | ||||
| 
 | ||||
|         if (event.type == WSAPI_ServerMessage::Type::ClipboardContentsChanged) { | ||||
|             GClipboard::the().did_receive_clipboard_contents_changed({}, String(event.text, event.text_length)); | ||||
|             continue; | ||||
|         } | ||||
| 
 | ||||
|         if (event.type == WSAPI_ServerMessage::Error) { | ||||
|             dbgprintf("GEventLoop got error message from server\n"); | ||||
|             dbgprintf("  - error message: %s\n", String(event.text, event.text_length).characters()); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling