File gnome-packagekit-displaysize.patch of Package gnome-packagekit

Index: gnome-packagekit-3.4.2/src/gpk-common.c
===================================================================
--- gnome-packagekit-3.4.2.orig/src/gpk-common.c
+++ gnome-packagekit-3.4.2/src/gpk-common.c
@@ -218,7 +218,7 @@ gtk_text_buffer_insert_markup (GtkTextBu
 gboolean
 gpk_window_set_size_request (GtkWindow *window, guint width, guint height)
 {
-#ifdef PK_BUILD_SMALL_FORM_FACTOR
+	/* Get screen dimensions */
 	GdkScreen *screen;
 	guint screen_w;
 	guint screen_h;
@@ -229,6 +229,7 @@ gpk_window_set_size_request (GtkWindow *
 	screen = gdk_screen_get_default ();
 	screen_w = gdk_screen_get_width (screen);
 	screen_h = gdk_screen_get_height (screen);
+#ifdef PK_BUILD_SMALL_FORM_FACTOR
 
 	/* find percentage of screen area */
 	percent_w = (width * 100) / screen_w;
@@ -249,6 +250,8 @@ gpk_window_set_size_request (GtkWindow *
 		goto out;
 #endif
 	/* normal size laptop panel */
+	if (height > screen_h * 0.9) height = screen_h * 0.9;
+	if (width > screen_w * 0.9) width = screen_w * 0.9;
 	g_debug ("using native mode: %ix%i", width, height);
 	gtk_window_set_default_size (window, width, height);
 	small_form_factor_mode = FALSE;
openSUSE Build Service is sponsored by