[eog] EogWindow: Make sure the window is realized after loading an image
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogWindow: Make sure the window is realized after loading an image
- Date: Sun, 10 Jun 2012 13:37:42 +0000 (UTC)
commit b52d2c1c6569d4c9106ebb4dc7218c9e1981baa9
Author: Felix Riemann <friemann gnome org>
Date: Sun Jun 10 15:34:26 2012 +0200
EogWindow: Make sure the window is realized after loading an image
Otherwise it could happen that no window is shown if the fist image
doesn't correctly emit its size-prepared signal correctly.
https://bugzilla.gnome.org/show_bug.cgi?id=669830
src/eog-window.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index b9fe113..658b5fa 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -1333,6 +1333,17 @@ eog_job_load_cb (EogJobLoad *job, gpointer data)
gtk_action_group_set_sensitive (priv->actions_image, TRUE);
+ /* Make sure the window is really realized
+ * before displaying the image. The ScrollView needs that. */
+ if (!gtk_widget_get_realized (GTK_WIDGET (window))) {
+ gint width = -1, height = -1;
+
+ eog_image_get_size (job->image, &width, &height);
+ eog_window_obtain_desired_size (job->image, width,
+ height, window);
+
+ }
+
eog_window_display_image (window, job->image);
} else {
GtkWidget *message_area;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]