Commit 1aa6fdb6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: re-write the resize control used in the black window style to use the...

macosx: re-write the resize control used in the black window style to use the MouseDown event instead of the MouseDragged event which is ignored on Leopard (should fix #5822)
(cherry picked from commit f2a677c05602a0f7cf3fd31d93491126ad8fcd8f)
parent b00b902e
...@@ -271,8 +271,16 @@ ...@@ -271,8 +271,16 @@
@implementation VLCResizeControl @implementation VLCResizeControl
- (void)mouseDragged:(NSEvent *)theEvent - (void)mouseDown:(NSEvent *)theEvent {
{ BOOL keepOn = YES;
while (keepOn) {
theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask |
NSLeftMouseDraggedMask];
switch ([theEvent type]) {
case NSLeftMouseDragged:
{
NSRect windowFrame = [[self window] frame]; NSRect windowFrame = [[self window] frame];
CGFloat deltaX, deltaY, oldOriginY; CGFloat deltaX, deltaY, oldOriginY;
deltaX = [theEvent deltaX]; deltaX = [theEvent deltaX];
...@@ -294,6 +302,20 @@ ...@@ -294,6 +302,20 @@
} }
[[self window] setFrame: windowFrame display: YES animate: NO]; [[self window] setFrame: windowFrame display: YES animate: NO];
break;
}
break;
case NSLeftMouseUp:
keepOn = NO;
break;
default:
/* Ignore any other kind of event. */
break;
}
};
return;
} }
@end @end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment