summaryrefslogtreecommitdiff
path: root/window_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'window_main.c')
-rw-r--r--window_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/window_main.c b/window_main.c
index 41f53ad..a4e84f1 100644
--- a/window_main.c
+++ b/window_main.c
@@ -147,7 +147,7 @@ static void set_image_pixbuf() {
void on_window_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data) {
if(orig_pixbuf && (allocation->width != last_width || allocation->height != last_height)) {
- preload_clear();
+ preload_clear_sized();
set_image_pixbuf();
last_width = allocation->width;
last_height = allocation->height;
@@ -160,7 +160,7 @@ static gboolean hpane_resize_idle_func(gpointer data) {
pos = gtk_paned_get_position(GTK_PANED(data));
if(pos != hpane_last_pos) {
- preload_clear();
+ preload_clear_sized();
set_image_pixbuf();
hpane_last_pos = pos;
return TRUE; /* Ensure that we'll keep checking until we're done resizing. */
@@ -203,7 +203,7 @@ static void load_pixbuf(const gchar *filepath) {
pt = preload_get(filepath);
if(pt)
- orig_pixbuf = gdk_pixbuf_copy(pt->pb);
+ orig_pixbuf = gdk_pixbuf_copy(pt->pb_orig);
else
orig_pixbuf = NULL;
@@ -243,11 +243,11 @@ static void load_pixbuf(const gchar *filepath) {
walls_set_window_title();
}
- if(pt) {
+ if(pt && pt->pb) {
window = gtk_widget_get_window(layout);
gdk_drawable_get_size(window, &win_width, &win_height);
- set_image_pixbuf_resized(orig_pixbuf, win_width, win_height, pt->width, pt->height, pt->ratio);
+ set_image_pixbuf_resized(pt->pb, win_width, win_height, pt->width, pt->height, pt->ratio);
} else
set_image_pixbuf();
}