diff --git a/panda/src/osxdisplay/osxGraphicsWindow.mm b/panda/src/osxdisplay/osxGraphicsWindow.mm index c8a3b4f87f..243e3a2e5d 100644 --- a/panda/src/osxdisplay/osxGraphicsWindow.mm +++ b/panda/src/osxdisplay/osxGraphicsWindow.mm @@ -391,8 +391,10 @@ window_event_handler(EventHandlerCallRef my_handler, EventRef event, void *) { //////////////////////////////////////////////////////////////////// void osxGraphicsWindow:: do_resize() { - osxdisplay_cat.info() - << "In Resize....." << _properties << "\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "In Resize....." << _properties << "\n"; + } // only in window mode .. not full screen if (_osx_window != NULL && !_is_fullscreen && _properties.has_size()) { @@ -422,8 +424,10 @@ do_resize() { // ping gl aglUpdateContext(aglGetCurrentContext()); report_agl_error("aglUpdateContext .. This is a Resize.."); - osxdisplay_cat.info() - << "Resize Complete.....\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "Resize Complete.....\n"; + } } } @@ -1072,8 +1076,10 @@ os_open_window(WindowProperties &req_properties) { } if (req_properties.has_fullscreen() && req_properties.get_fullscreen()) { - osxdisplay_cat.info() - << "Creating full screen\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "Creating full screen\n"; + } // capture the main display CGDisplayCapture(kCGDirectMainDisplay); @@ -1132,21 +1138,27 @@ os_open_window(WindowProperties &req_properties) { } if (req_properties.has_parent_window()) { - osxdisplay_cat.info() - << "Creating child window\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "Creating child window\n"; + } CreateNewWindow(kSimpleWindowClass, kWindowNoAttributes, &r, &_osx_window); add_a_window(_osx_window); _properties.set_fixed_size(true); - osxdisplay_cat.info() - << "Child window created\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "Child window created\n"; + } } else { if (req_properties.has_undecorated() && req_properties.get_undecorated()) { // create a unmovable .. no edge window.. - osxdisplay_cat.info() - << "Creating undecorated window\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "Creating undecorated window\n"; + } CreateNewWindow(kDocumentWindowClass, kWindowStandardDocumentAttributes | kWindowNoTitleBarAttribute, &r, &_osx_window); } else { @@ -1162,8 +1174,10 @@ os_open_window(WindowProperties &req_properties) { r.top = max(r.top, bounds.top); r.bottom = min(r.bottom, bounds.bottom); - osxdisplay_cat.info() - << "Creating standard window\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "Creating standard window\n"; + } CreateNewWindow(kDocumentWindowClass, kWindowStandardDocumentAttributes | kWindowStandardHandlerAttribute, &r, &_osx_window); add_a_window(_osx_window); } @@ -1212,8 +1226,10 @@ os_open_window(WindowProperties &req_properties) { req_properties.clear_parent_window(); } - osxdisplay_cat.info() - << "Event handler installed, now build_gl\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "Event handler installed, now build_gl\n"; + } if (build_gl(false) != noErr) { osxdisplay_cat.error() << "Error in build_gl\n"; @@ -1225,8 +1241,10 @@ os_open_window(WindowProperties &req_properties) { return false; } - osxdisplay_cat.info() - << "build_gl complete, set properties\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "build_gl complete, set properties\n"; + } // // attach the holder context to the window.. @@ -1762,8 +1780,10 @@ move_pointer(int device, int x, int y) { bool osxGraphicsWindow:: do_reshape_request(int x_origin, int y_origin, bool has_origin, int x_size, int y_size) { - osxdisplay_cat.info() - << "Do Reshape\n"; + if (osxdisplay_cat.is_debug()) { + osxdisplay_cat.debug() + << "Do Reshape\n"; + } if (_properties.get_fullscreen()) { return false;