diff --git a/panda/src/cocoadisplay/cocoaGraphicsWindow.mm b/panda/src/cocoadisplay/cocoaGraphicsWindow.mm index efe9849ff5..3c3a933e51 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsWindow.mm +++ b/panda/src/cocoadisplay/cocoaGraphicsWindow.mm @@ -798,16 +798,20 @@ set_properties_now(WindowProperties &properties) { int height = properties.get_y_size(); if (!_properties.get_fullscreen()) { - _properties.set_size(width, height); if (_window != nil) { [_window setContentSize:NSMakeSize(width, height)]; } [_view setFrameSize:NSMakeSize(width, height)]; - cocoadisplay_cat.debug() - << "Setting size to " << width << ", " << height << "\n"; + if (cocoadisplay_cat.is_debug()) { + cocoadisplay_cat.debug() + << "Setting size to " << width << ", " << height << "\n"; + } - _context_needs_update = true; + // 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 + handle_resize_event(); properties.clear_size(); } else { diff --git a/panda/src/cocoadisplay/cocoaPandaView.mm b/panda/src/cocoadisplay/cocoaPandaView.mm index bb7d03c832..c624f0cdb6 100644 --- a/panda/src/cocoadisplay/cocoaPandaView.mm +++ b/panda/src/cocoadisplay/cocoaPandaView.mm @@ -45,8 +45,10 @@ - (void) drawRect:(NSRect)dirtyRect { // Do nothing. We draw from another thread. - cocoadisplay_cat.spam() - << "drawRect was called.\n"; + if (cocoadisplay_cat.is_spam()) { + cocoadisplay_cat.spam() + << "drawRect was called.\n"; + } } - (void) finalize {