-static void image_focus_paint(ImageWindow *imd, gboolean has_focus, GdkRectangle *area)
-{
- GtkWidget *widget;
-
- widget = imd->widget;
- if (!gtk_widget_get_window(widget)) return;
-
- GtkAllocation allocation;
- gtk_widget_get_allocation(widget, &allocation);
-#if !GTK_CHECK_VERSION(3,0,0)
- if (has_focus)
- {
- gtk_paint_focus(gtk_widget_get_style(widget), gtk_widget_get_window(widget), GTK_STATE_ACTIVE,
- area, widget, "image_window",
- allocation.x, allocation.y,
- allocation.width - 1, allocation.height - 1);
- }
- else
- {
- gtk_paint_shadow(gtk_widget_get_style(widget), gtk_widget_get_window(widget), GTK_STATE_NORMAL, GTK_SHADOW_IN,
- area, widget, "image_window",
- allocation.x, allocation.y,
- allocation.width - 1, allocation.height - 1);
- }
-#endif
-}
-
-static gboolean image_focus_expose(GtkWidget *widget, GdkEventExpose *event, gpointer data)
-{
- ImageWindow *imd = data;
-
-#if GTK_CHECK_VERSION(2,20,0)
- image_focus_paint(imd, gtk_widget_has_focus(widget), &event->area);
-#else
- image_focus_paint(imd, GTK_WIDGET_HAS_FOCUS(widget), &event->area);
-#endif
- return TRUE;
-}
-