mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	WindowServer: Don't invalidate the cursor on left button state change.
This was needed back when pressing the left button would cause the cursor to switch colors.
This commit is contained in:
		
							parent
							
								
									b860da3ea5
								
							
						
					
					
						commit
						8750f93201
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -79,8 +79,8 @@ void WSScreen::on_receive_mouse_data(int dx, int dy, unsigned buttons) | ||||||
|         auto message = make<WSMouseEvent>(WSEvent::MouseMove, m_cursor_location, buttons, MouseButton::None, m_modifiers); |         auto message = make<WSMouseEvent>(WSEvent::MouseMove, m_cursor_location, buttons, MouseButton::None, m_modifiers); | ||||||
|         WSEventLoop::the().post_event(WSWindowManager::the(), move(message)); |         WSEventLoop::the().post_event(WSWindowManager::the(), move(message)); | ||||||
|     } |     } | ||||||
|     // NOTE: Invalidate the cursor if it moved, or if the left button changed state (for the cursor color inversion.)
 | 
 | ||||||
|     if (m_cursor_location != prev_location || changed_buttons & (unsigned)MouseButton::Left) |     if (m_cursor_location != prev_location) | ||||||
|         WSWindowManager::the().invalidate_cursor(); |         WSWindowManager::the().invalidate_cursor(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling