소스 검색

Explicitly resizing window does not trigger event on OS X; do it ourselves

Ed Swartz 10 년 전
부모
커밋
8746fd2252
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      panda/src/cocoadisplay/cocoaGraphicsWindow.mm

+ 5 - 0
panda/src/cocoadisplay/cocoaGraphicsWindow.mm

@@ -807,6 +807,11 @@ set_properties_now(WindowProperties &properties) {
       cocoadisplay_cat.debug()
         << "Setting size to " << width << ", " << height << "\n";
 
+      // Cocoa doesn't send an event, and the other
+      // resize-window handlers will do nothing once the properties
+      // have been changed, so do this now
+      set_size_and_recalc(width, height);
+
       _context_needs_update = true;
       properties.clear_size();