return FALSE;
}
-void ev_view_presentation_resize_cb (EvViewPresentation *pview,
- gpointer data)
+static void
+ev_view_presentation_resize_cb (EvViewPresentation *pview,
+ gpointer data)
{
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET(pview));
GdkRectangle monitor;
monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (GTK_WIDGET(pview)));
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
- g_printf("%d %d\n",monitor.width,monitor.height);
- }
+ if(!(pview->monitor_width == monitor.width)||!(pview->monitor_height = monitor.height)) {
+ pview->monitor_width = monitor.width;
+ pview->monitor_height = monitor.height;
+
+ pview->scale = 0;
+ ev_view_presentation_reset_jobs (pview);
+ ev_view_presentation_update_current_page (pview, pview->current_page);
+ }
+}
static gboolean
init_presentation (GtkWidget *widget)
GdkRectangle monitor;
gint monitor_num;
- g_signal_connect_swapped(G_OBJECT(screen), "size-changed",
- G_CALLBACK(ev_view_presentation_resize_cb),G_OBJECT(pview));
-
+ g_signal_connect_swapped(G_OBJECT(widget), "size-allocate",
+ G_CALLBACK(ev_view_presentation_resize_cb),G_OBJECT(pview));
monitor_num = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget));
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);