From 36cd79a82ffc6af4b569fa04adcf4b6a5d3e2b17 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 23 Dec 2009 20:16:19 +0000 Subject: [PATCH] Fix splash window placement on OSX --- direct/src/plugin/p3dOsxSplashWindow.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direct/src/plugin/p3dOsxSplashWindow.cxx b/direct/src/plugin/p3dOsxSplashWindow.cxx index 71a1d7ac24..5ddb52f08d 100644 --- a/direct/src/plugin/p3dOsxSplashWindow.cxx +++ b/direct/src/plugin/p3dOsxSplashWindow.cxx @@ -82,12 +82,12 @@ set_wparams(const P3DWindowParams &wparams) { r.left = _wparams.get_win_x(); // These are the same defaults used by Panda's osxGraphicsWindow. - if (r.left == -1) r.left == 10; - if (r.top == -1) r.top == 50; + if (r.left == -1) r.left = 10; + if (r.top == -1) r.top = 50; // A coordinate of -2 means to center the window on the screen. CGRect display_bounds = CGDisplayBounds(kCGDirectMainDisplay); - if (r.left == -2) r.left == 0.5 * (CGRectGetWidth(display_bounds) - _win_width); - if (r.top == -2) r.top == 0.5 * (CGRectGetHeight(display_bounds) - _win_height); + if (r.left == -2) r.left = 0.5 * (CGRectGetWidth(display_bounds) - _win_width); + if (r.top == -2) r.top = 0.5 * (CGRectGetHeight(display_bounds) - _win_height); r.right = r.left + _win_width; r.bottom = r.top + _win_height;