From 175b951440d4effbeda9e8a1a6096c2259dc7834 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 30 Sep 2009 23:05:54 +0000 Subject: [PATCH] comment out osx parent_window: it's broken anyway --- panda/src/osxdisplay/osxGraphicsWindow.mm | 18 +++++++++++------- panda/src/tinydisplay/tinyOsxGraphicsWindow.mm | 15 +++++++++------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/panda/src/osxdisplay/osxGraphicsWindow.mm b/panda/src/osxdisplay/osxGraphicsWindow.mm index d5b7008f65..70685cf90c 100644 --- a/panda/src/osxdisplay/osxGraphicsWindow.mm +++ b/panda/src/osxdisplay/osxGraphicsWindow.mm @@ -1142,7 +1142,8 @@ os_open_window(WindowProperties &req_properties) { r.right = r.left + 512; r.bottom = r.top + 512; } - + + /* if (req_properties.has_parent_window()) { if (osxdisplay_cat.is_debug()) { osxdisplay_cat.debug() @@ -1157,7 +1158,8 @@ os_open_window(WindowProperties &req_properties) { osxdisplay_cat.debug() << "Child window created\n"; } - } else { + } else */ + { if (req_properties.has_undecorated() && req_properties.get_undecorated()) { // create a unmovable .. no edge window.. @@ -1210,9 +1212,9 @@ os_open_window(WindowProperties &req_properties) { gWinEvtHandler = NewEventHandlerUPP(window_event_handler); InstallWindowEventHandler(_osx_window, gWinEvtHandler, GetEventTypeCount(list), list, (void*)this, NULL); // add event handler - if(!req_properties.has_parent_window()) { + /*if(!req_properties.has_parent_window())*/ { ShowWindow (_osx_window); - } else { + } /*else { NSWindow *parentWindow = (NSWindow *)req_properties.get_parent_window(); // NSView* aView = [[parentWindow contentView] viewWithTag:378]; // NSRect aRect = [aView frame]; @@ -1230,7 +1232,7 @@ os_open_window(WindowProperties &req_properties) { _properties.set_parent_window(req_properties.get_parent_window()); req_properties.clear_parent_window(); - } + } */ if (osxdisplay_cat.is_debug()) { osxdisplay_cat.debug() @@ -1309,7 +1311,7 @@ process_events() { EventRef theEvent; EventTargetRef theTarget = GetEventDispatcherTarget(); - if (!_properties.has_parent_window()) { + /*if (!_properties.has_parent_window()) */ { while (ReceiveNextEvent(0, NULL, kEventDurationNoWait, true, &theEvent)== noErr) { SendEventToEventTarget (theEvent, theTarget); ReleaseEvent(theEvent); @@ -1795,6 +1797,7 @@ do_reshape_request(int x_origin, int y_origin, bool has_origin, return false; } + /* if (_properties.has_parent_window()) { if (has_origin) { NSWindow* parentWindow = (NSWindow *)_properties.get_parent_window(); @@ -1802,7 +1805,8 @@ do_reshape_request(int x_origin, int y_origin, bool has_origin, MoveWindow(_osx_window, x_origin+parentFrame.origin.x, y_origin+parentFrame.origin.y, false); } - } else { + } else */ + { // We sometimes get a bogus origin of (0, 0). As a special hack, // treat this as a special case, and ignore it. if (has_origin) { diff --git a/panda/src/tinydisplay/tinyOsxGraphicsWindow.mm b/panda/src/tinydisplay/tinyOsxGraphicsWindow.mm index 336ecc8ff0..7cba5a009d 100644 --- a/panda/src/tinydisplay/tinyOsxGraphicsWindow.mm +++ b/panda/src/tinydisplay/tinyOsxGraphicsWindow.mm @@ -945,7 +945,8 @@ bool TinyOsxGraphicsWindow::OSOpenWindow(WindowProperties &req_properties) r.right = r.left + 512; r.bottom = r.top + 512; } - + + /* if (req_properties.has_parent_window()) { tinydisplay_cat.info() << "Creating child window\n"; @@ -956,7 +957,7 @@ bool TinyOsxGraphicsWindow::OSOpenWindow(WindowProperties &req_properties) _properties.set_fixed_size(true); tinydisplay_cat.info() << "Child window created\n"; } - else + else */ { if (req_properties.has_undecorated() && req_properties.get_undecorated()) { // create a unmovable .. no edge window.. @@ -1008,10 +1009,11 @@ bool TinyOsxGraphicsWindow::OSOpenWindow(WindowProperties &req_properties) gWinEvtHandler = NewEventHandlerUPP(windowEvtHndlr); InstallWindowEventHandler(_osx_window, gWinEvtHandler, GetEventTypeCount(list), list, (void*)this, NULL); // add event handler - if(!req_properties.has_parent_window()) + /*if(!req_properties.has_parent_window()) */ { ShowWindow (_osx_window); } + /* else { @@ -1036,7 +1038,7 @@ bool TinyOsxGraphicsWindow::OSOpenWindow(WindowProperties &req_properties) _properties.set_parent_window(req_properties.get_parent_window()); req_properties.clear_parent_window(); - } + } */ if (req_properties.has_fullscreen()) { @@ -1090,7 +1092,7 @@ void TinyOsxGraphicsWindow::process_events() EventRef theEvent; EventTargetRef theTarget = GetEventDispatcherTarget(); - if (!_properties.has_parent_window()) + /*if (!_properties.has_parent_window())*/ { while (ReceiveNextEvent(0, NULL, kEventDurationNoWait, true, &theEvent)== noErr) { @@ -1582,6 +1584,7 @@ bool TinyOsxGraphicsWindow::do_reshape_request(int x_origin, int y_origin, bool return false; } + /* if (_properties.has_parent_window()) { if (has_origin) @@ -1592,7 +1595,7 @@ bool TinyOsxGraphicsWindow::do_reshape_request(int x_origin, int y_origin, bool MoveWindow(_osx_window, x_origin+parentFrame.origin.x, y_origin+parentFrame.origin.y, false); } } - else + else*/ { // We sometimes get a bogus origin of (0, 0). As a special hack, // treat this as a special case, and ignore it.