Create/resize the pixmap on every expose CONFIGURE event, not just on the

Thu Jun 11 00:34:51 1998  Owen Taylor  <otaylor@gtk.org>

	* app/color_area.c (color_area_events): Create/resize
	the pixmap on every expose CONFIGURE event, not just
	on the first expose event.

Thu Jun 11 00:02:15 1998  Owen Taylor  <otaylor@gtk.org>

	* app/interface.c (create_toolbox): Create the color
	area before showing the window, so that the window gets
	created at the right size. [ This doesn't actually fix
	much, but it is better to do that way ]
This commit is contained in:
Owen Taylor 1998-06-11 04:36:22 +00:00 committed by Owen Taylor
parent a8f8421292
commit 9e2b6b31ac
7 changed files with 67 additions and 27 deletions

View File

@ -1,3 +1,16 @@
Thu Jun 11 00:34:51 1998 Owen Taylor <otaylor@gtk.org>
* app/color_area.c (color_area_events): Create/resize
the pixmap on every expose CONFIGURE event, not just
on the first expose event.
Thu Jun 11 00:02:15 1998 Owen Taylor <otaylor@gtk.org>
* app/interface.c (create_toolbox): Create the color
area before showing the window, so that the window gets
created at the right size. [ This doesn't actually fix
much, but it is better to do that way ]
Wed Jun 10 14:17:44 1998 Owen Taylor <otaylor@gtk.org>
* app/disp_callbacks.c (gdisplay_origin_button_press):

View File

@ -208,15 +208,24 @@ color_area_events (GtkWidget *widget,
switch (event->type)
{
case GDK_EXPOSE:
if (!color_area_pixmap)
color_area_pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height, -1);
if (!color_area_gc)
color_area_gc = gdk_gc_new (widget->window);
case GDK_CONFIGURE:
if (color_area_pixmap)
gdk_pixmap_unref (color_area_pixmap);
color_area_draw ();
color_area_pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height, -1);
break;
case GDK_EXPOSE:
if (GTK_WIDGET_DRAWABLE (widget))
{
if (!color_area_gc)
color_area_gc = gdk_gc_new (widget->window);
color_area_draw ();
}
break;
case GDK_BUTTON_PRESS:

View File

@ -636,8 +636,8 @@ create_toolbox ()
create_tools (vbox);
/*create_tool_label (vbox);*/
/*create_progress_area (vbox);*/
gtk_widget_show (window);
create_color_area (vbox);
gtk_widget_show (window);
toolbox_shell = window;

View File

@ -636,8 +636,8 @@ create_toolbox ()
create_tools (vbox);
/*create_tool_label (vbox);*/
/*create_progress_area (vbox);*/
gtk_widget_show (window);
create_color_area (vbox);
gtk_widget_show (window);
toolbox_shell = window;

View File

@ -208,15 +208,24 @@ color_area_events (GtkWidget *widget,
switch (event->type)
{
case GDK_EXPOSE:
if (!color_area_pixmap)
color_area_pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height, -1);
if (!color_area_gc)
color_area_gc = gdk_gc_new (widget->window);
case GDK_CONFIGURE:
if (color_area_pixmap)
gdk_pixmap_unref (color_area_pixmap);
color_area_draw ();
color_area_pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height, -1);
break;
case GDK_EXPOSE:
if (GTK_WIDGET_DRAWABLE (widget))
{
if (!color_area_gc)
color_area_gc = gdk_gc_new (widget->window);
color_area_draw ();
}
break;
case GDK_BUTTON_PRESS:

View File

@ -636,8 +636,8 @@ create_toolbox ()
create_tools (vbox);
/*create_tool_label (vbox);*/
/*create_progress_area (vbox);*/
gtk_widget_show (window);
create_color_area (vbox);
gtk_widget_show (window);
toolbox_shell = window;

View File

@ -208,15 +208,24 @@ color_area_events (GtkWidget *widget,
switch (event->type)
{
case GDK_EXPOSE:
if (!color_area_pixmap)
color_area_pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height, -1);
if (!color_area_gc)
color_area_gc = gdk_gc_new (widget->window);
case GDK_CONFIGURE:
if (color_area_pixmap)
gdk_pixmap_unref (color_area_pixmap);
color_area_draw ();
color_area_pixmap = gdk_pixmap_new (widget->window,
widget->allocation.width,
widget->allocation.height, -1);
break;
case GDK_EXPOSE:
if (GTK_WIDGET_DRAWABLE (widget))
{
if (!color_area_gc)
color_area_gc = gdk_gc_new (widget->window);
color_area_draw ();
}
break;
case GDK_BUTTON_PRESS: