From 5bcd6ca8f2578b959f64d12334cb5454d840ae7d Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sat, 5 Aug 2023 16:37:38 +0200 Subject: Revert "#733 partial: Adds rotation gesture event on MacOS" This reverts commit 3049e6394a3376f7fff1c8cde19fd7bb1a9252ec as agreed upon in GitHub Issue #733. --- src/Fl_cocoa.mm | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index f461505ee..8aef33780 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -965,32 +965,6 @@ static void cocoaMagnifyHandler(NSEvent *theEvent) #endif } -/* - * Cocoa Rotate Gesture Handler - */ -static void cocoaRotateHandler(NSEvent *theEvent) -{ -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - fl_lock_function(); - Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window]; - if ( !window->shown() ) { - fl_unlock_function(); - return; - } - Fl::first_window(window); - Fl::e_dy = [theEvent rotation]*1000; - if ( Fl::e_dy) { - NSPoint pos = [theEvent locationInWindow]; - pos.y = window->h() - pos.y; - NSUInteger mods = [theEvent modifierFlags]; - mods_to_e_state( mods ); - update_e_xy_and_e_xy_root([theEvent window]); - Fl::handle( FL_ROTATE_GESTURE, window ); - } - fl_unlock_function(); -#endif -} - /* * Cocoa Mouse Button Handler */ @@ -2465,9 +2439,6 @@ static FLTextInputContext* fltextinputcontext_instance = nil; - (void)magnifyWithEvent:(NSEvent *)theEvent { cocoaMagnifyHandler(theEvent); } -- (void)rotateWithEvent:(NSEvent *)theEvent { - cocoaRotateHandler(theEvent); -} - (void)keyDown:(NSEvent *)theEvent { //NSLog(@"keyDown:%@",[theEvent characters]); fl_lock_function(); -- cgit v1.2.3