Xi: fix XI2 passive grab reply length calculation
If modifiers failed, the reply length was 4 bytes too short. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
		
							parent
							
								
									eb8141b6ed
								
							
						
					
					
						commit
						33fee13361
					
				| 
						 | 
				
			
			@ -191,7 +191,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
 | 
			
		|||
            info->status = status;
 | 
			
		||||
            info->modifiers = *modifiers;
 | 
			
		||||
            rep.num_modifiers++;
 | 
			
		||||
            rep.length++;
 | 
			
		||||
            rep.length += bytes_to_int32(sizeof(xXIGrabModifierInfo));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -199,7 +199,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
 | 
			
		|||
    if (rep.num_modifiers)
 | 
			
		||||
    {
 | 
			
		||||
	client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
 | 
			
		||||
        WriteSwappedDataToClient(client, rep.num_modifiers * 4, (char*)modifiers_failed);
 | 
			
		||||
        WriteSwappedDataToClient(client, rep.length * 4, (char*)modifiers_failed);
 | 
			
		||||
    }
 | 
			
		||||
    free(modifiers_failed);
 | 
			
		||||
    return ret;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue