X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=driver%2Fsplash.c;h=fabd8824d0a15828d9d1f82acf8d19bafdc548be;hp=8f6fb011249ad9fd72dee71aeaf4b896ac051cd9;hb=278c59e14c53fd412b734e699bd4f314f766f804;hpb=551b3de3f619c04c2dd1971ee9b3f02e270c28c9 diff --git a/driver/splash.c b/driver/splash.c index 8f6fb011..fabd8824 100644 --- a/driver/splash.c +++ b/driver/splash.c @@ -343,13 +343,13 @@ make_splash_dialog (saver_info *si) attrs.event_mask = (ExposureMask | ButtonPressMask | ButtonReleaseMask); { - Dimension w = WidthOfScreen(screen); - Dimension h = HeightOfScreen(screen); + int sx, sy, w, h; + get_screen_viewport (si->default_screen, &sx, &sy, &w, &h, False); if (si->prefs.debug_p) w /= 2; - x = ((w + sp->width) / 2) - sp->width; - y = ((h + sp->height) / 2) - sp->height; - if (x < 0) x = 0; - if (y < 0) y = 0; + x = sx + (((w + sp->width) / 2) - sp->width); + y = sy + (((h + sp->height) / 2) - sp->height); + if (x < sx) x = sx; + if (y < sy) y = sy; } bw = get_integer_resource ("splash.borderWidth", "Dialog.BorderWidth");