XQuartz: Ensure scroll events are delivered to a single window (not both X11 and AppKit)
Fixes: https://github.com/XQuartz/XQuartz/issues/130
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 4532b696c6)
			
			
This commit is contained in:
		
							parent
							
								
									140d9a0f75
								
							
						
					
					
						commit
						e48acd9c40
					
				| 
						 | 
					@ -267,6 +267,8 @@ QuartzModeBundleInit(void);
 | 
				
			||||||
    case NSLeftMouseUp:
 | 
					    case NSLeftMouseUp:
 | 
				
			||||||
    case NSRightMouseUp:
 | 
					    case NSRightMouseUp:
 | 
				
			||||||
    case NSOtherMouseUp:
 | 
					    case NSOtherMouseUp:
 | 
				
			||||||
 | 
					    case NSScrollWheel:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if ([e window] != nil) {
 | 
					        if ([e window] != nil) {
 | 
				
			||||||
            /* Pointer event has an (AppKit) window. Probably something for the kit. */
 | 
					            /* Pointer event has an (AppKit) window. Probably something for the kit. */
 | 
				
			||||||
            for_x = NO;
 | 
					            for_x = NO;
 | 
				
			||||||
| 
						 | 
					@ -466,12 +468,14 @@ QuartzModeBundleInit(void);
 | 
				
			||||||
        break;          /* for gcc */
 | 
					        break;          /* for gcc */
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (for_appkit) [super sendEvent:e];
 | 
					    if (for_appkit) {
 | 
				
			||||||
 | 
					        [super sendEvent:e];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (for_x) {
 | 
					    if (for_x) {
 | 
				
			||||||
        dispatch_async(eventTranslationQueue, ^{
 | 
					        dispatch_async(eventTranslationQueue, ^{
 | 
				
			||||||
                           [self sendX11NSEvent:e];
 | 
					            [self sendX11NSEvent:e];
 | 
				
			||||||
                       });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue