mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:42:44 +00:00 
			
		
		
		
	WindowServer: Preserve all members in MouseEvent::translated()
We were forgetting to preserve the m_drag and m_mime_data members of WindowServer::MouseEvent when making a translated copy. This didn't affect any reachable code paths before this change.
This commit is contained in:
		
							parent
							
								
									bac200885c
								
							
						
					
					
						commit
						300711d013
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -117,7 +117,12 @@ public: | |||
|     void set_drag(bool b) { m_drag = b; } | ||||
|     void set_mime_data(const Core::MimeData& mime_data) { m_mime_data = mime_data; } | ||||
| 
 | ||||
|     MouseEvent translated(const Gfx::IntPoint& delta) const { return MouseEvent((Type)type(), m_position.translated(delta), m_buttons, m_button, m_modifiers, m_wheel_delta); } | ||||
|     MouseEvent translated(Gfx::IntPoint const& delta) const | ||||
|     { | ||||
|         MouseEvent event = *this; | ||||
|         event.m_position = m_position.translated(delta); | ||||
|         return event; | ||||
|     } | ||||
| 
 | ||||
| private: | ||||
|     Gfx::IntPoint m_position; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling