Commit 4f76089e authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

restrict splash image to screen size to guard us from insanely large

2004-12-13  Sven Neumann  <sven@gimp.org>

	* app/gui/splash.c: restrict splash image to screen size to guard us
	from insanely large splash images.
parent 44a71328
2004-12-13 Sven Neumann <sven@gimp.org>
* app/gui/splash.c: restrict splash image to screen size to guard us
from insanely large splash images.
2004-12-13 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdock.c (gimp_dock_delete_event): invert logic so
......
......@@ -72,6 +72,7 @@ splash_create (void)
GtkWidget *frame;
GtkWidget *vbox;
GdkPixbuf *pixbuf;
GdkScreen *screen;
PangoAttrList *attrs;
PangoAttribute *attr;
GdkGCValues values;
......@@ -110,9 +111,6 @@ splash_create (void)
splash = g_new0 (GimpSplash, 1);
splash->width = gdk_pixbuf_get_width (pixbuf);
splash->height = gdk_pixbuf_get_height (pixbuf);
splash->window =
g_object_new (GTK_TYPE_WINDOW,
"type", GTK_WINDOW_TOPLEVEL,
......@@ -133,6 +131,13 @@ splash_create (void)
G_CALLBACK (splash_map),
NULL);
screen = gtk_widget_get_screen (splash->window);
splash->width = MIN (gdk_pixbuf_get_width (pixbuf),
gdk_screen_get_width (screen));
splash->height = MIN (gdk_pixbuf_get_height (pixbuf),
gdk_screen_get_height (screen));
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
gtk_container_add (GTK_CONTAINER (splash->window), frame);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment