From 24321d4891224befb9e9ee666950f02b21e6f1c7 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 25 May 2013 14:08:56 +0000 Subject: Solving ancient Blender window sizing issue; - Removed grid-snapping for area coordinates on scaling windows. That caused the areas to shrink or expand, and eventually corrupt screen layouts. - Added simple but efficient life resize for OSX. I need to know why this is so much code for Windows... I suggest Windows to just copy same method; dispatch the queue, and just let the event system draw. --- intern/ghost/intern/GHOST_WindowCocoa.mm | 20 +++----------------- intern/ghost/intern/GHOST_WindowWin32.cpp | 2 +- 2 files changed, 4 insertions(+), 18 deletions(-) (limited to 'intern') diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index b8d52a2b4ff..472136b8130 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -53,17 +53,7 @@ enum { #endif #pragma mark Cocoa window delegate object -/* live resize ugly patch -extern "C" { - struct bContext; - typedef struct bContext bContext; - bContext* ghostC; - extern int wm_window_timer(const bContext *C); - extern void wm_window_process_events(const bContext *C); - extern void wm_event_do_handlers(bContext *C); - extern void wm_event_do_notifiers(bContext *C); - extern void wm_draw_update(bContext *C); -};*/ + @interface CocoaWindowDelegate : NSObject { @@ -125,14 +115,10 @@ extern "C" { #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 //} #endif - /* Live resize ugly patch. Needed because live resize runs in a modal loop, not letting main loop run + /* Live resize, send event, gets handled in wm_window.c. Needed because live resize runs in a modal loop, not letting main loop run */ if ([[notification object] inLiveResize]) { systemCocoa->dispatchEvents(); - wm_window_timer(ghostC); - wm_event_do_handlers(ghostC); - wm_event_do_notifiers(ghostC); - wm_draw_update(ghostC); - }*/ + } } - (void)windowDidChangeBackingProperties:(NSNotification *)notification diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 2d3997cdc14..78a69eb6c4f 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -887,7 +887,7 @@ GHOST_TSuccess GHOST_WindowWin32::installDrawingContext(GHOST_TDrawingContextTyp } else { m_multisampleEnabled = GHOST_kSuccess; - printf("Multisample failed to initialized\n"); + printf("Multisample failed to initialize\n"); success = GHOST_kSuccess; } } -- cgit v1.2.3