The commit to the stable branch is on its way...

1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
	GtkPreview's visual and colormap, otherwise things can BadMatch.

	* gtk/testgtk.c (create_color_preview):
	(create_gray_preview): Removed pushing/popping of visual/colormap
	now that GtkPreview does things correctly.

	* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
	(gtk_color_selection_draw_wheel): Pick the style from the correct
	place (the colorsel->wheel_area widget) so that the GCs will match
	with where we are going to paint to.

	* gtk/testgtk.c (create_color_selection): Removed pushing/popping
	of visual/colormap now that GtkColorSelection does things the
	right way.
This commit is contained in:
Federico Mena Quintero 1998-05-12 03:15:45 +00:00 committed by Arturo Espinosa
parent 62f865ee09
commit 2fa59370f7
11 changed files with 130 additions and 42 deletions

View File

@ -1,3 +1,21 @@
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the

View File

@ -1,3 +1,21 @@
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the

View File

@ -1,3 +1,21 @@
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the

View File

@ -1,3 +1,21 @@
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the

View File

@ -1,3 +1,21 @@
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the

View File

@ -1,3 +1,21 @@
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the

View File

@ -1,3 +1,21 @@
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the

View File

@ -1152,7 +1152,7 @@ gtk_color_selection_draw_wheel_frame (GtkColorSelection *colorsel)
GtkStyle *style;
gint w, h;
style = gtk_widget_get_style (GTK_WIDGET (colorsel));
style = gtk_widget_get_style (colorsel->wheel_area);
w = colorsel->wheel_area->allocation.width;
h = colorsel->wheel_area->allocation.height;
@ -1175,7 +1175,7 @@ gtk_color_selection_draw_wheel (GtkColorSelection *colorsel,
gint x, y, i, wid, heig, n;
gdouble cx, cy, h, s, c[3];
guchar bg[3];
GtkStyle *style = gtk_widget_get_style (GTK_WIDGET (colorsel));
GtkStyle *style = gtk_widget_get_style (colorsel->wheel_area);
wid = colorsel->wheel_area->allocation.width;
heig = colorsel->wheel_area->allocation.height;

View File

@ -736,8 +736,8 @@ gtk_preview_realize (GtkWidget *widget)
attributes.width = widget->allocation.width;
attributes.height = widget->allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
attributes.visual = preview_class->info.visual;
attributes.colormap = preview_class->info.cmap;
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;

View File

@ -4223,10 +4223,6 @@ create_color_selection (void)
if (!window)
{
gtk_preview_set_install_cmap (TRUE);
gtk_widget_push_visual (gtk_preview_get_visual ());
gtk_widget_push_colormap (gtk_preview_get_cmap ());
window = gtk_color_selection_dialog_new ("color selection dialog");
gtk_color_selection_set_opacity (
@ -4260,9 +4256,6 @@ create_color_selection (void)
"clicked",
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_widget_pop_colormap ();
gtk_widget_pop_visual ();
}
if (!GTK_WIDGET_VISIBLE (window))
@ -5725,9 +5718,6 @@ create_color_preview (void)
if (!window)
{
gtk_widget_push_visual (gtk_preview_get_visual ());
gtk_widget_push_colormap (gtk_preview_get_cmap ());
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
@ -5756,9 +5746,6 @@ create_color_preview (void)
}
color_idle = gtk_idle_add ((GtkFunction) color_idle_func, preview);
gtk_widget_pop_colormap ();
gtk_widget_pop_visual ();
}
if (!GTK_WIDGET_VISIBLE (window))
@ -5815,9 +5802,6 @@ create_gray_preview (void)
if (!window)
{
gtk_widget_push_visual (gtk_preview_get_visual ());
gtk_widget_push_colormap (gtk_preview_get_cmap ());
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
@ -5841,9 +5825,6 @@ create_gray_preview (void)
}
gray_idle = gtk_idle_add ((GtkFunction) gray_idle_func, preview);
gtk_widget_pop_colormap ();
gtk_widget_pop_visual ();
}
if (!GTK_WIDGET_VISIBLE (window))

View File

@ -4223,10 +4223,6 @@ create_color_selection (void)
if (!window)
{
gtk_preview_set_install_cmap (TRUE);
gtk_widget_push_visual (gtk_preview_get_visual ());
gtk_widget_push_colormap (gtk_preview_get_cmap ());
window = gtk_color_selection_dialog_new ("color selection dialog");
gtk_color_selection_set_opacity (
@ -4260,9 +4256,6 @@ create_color_selection (void)
"clicked",
GTK_SIGNAL_FUNC(gtk_widget_destroy),
GTK_OBJECT (window));
gtk_widget_pop_colormap ();
gtk_widget_pop_visual ();
}
if (!GTK_WIDGET_VISIBLE (window))
@ -5725,9 +5718,6 @@ create_color_preview (void)
if (!window)
{
gtk_widget_push_visual (gtk_preview_get_visual ());
gtk_widget_push_colormap (gtk_preview_get_cmap ());
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
@ -5756,9 +5746,6 @@ create_color_preview (void)
}
color_idle = gtk_idle_add ((GtkFunction) color_idle_func, preview);
gtk_widget_pop_colormap ();
gtk_widget_pop_visual ();
}
if (!GTK_WIDGET_VISIBLE (window))
@ -5815,9 +5802,6 @@ create_gray_preview (void)
if (!window)
{
gtk_widget_push_visual (gtk_preview_get_visual ());
gtk_widget_push_colormap (gtk_preview_get_cmap ());
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
@ -5841,9 +5825,6 @@ create_gray_preview (void)
}
gray_idle = gtk_idle_add ((GtkFunction) gray_idle_func, preview);
gtk_widget_pop_colormap ();
gtk_widget_pop_visual ();
}
if (!GTK_WIDGET_VISIBLE (window))