mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
hacky fix for window origin problem
This commit is contained in:
parent
f96161f01e
commit
d53dc11aae
@ -186,7 +186,7 @@ OSStatus osxGraphicsWindow::event_handler(EventHandlerCallRef myHandler, EventRe
|
|||||||
switch (the_class)
|
switch (the_class)
|
||||||
{
|
{
|
||||||
case kEventClassMouse:
|
case kEventClassMouse:
|
||||||
osxdisplay_cat.info() << "Mouse movement handled by Window handler\n";
|
// osxdisplay_cat.info() << "Mouse movement handled by Window handler\n";
|
||||||
result = handleWindowMouseEvents (myHandler, event);
|
result = handleWindowMouseEvents (myHandler, event);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -409,7 +409,7 @@ static pascal OSStatus appEvtHndlr (EventHandlerCallRef myHandler, EventRef even
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case kEventClassMouse:
|
case kEventClassMouse:
|
||||||
osxdisplay_cat.info() << "Mouse movement handled by Application handler\n";
|
// osxdisplay_cat.info() << "Mouse movement handled by Application handler\n";
|
||||||
//if(osxGraphicsWindow::FullScreenWindow != NULL)
|
//if(osxGraphicsWindow::FullScreenWindow != NULL)
|
||||||
result = osx_win->handleWindowMouseEvents (myHandler, event);
|
result = osx_win->handleWindowMouseEvents (myHandler, event);
|
||||||
//result = noErr;
|
//result = noErr;
|
||||||
@ -1626,14 +1626,12 @@ bool osxGraphicsWindow::do_reshape_request(int x_origin, int y_origin, bool has_
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For now, ignore the origin, since we seem to be getting a bogus
|
// We sometimes get a bogus origin of (0, 0). As a special hack,
|
||||||
// origin of (0, 0).
|
// treat this as a special case, and ignore it.
|
||||||
//
|
|
||||||
// We need this to be here so that changing window size places the
|
|
||||||
// window in the correct position.
|
|
||||||
|
|
||||||
if (has_origin) {
|
if (has_origin) {
|
||||||
MoveWindow(_osx_window, x_origin, y_origin, false);
|
if (x_origin != 0 || y_origin != 0) {
|
||||||
|
MoveWindow(_osx_window, x_origin, y_origin, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_properties.get_undecorated())
|
if (!_properties.get_undecorated())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user