better not process events early, could cause troubles later.
[blender.git] / source / blender / windowmanager / intern / wm_window.c
index 78d70c96ad6956eb5e4bcba7d2dd5d13e9cbb9c0..75325a1d9f98d44a1b0ccadf0891fd3f9a8ce46e 100644 (file)
@@ -936,6 +936,15 @@ void wm_window_get_size(wmWindow *win, int *width_r, int *height_r)
        *height_r= win->sizey;
 }
 
+/* exceptional case: - splash is called before events are processed
+ * this means we dont actually know the window size so get this from GHOST */
+void wm_window_get_size_ghost(wmWindow *win, int *width_r, int *height_r)
+{
+       GHOST_RectangleHandle bounds= GHOST_GetClientBounds(win->ghostwin);
+       *width_r= GHOST_GetWidthRectangle(bounds);
+       *height_r= GHOST_GetHeightRectangle(bounds);
+}
+
 void wm_window_set_size(wmWindow *win, int width, int height) 
 {
        GHOST_SetClientSize(win->ghostwin, width, height);