mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-10-29 05:40:12 -04:00 
			
		
		
		
	seat: don't generate serial 0
0 is reserved to mean "no event has been sent to the client".
This commit is contained in:
		
							parent
							
								
									428279a319
								
							
						
					
					
						commit
						1c604207c6
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -443,9 +443,13 @@ struct wlr_seat_client *wlr_seat_client_from_resource( | |||
| } | ||||
| 
 | ||||
| uint32_t wlr_seat_client_next_serial(struct wlr_seat_client *client) { | ||||
| 	uint32_t serial = wl_display_next_serial(wl_client_get_display(client->client)); | ||||
| 	struct wlr_serial_ringset *set = &client->serials; | ||||
| 	struct wl_display *display = wl_client_get_display(client->client); | ||||
| 	uint32_t serial = wl_display_next_serial(display); | ||||
| 	if (serial == 0) { | ||||
| 		serial = wl_display_next_serial(display); | ||||
| 	} | ||||
| 
 | ||||
| 	struct wlr_serial_ringset *set = &client->serials; | ||||
| 	if (set->count == 0) { | ||||
| 		set->data[0].min_incl = serial; | ||||
| 		set->data[0].max_incl = serial; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kirill Primak
						Kirill Primak