| 733 | | _win->resized(bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height); |
| 734 | | _win->getEventQueue()->windowResize(bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height, _win->getEventQueue()->getTime()); |
| | 733 | _win->adaptResize(bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height); |
| | 734 | //_win->getEventQueue()->windowResize(bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height, _win->getEventQueue()->getTime()); |
| 1107 | | |
| 1108 | | NSRect rect = NSMakeRect(x,y,width, height); |
| | 1108 | DarwinWindowingSystemInterface* wsi = dynamic_cast<DarwinWindowingSystemInterface*>(osg::GraphicsContext::getWindowingSystemInterface()); |
| | 1109 | int screenLeft(0), screenTop(0); |
| | 1110 | if (wsi) { |
| | 1111 | wsi->getScreenTopLeft((*_traits), screenLeft, screenTop); |
| | 1112 | } |
| | 1113 | |
| | 1114 | |
| | 1115 | NSRect rect = NSMakeRect(x+screenLeft,y+screenTop,width, height); |
| | 1125 | |
| | 1126 | // ---------------------------------------------------------------------------------------------------------- |
| | 1127 | // |
| | 1128 | // ---------------------------------------------------------------------------------------------------------- |
| | 1129 | |
| | 1130 | void GraphicsWindowCocoa::adaptResize(int x, int y, int w, int h) |
| | 1131 | { |
| | 1132 | |
| | 1133 | DarwinWindowingSystemInterface* wsi = dynamic_cast<DarwinWindowingSystemInterface*>(osg::GraphicsContext::getWindowingSystemInterface()); |
| | 1134 | int screenLeft(0), screenTop(0); |
| | 1135 | if (wsi) { |
| | 1136 | |
| | 1137 | // get the screen containing the window |
| | 1138 | unsigned int screenNdx = wsi->getScreenContaining(x,y,w,h); |
| | 1139 | |
| | 1140 | // update traits |
| | 1141 | _traits->screenNum = screenNdx; |
| | 1142 | |
| | 1143 | // get top left of screen |
| | 1144 | wsi->getScreenTopLeft((*_traits), screenLeft, screenTop); |
| | 1145 | } |
| | 1146 | |
| | 1147 | resized(x-screenLeft,y-screenTop,w,h); |
| | 1148 | } |