Temporarily disabled IdleRender code whilst working on a more centralised

Thu Oct  1 12:44:19 BST 1998 Adam D. Moss <adam@gimp.org>

	* app/floating_sel.c app/gdisplay.c app/gdisplay.h
	app/gimpimage.c app/layers_dialog.c app/undo.c:
	Temporarily disabled IdleRender code whilst working
	on a more centralised approach.
This commit is contained in:
BST 1998 Adam D. Moss 1998-10-01 11:53:20 +00:00 committed by Adam D. Moss
parent 7ecb8b4587
commit 769bfa6ecd
21 changed files with 227 additions and 106 deletions

View file

@ -1,3 +1,10 @@
Thu Oct 1 12:44:19 BST 1998 Adam D. Moss <adam@gimp.org>
* app/floating_sel.c app/gdisplay.c app/gdisplay.h
app/gimpimage.c app/layers_dialog.c app/undo.c:
Temporarily disabled IdleRender code whilst working
on a more centralised approach.
Wed Sep 30 10:48:00 CST 1998 Seth Burgess <sjburges@ou.edu>
* gimp_tips.txt: Ran it through ispell

View file

@ -2104,7 +2104,6 @@ gimp_image_add_layer (GimpImage *gimage, Layer *float_layer, int position)
gimp_image_set_active_layer (gimage, float_layer);
/* update the new layer's area */
printf(" gimp_image_add_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(float_layer), 0, 0, drawable_width (GIMP_DRAWABLE(float_layer)), drawable_height (GIMP_DRAWABLE(float_layer)));
/* invalidate the composite preview */

View file

@ -2104,7 +2104,6 @@ gimp_image_add_layer (GimpImage *gimage, Layer *float_layer, int position)
gimp_image_set_active_layer (gimage, float_layer);
/* update the new layer's area */
printf(" gimp_image_add_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(float_layer), 0, 0, drawable_width (GIMP_DRAWABLE(float_layer)), drawable_height (GIMP_DRAWABLE(float_layer)));
/* invalidate the composite preview */

View file

@ -2104,7 +2104,6 @@ gimp_image_add_layer (GimpImage *gimage, Layer *float_layer, int position)
gimp_image_set_active_layer (gimage, float_layer);
/* update the new layer's area */
printf(" gimp_image_add_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(float_layer), 0, 0, drawable_width (GIMP_DRAWABLE(float_layer)), drawable_height (GIMP_DRAWABLE(float_layer)));
/* invalidate the composite preview */

View file

@ -2104,7 +2104,6 @@ gimp_image_add_layer (GimpImage *gimage, Layer *float_layer, int position)
gimp_image_set_active_layer (gimage, float_layer);
/* update the new layer's area */
printf(" gimp_image_add_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(float_layer), 0, 0, drawable_width (GIMP_DRAWABLE(float_layer)), drawable_height (GIMP_DRAWABLE(float_layer)));
/* invalidate the composite preview */

View file

@ -2104,7 +2104,6 @@ gimp_image_add_layer (GimpImage *gimage, Layer *float_layer, int position)
gimp_image_set_active_layer (gimage, float_layer);
/* update the new layer's area */
printf(" gimp_image_add_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(float_layer), 0, 0, drawable_width (GIMP_DRAWABLE(float_layer)), drawable_height (GIMP_DRAWABLE(float_layer)));
/* invalidate the composite preview */

View file

@ -1089,8 +1089,7 @@ undo_push_layer (GImage *gimage,
}
}
#include <stdio.h>
#warning AIE
int
undo_pop_layer (GImage *gimage,
int state,
@ -1134,9 +1133,9 @@ undo_pop_layer (GImage *gimage,
floating_sel_reset (lu->layer);
}
printf (" undo_pop1 ");fflush(stdout);
/* drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);*/
reinit_layer_idlerender (gimage, lu->layer);
/*printf (" undo_pop1 ");fflush(stdout);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);
/*reinit_layer_idlerender (gimage, lu->layer);*/
}
/* restore layer */
else
@ -1157,9 +1156,9 @@ undo_pop_layer (GImage *gimage,
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, lu->layer);
gimage->active_layer = lu->layer;
printf (" undo_pop2 ");fflush(stdout);
/*drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);*/
reinit_layer_idlerender (gimage, lu->layer);
/*printf (" undo_pop2 ");fflush(stdout);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);
/*reinit_layer_idlerender (gimage, lu->layer);*/
}
return TRUE;

View file

@ -2104,7 +2104,6 @@ gimp_image_add_layer (GimpImage *gimage, Layer *float_layer, int position)
gimp_image_set_active_layer (gimage, float_layer);
/* update the new layer's area */
printf(" gimp_image_add_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(float_layer), 0, 0, drawable_width (GIMP_DRAWABLE(float_layer)), drawable_height (GIMP_DRAWABLE(float_layer)));
/* invalidate the composite preview */

View file

@ -212,12 +212,12 @@ floating_sel_to_layer (Layer *layer)
*/
printf(" floating_sel_to_layer ");fflush(stdout);
/*
drawable_update (GIMP_DRAWABLE(layer), 0, 0,
GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
*/
/* This may be undesirable when invoked non-interactively... we'll see. */
reinit_layer_idlerender (gimage, layer);
/*reinit_layer_idlerender (gimage, layer);*/
}
void

View file

@ -2104,7 +2104,6 @@ gimp_image_add_layer (GimpImage *gimage, Layer *float_layer, int position)
gimp_image_set_active_layer (gimage, float_layer);
/* update the new layer's area */
printf(" gimp_image_add_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(float_layer), 0, 0, drawable_width (GIMP_DRAWABLE(float_layer)), drawable_height (GIMP_DRAWABLE(float_layer)));
/* invalidate the composite preview */

View file

@ -54,16 +54,6 @@
GSList * display_list = NULL;
static int display_num = 1;
static GdkCursorType default_gdisplay_cursor = GDK_TOP_LEFT_ARROW;
static GimpImage* idlerender_gimage;
static int idlerender_width;
static int idlerender_height;
static int idlerender_x;
static int idlerender_y;
static int idlerender_basex;
static int idlerender_basey;
static guint idlerender_idleid = 0;
static guint idlerender_handlerid = 0;
static gboolean idle_active = 0;
/* Local functions */
static void gdisplay_format_title (GimpImage *, char *);
@ -252,6 +242,10 @@ gdisplay_free_area_list (GSList *list)
}
/*
* As far as I can tell, this function takes a GArea and unifies it with
* an existing list of GAreas, trying to avoid overdraw. [adam]
*/
static GSList *
gdisplay_process_area_list (GSList *list,
GArea *ga1)
@ -300,7 +294,9 @@ gdisplay_flush (GDisplay *gdisp)
GArea *ga;
GSList *list;
/* Flush the items in the displays and updates lists--
printf(" FLUSH! ");fflush(stdout);
/* Flush the items in the displays and updates lists -
* but only if gdisplay has been mapped and exposed
*/
if (!gdisp->select)
@ -312,8 +308,21 @@ gdisplay_flush (GDisplay *gdisp)
{
/* Paint the area specified by the GArea */
ga = (GArea *) list->data;
gdisplay_paint_area (gdisp, ga->x1, ga->y1,
(ga->x2 - ga->x1), (ga->y2 - ga->y1));
if ((ga->x1 != ga->x2) && (ga->y1 != ga->y2))
{
gdisplay_paint_area (gdisp, ga->x1, ga->y1,
(ga->x2 - ga->x1), (ga->y2 - ga->y1));
/*gdisplay_paint_area (gdisp, ga->x1+random()%(ga->x2 - ga->x1),
ga->y1+random()%(ga->y2 - ga->y1),
100,100);
gdisplay_paint_area (gdisp, ga->x1+random()%(ga->x2 - ga->x1),
ga->y1+random()%(ga->y2 - ga->y1),
100,100);
gdisplay_paint_area (gdisp, ga->x1+random()%(ga->x2 - ga->x1),
ga->y1+random()%(ga->y2 - ga->y1),
100,100);*/
}
list = g_slist_next (list);
}
@ -1534,7 +1543,10 @@ gdisplays_flush ()
/* this prevents multiple recursive calls to this procedure */
if (flushing == TRUE)
return;
{
g_warning ("gdisplays_flush() called recursively.");
return;
}
flushing = TRUE;
@ -1560,7 +1572,7 @@ gdisplay_hash (GDisplay *display)
}
#if 0
static void
idlerender_gimage_destroy_handler (GimpImage *gimage)
{
@ -1755,3 +1767,5 @@ reinit_gimage_idlerender (GimpImage* gimage)
{
unify_and_start_idlerender (gimage, 0, 0, gimage->width, gimage->height);
}
#endif

View file

@ -40,6 +40,22 @@
/* #define HIGHPASS(x,y) ((x>y) ? y : x) */ /* unused - == MIN */
typedef struct _IdleRenderStruct
{
GimpImage* gimage;
int width;
int height;
int x;
int y;
int basex;
int basey;
guint idleid;
guint handlerid;
gboolean active;
} IdleRenderStruct;
struct _GDisplay
{
int ID; /* unique identifier for this gdisplay */
@ -50,7 +66,7 @@ struct _GDisplay
GtkWidget *hrule, *vrule; /* widgets for rulers */
GtkWidget *origin; /* widgets for rulers */
GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cursor_label; /* widget for cursor position */
@ -81,18 +97,20 @@ struct _GDisplay
Selection *select; /* Selection object */
GdkGC *scroll_gc; /* GC for scrolling */
GdkGC *scroll_gc; /* GC for scrolling */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
GdkCursorType current_cursor; /* Currently installed cursor */
short draw_cursor; /* should we draw software cursor ? */
int cursor_x; /* software cursor X value */
int cursor_y; /* software cursor Y value */
short proximity; /* is a device in proximity of gdisplay ? */
short have_cursor; /* is cursor currently drawn ? */
short draw_cursor; /* should we draw software cursor ? */
int cursor_x; /* software cursor X value */
int cursor_y; /* software cursor Y value */
short proximity; /* is a device in proximity of gdisplay ? */
short have_cursor; /* is cursor currently drawn ? */
IdleRenderStruct idle_render; /* state of this gdisplay's render thread */
};

View file

@ -54,16 +54,6 @@
GSList * display_list = NULL;
static int display_num = 1;
static GdkCursorType default_gdisplay_cursor = GDK_TOP_LEFT_ARROW;
static GimpImage* idlerender_gimage;
static int idlerender_width;
static int idlerender_height;
static int idlerender_x;
static int idlerender_y;
static int idlerender_basex;
static int idlerender_basey;
static guint idlerender_idleid = 0;
static guint idlerender_handlerid = 0;
static gboolean idle_active = 0;
/* Local functions */
static void gdisplay_format_title (GimpImage *, char *);
@ -252,6 +242,10 @@ gdisplay_free_area_list (GSList *list)
}
/*
* As far as I can tell, this function takes a GArea and unifies it with
* an existing list of GAreas, trying to avoid overdraw. [adam]
*/
static GSList *
gdisplay_process_area_list (GSList *list,
GArea *ga1)
@ -300,7 +294,9 @@ gdisplay_flush (GDisplay *gdisp)
GArea *ga;
GSList *list;
/* Flush the items in the displays and updates lists--
printf(" FLUSH! ");fflush(stdout);
/* Flush the items in the displays and updates lists -
* but only if gdisplay has been mapped and exposed
*/
if (!gdisp->select)
@ -312,8 +308,21 @@ gdisplay_flush (GDisplay *gdisp)
{
/* Paint the area specified by the GArea */
ga = (GArea *) list->data;
gdisplay_paint_area (gdisp, ga->x1, ga->y1,
(ga->x2 - ga->x1), (ga->y2 - ga->y1));
if ((ga->x1 != ga->x2) && (ga->y1 != ga->y2))
{
gdisplay_paint_area (gdisp, ga->x1, ga->y1,
(ga->x2 - ga->x1), (ga->y2 - ga->y1));
/*gdisplay_paint_area (gdisp, ga->x1+random()%(ga->x2 - ga->x1),
ga->y1+random()%(ga->y2 - ga->y1),
100,100);
gdisplay_paint_area (gdisp, ga->x1+random()%(ga->x2 - ga->x1),
ga->y1+random()%(ga->y2 - ga->y1),
100,100);
gdisplay_paint_area (gdisp, ga->x1+random()%(ga->x2 - ga->x1),
ga->y1+random()%(ga->y2 - ga->y1),
100,100);*/
}
list = g_slist_next (list);
}
@ -1534,7 +1543,10 @@ gdisplays_flush ()
/* this prevents multiple recursive calls to this procedure */
if (flushing == TRUE)
return;
{
g_warning ("gdisplays_flush() called recursively.");
return;
}
flushing = TRUE;
@ -1560,7 +1572,7 @@ gdisplay_hash (GDisplay *display)
}
#if 0
static void
idlerender_gimage_destroy_handler (GimpImage *gimage)
{
@ -1755,3 +1767,5 @@ reinit_gimage_idlerender (GimpImage* gimage)
{
unify_and_start_idlerender (gimage, 0, 0, gimage->width, gimage->height);
}
#endif

View file

@ -40,6 +40,22 @@
/* #define HIGHPASS(x,y) ((x>y) ? y : x) */ /* unused - == MIN */
typedef struct _IdleRenderStruct
{
GimpImage* gimage;
int width;
int height;
int x;
int y;
int basex;
int basey;
guint idleid;
guint handlerid;
gboolean active;
} IdleRenderStruct;
struct _GDisplay
{
int ID; /* unique identifier for this gdisplay */
@ -50,7 +66,7 @@ struct _GDisplay
GtkWidget *hrule, *vrule; /* widgets for rulers */
GtkWidget *origin; /* widgets for rulers */
GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cursor_label; /* widget for cursor position */
@ -81,18 +97,20 @@ struct _GDisplay
Selection *select; /* Selection object */
GdkGC *scroll_gc; /* GC for scrolling */
GdkGC *scroll_gc; /* GC for scrolling */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
GdkCursorType current_cursor; /* Currently installed cursor */
short draw_cursor; /* should we draw software cursor ? */
int cursor_x; /* software cursor X value */
int cursor_y; /* software cursor Y value */
short proximity; /* is a device in proximity of gdisplay ? */
short have_cursor; /* is cursor currently drawn ? */
short draw_cursor; /* should we draw software cursor ? */
int cursor_x; /* software cursor X value */
int cursor_y; /* software cursor Y value */
short proximity; /* is a device in proximity of gdisplay ? */
short have_cursor; /* is cursor currently drawn ? */
IdleRenderStruct idle_render; /* state of this gdisplay's render thread */
};

View file

@ -212,12 +212,12 @@ floating_sel_to_layer (Layer *layer)
*/
printf(" floating_sel_to_layer ");fflush(stdout);
/*
drawable_update (GIMP_DRAWABLE(layer), 0, 0,
GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
*/
/* This may be undesirable when invoked non-interactively... we'll see. */
reinit_layer_idlerender (gimage, layer);
/*reinit_layer_idlerender (gimage, layer);*/
}
void

View file

@ -54,16 +54,6 @@
GSList * display_list = NULL;
static int display_num = 1;
static GdkCursorType default_gdisplay_cursor = GDK_TOP_LEFT_ARROW;
static GimpImage* idlerender_gimage;
static int idlerender_width;
static int idlerender_height;
static int idlerender_x;
static int idlerender_y;
static int idlerender_basex;
static int idlerender_basey;
static guint idlerender_idleid = 0;
static guint idlerender_handlerid = 0;
static gboolean idle_active = 0;
/* Local functions */
static void gdisplay_format_title (GimpImage *, char *);
@ -252,6 +242,10 @@ gdisplay_free_area_list (GSList *list)
}
/*
* As far as I can tell, this function takes a GArea and unifies it with
* an existing list of GAreas, trying to avoid overdraw. [adam]
*/
static GSList *
gdisplay_process_area_list (GSList *list,
GArea *ga1)
@ -300,7 +294,9 @@ gdisplay_flush (GDisplay *gdisp)
GArea *ga;
GSList *list;
/* Flush the items in the displays and updates lists--
printf(" FLUSH! ");fflush(stdout);
/* Flush the items in the displays and updates lists -
* but only if gdisplay has been mapped and exposed
*/
if (!gdisp->select)
@ -312,8 +308,21 @@ gdisplay_flush (GDisplay *gdisp)
{
/* Paint the area specified by the GArea */
ga = (GArea *) list->data;
gdisplay_paint_area (gdisp, ga->x1, ga->y1,
(ga->x2 - ga->x1), (ga->y2 - ga->y1));
if ((ga->x1 != ga->x2) && (ga->y1 != ga->y2))
{
gdisplay_paint_area (gdisp, ga->x1, ga->y1,
(ga->x2 - ga->x1), (ga->y2 - ga->y1));
/*gdisplay_paint_area (gdisp, ga->x1+random()%(ga->x2 - ga->x1),
ga->y1+random()%(ga->y2 - ga->y1),
100,100);
gdisplay_paint_area (gdisp, ga->x1+random()%(ga->x2 - ga->x1),
ga->y1+random()%(ga->y2 - ga->y1),
100,100);
gdisplay_paint_area (gdisp, ga->x1+random()%(ga->x2 - ga->x1),
ga->y1+random()%(ga->y2 - ga->y1),
100,100);*/
}
list = g_slist_next (list);
}
@ -1534,7 +1543,10 @@ gdisplays_flush ()
/* this prevents multiple recursive calls to this procedure */
if (flushing == TRUE)
return;
{
g_warning ("gdisplays_flush() called recursively.");
return;
}
flushing = TRUE;
@ -1560,7 +1572,7 @@ gdisplay_hash (GDisplay *display)
}
#if 0
static void
idlerender_gimage_destroy_handler (GimpImage *gimage)
{
@ -1755,3 +1767,5 @@ reinit_gimage_idlerender (GimpImage* gimage)
{
unify_and_start_idlerender (gimage, 0, 0, gimage->width, gimage->height);
}
#endif

View file

@ -40,6 +40,22 @@
/* #define HIGHPASS(x,y) ((x>y) ? y : x) */ /* unused - == MIN */
typedef struct _IdleRenderStruct
{
GimpImage* gimage;
int width;
int height;
int x;
int y;
int basex;
int basey;
guint idleid;
guint handlerid;
gboolean active;
} IdleRenderStruct;
struct _GDisplay
{
int ID; /* unique identifier for this gdisplay */
@ -50,7 +66,7 @@ struct _GDisplay
GtkWidget *hrule, *vrule; /* widgets for rulers */
GtkWidget *origin; /* widgets for rulers */
GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cursor_label; /* widget for cursor position */
@ -81,18 +97,20 @@ struct _GDisplay
Selection *select; /* Selection object */
GdkGC *scroll_gc; /* GC for scrolling */
GdkGC *scroll_gc; /* GC for scrolling */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
GdkCursorType current_cursor; /* Currently installed cursor */
short draw_cursor; /* should we draw software cursor ? */
int cursor_x; /* software cursor X value */
int cursor_y; /* software cursor Y value */
short proximity; /* is a device in proximity of gdisplay ? */
short have_cursor; /* is cursor currently drawn ? */
short draw_cursor; /* should we draw software cursor ? */
int cursor_x; /* software cursor X value */
int cursor_y; /* software cursor Y value */
short proximity; /* is a device in proximity of gdisplay ? */
short have_cursor; /* is cursor currently drawn ? */
IdleRenderStruct idle_render; /* state of this gdisplay's render thread */
};

View file

@ -2104,7 +2104,6 @@ gimp_image_add_layer (GimpImage *gimage, Layer *float_layer, int position)
gimp_image_set_active_layer (gimage, float_layer);
/* update the new layer's area */
printf(" gimp_image_add_layer ");fflush(stdout);
drawable_update (GIMP_DRAWABLE(float_layer), 0, 0, drawable_width (GIMP_DRAWABLE(float_layer)), drawable_height (GIMP_DRAWABLE(float_layer)));
/* invalidate the composite preview */

View file

@ -1447,7 +1447,10 @@ paint_mode_menu_callback (GtkWidget *w,
{
layer->mode = mode;
reinit_layer_idlerender(gimage, layer);
/* reinit_layer_idlerender(gimage, layer);*/
drawable_update (GIMP_DRAWABLE(layer), 0, 0, GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
gdisplays_flush ();
}
}
}
@ -1485,7 +1488,9 @@ opacity_scale_update (GtkAdjustment *adjustment,
{
layer->opacity = opacity;
reinit_layer_idlerender (gimage, layer);
/*reinit_layer_idlerender (gimage, layer);*/
drawable_update (GIMP_DRAWABLE(layer), 0, 0, GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
gdisplays_flush ();
}
}
@ -2212,14 +2217,23 @@ layer_widget_button_events (GtkWidget *widget,
{
/*printf("Case 1, kick-ass!\n");fflush(stdout);*/
gimage_invalidate_preview (layer_widget->gimage);
reinit_gimage_idlerender (layer_widget->gimage);
/*reinit_gimage_idlerender (layer_widget->gimage);*/
gdisplays_update_area (layer_widget->gimage, 0, 0,
layer_widget->gimage->width,
layer_widget->gimage->height);
gdisplays_flush ();
}
else if (old_state != GIMP_DRAWABLE(layer_widget->layer)->visible)
{
/* Invalidate the gimage preview */
/*printf("Case 2, what incredible irony!\n");fflush(stdout);*/
gimage_invalidate_preview (layer_widget->gimage);
reinit_layer_idlerender (layer_widget->gimage,
layer_widget->layer);
/*reinit_layer_idlerender (layer_widget->gimage,
layer_widget->layer);*/
drawable_update (GIMP_DRAWABLE(layer_widget->layer), 0, 0,
GIMP_DRAWABLE(layer_widget->layer)->width,
GIMP_DRAWABLE(layer_widget->layer)->height);
gdisplays_flush ();
}
}
else if ((widget == layer_widget->linked_widget) &&

View file

@ -1447,7 +1447,10 @@ paint_mode_menu_callback (GtkWidget *w,
{
layer->mode = mode;
reinit_layer_idlerender(gimage, layer);
/* reinit_layer_idlerender(gimage, layer);*/
drawable_update (GIMP_DRAWABLE(layer), 0, 0, GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
gdisplays_flush ();
}
}
}
@ -1485,7 +1488,9 @@ opacity_scale_update (GtkAdjustment *adjustment,
{
layer->opacity = opacity;
reinit_layer_idlerender (gimage, layer);
/*reinit_layer_idlerender (gimage, layer);*/
drawable_update (GIMP_DRAWABLE(layer), 0, 0, GIMP_DRAWABLE(layer)->width, GIMP_DRAWABLE(layer)->height);
gdisplays_flush ();
}
}
@ -2212,14 +2217,23 @@ layer_widget_button_events (GtkWidget *widget,
{
/*printf("Case 1, kick-ass!\n");fflush(stdout);*/
gimage_invalidate_preview (layer_widget->gimage);
reinit_gimage_idlerender (layer_widget->gimage);
/*reinit_gimage_idlerender (layer_widget->gimage);*/
gdisplays_update_area (layer_widget->gimage, 0, 0,
layer_widget->gimage->width,
layer_widget->gimage->height);
gdisplays_flush ();
}
else if (old_state != GIMP_DRAWABLE(layer_widget->layer)->visible)
{
/* Invalidate the gimage preview */
/*printf("Case 2, what incredible irony!\n");fflush(stdout);*/
gimage_invalidate_preview (layer_widget->gimage);
reinit_layer_idlerender (layer_widget->gimage,
layer_widget->layer);
/*reinit_layer_idlerender (layer_widget->gimage,
layer_widget->layer);*/
drawable_update (GIMP_DRAWABLE(layer_widget->layer), 0, 0,
GIMP_DRAWABLE(layer_widget->layer)->width,
GIMP_DRAWABLE(layer_widget->layer)->height);
gdisplays_flush ();
}
}
else if ((widget == layer_widget->linked_widget) &&

View file

@ -1089,8 +1089,7 @@ undo_push_layer (GImage *gimage,
}
}
#include <stdio.h>
#warning AIE
int
undo_pop_layer (GImage *gimage,
int state,
@ -1134,9 +1133,9 @@ undo_pop_layer (GImage *gimage,
floating_sel_reset (lu->layer);
}
printf (" undo_pop1 ");fflush(stdout);
/* drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);*/
reinit_layer_idlerender (gimage, lu->layer);
/*printf (" undo_pop1 ");fflush(stdout);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);
/*reinit_layer_idlerender (gimage, lu->layer);*/
}
/* restore layer */
else
@ -1157,9 +1156,9 @@ undo_pop_layer (GImage *gimage,
gimage->layer_stack = g_slist_prepend (gimage->layer_stack, lu->layer);
gimage->active_layer = lu->layer;
printf (" undo_pop2 ");fflush(stdout);
/*drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);*/
reinit_layer_idlerender (gimage, lu->layer);
/*printf (" undo_pop2 ");fflush(stdout);*/
drawable_update (GIMP_DRAWABLE(lu->layer), 0, 0, GIMP_DRAWABLE(lu->layer)->width, GIMP_DRAWABLE(lu->layer)->height);
/*reinit_layer_idlerender (gimage, lu->layer);*/
}
return TRUE;