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 f2a677c0)
parent b00b902e
......@@ -271,8 +271,16 @@
@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];
CGFloat deltaX, deltaY, oldOriginY;
deltaX = [theEvent deltaX];
......@@ -294,6 +302,20 @@
}
[[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
......
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