mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	server: fix button signedness in wl_grab_interface
wl_input_device::grab_button is unsigned but the button parameter to wl_grab_interface::button is signed. This lead to a warning in data-device.c. The button number is unsigned in the protocol, so make it unsigned in the wl_grab_interface API, too. Fixes the compiler warning "comparison between signed and unsigned integer expressions". Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
		
							parent
							
								
									03c40a8c99
								
							
						
					
					
						commit
						4560b6b6b4
					
				
					 3 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -248,7 +248,7 @@ data_device_end_drag_grab(struct wl_input_device *device, uint32_t time)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
drag_grab_button(struct wl_pointer_grab *grab,
 | 
					drag_grab_button(struct wl_pointer_grab *grab,
 | 
				
			||||||
		 uint32_t time, int32_t button, int32_t state)
 | 
							 uint32_t time, uint32_t button, int32_t state)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct wl_input_device *device =
 | 
						struct wl_input_device *device =
 | 
				
			||||||
		container_of(grab, struct wl_input_device, drag_grab);
 | 
							container_of(grab, struct wl_input_device, drag_grab);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -474,7 +474,7 @@ default_grab_motion(struct wl_pointer_grab *grab,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
default_grab_button(struct wl_pointer_grab *grab,
 | 
					default_grab_button(struct wl_pointer_grab *grab,
 | 
				
			||||||
		    uint32_t time, int32_t button, int32_t state)
 | 
							    uint32_t time, uint32_t button, int32_t state)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct wl_input_device *device = grab->input_device;
 | 
						struct wl_input_device *device = grab->input_device;
 | 
				
			||||||
	struct wl_resource *resource;
 | 
						struct wl_resource *resource;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -143,7 +143,7 @@ struct wl_pointer_grab_interface {
 | 
				
			||||||
	void (*motion)(struct wl_pointer_grab *grab,
 | 
						void (*motion)(struct wl_pointer_grab *grab,
 | 
				
			||||||
		       uint32_t time, int32_t x, int32_t y);
 | 
							       uint32_t time, int32_t x, int32_t y);
 | 
				
			||||||
	void (*button)(struct wl_pointer_grab *grab,
 | 
						void (*button)(struct wl_pointer_grab *grab,
 | 
				
			||||||
		       uint32_t time, int32_t button, int32_t state);
 | 
							       uint32_t time, uint32_t button, int32_t state);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct wl_pointer_grab {
 | 
					struct wl_pointer_grab {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue