using the array from [NSView -getRectsBeingDrawn:count:]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26764
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#import <AppKit/NSScrollView.h>
#import <AppKit/NSColor.h>
#import <AppKit/NSClipView.h>
#import <AppKit/NSScrollView.h>
#import <AppKit/NSColor.h>
#import <AppKit/NSClipView.h>
+#import <Foundation/NSException.h>
+
+#include <objc/objc-runtime.h>
// Turn this on to paint green over the dummy views for debugging
#undef WXCOCOA_FILL_DUMMY_VIEW
// Turn this on to paint green over the dummy views for debugging
#undef WXCOCOA_FILL_DUMMY_VIEW
wxLogDebug(wxT("Paint event recursion!"));
return false;
}
wxLogDebug(wxT("Paint event recursion!"));
return false;
}
- //FIXME: should probably turn that rect into the update region
+
+ // Set m_updateRegion
+ const NSRect *rects = ▭ // The bounding box of the region
+ int countRects = 1;
+ // Try replacing the larger rectangle with a list of smaller ones:
+NS_DURING
+ // This only works on Panther
+// [GetNSView() getRectsBeingDrawn:&rects count:&countRects];
+ // This compiles everywhere (and still only works on Panther)
+ objc_msgSend(GetNSView(),@selector(getRectsBeingDrawn:count:),&rects,&countRects);
+NS_HANDLER
+NS_ENDHANDLER
+ m_updateRegion = wxRegion(rects,countRects);
+
wxPaintEvent event(m_windowId);
event.SetEventObject(this);
bool ret = GetEventHandler()->ProcessEvent(event);
wxPaintEvent event(m_windowId);
event.SetEventObject(this);
bool ret = GetEventHandler()->ProcessEvent(event);