Commit c3fc26bb authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Realize window before creating xpm so it gets the right colormap/visual,

Fri Feb 13 00:33:26 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/testgtk.c (shape_create_icon): Realize window before
	  creating xpm so it gets the right colormap/visual,
	  instead of the default one.
parent 041983a7
Fri Feb 13 00:33:26 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c (shape_create_icon): Realize window before
creating xpm so it gets the right colormap/visual,
instead of the default one.
Thu Feb 12 23:59:49 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtksignal.[ch] gtk/gtkmain.[ch] gtk/gtkcontainer.[ch]
......
Fri Feb 13 00:33:26 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c (shape_create_icon): Realize window before
creating xpm so it gets the right colormap/visual,
instead of the default one.
Thu Feb 12 23:59:49 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtksignal.[ch] gtk/gtkmain.[ch] gtk/gtkcontainer.[ch]
......
Fri Feb 13 00:33:26 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c (shape_create_icon): Realize window before
creating xpm so it gets the right colormap/visual,
instead of the default one.
Thu Feb 12 23:59:49 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtksignal.[ch] gtk/gtkmain.[ch] gtk/gtkcontainer.[ch]
......
Fri Feb 13 00:33:26 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c (shape_create_icon): Realize window before
creating xpm so it gets the right colormap/visual,
instead of the default one.
Thu Feb 12 23:59:49 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtksignal.[ch] gtk/gtkmain.[ch] gtk/gtkcontainer.[ch]
......
Fri Feb 13 00:33:26 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c (shape_create_icon): Realize window before
creating xpm so it gets the right colormap/visual,
instead of the default one.
Thu Feb 12 23:59:49 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtksignal.[ch] gtk/gtkmain.[ch] gtk/gtkcontainer.[ch]
......
Fri Feb 13 00:33:26 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c (shape_create_icon): Realize window before
creating xpm so it gets the right colormap/visual,
instead of the default one.
Thu Feb 12 23:59:49 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtksignal.[ch] gtk/gtkmain.[ch] gtk/gtkcontainer.[ch]
......
Fri Feb 13 00:33:26 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c (shape_create_icon): Realize window before
creating xpm so it gets the right colormap/visual,
instead of the default one.
Thu Feb 12 23:59:49 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtksignal.[ch] gtk/gtkmain.[ch] gtk/gtkcontainer.[ch]
......
......@@ -2015,7 +2015,7 @@ file_selection_ok (GtkWidget *w,
GtkFileSelection *fs)
{
g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)));
gtk_widget_destroy (fs);
gtk_widget_destroy (GTK_WIDGET (fs));
}
void
......@@ -2873,6 +2873,12 @@ shape_create_icon (char *xpm_file,
gtk_container_add (GTK_CONTAINER (window), fixed);
gtk_widget_show (fixed);
gtk_widget_set_events (window,
gtk_widget_get_events (window) |
GDK_BUTTON_MOTION_MASK |
GDK_BUTTON_PRESS_MASK);
gtk_widget_realize (window);
gdk_pixmap = gdk_pixmap_create_from_xpm (window->window, &gdk_pixmap_mask,
&style->bg[GTK_STATE_NORMAL],
xpm_file);
......@@ -2883,10 +2889,6 @@ shape_create_icon (char *xpm_file,
gtk_widget_shape_combine_mask (window, gdk_pixmap_mask, px,py);
gtk_widget_set_events (window,
gtk_widget_get_events (window) |
GDK_BUTTON_MOTION_MASK |
GDK_BUTTON_PRESS_MASK);
gtk_signal_connect (GTK_OBJECT (window), "button_press_event",
GTK_SIGNAL_FUNC (shape_pressed),NULL);
......
......@@ -2015,7 +2015,7 @@ file_selection_ok (GtkWidget *w,
GtkFileSelection *fs)
{
g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)));
gtk_widget_destroy (fs);
gtk_widget_destroy (GTK_WIDGET (fs));
}
void
......@@ -2873,6 +2873,12 @@ shape_create_icon (char *xpm_file,
gtk_container_add (GTK_CONTAINER (window), fixed);
gtk_widget_show (fixed);
gtk_widget_set_events (window,
gtk_widget_get_events (window) |
GDK_BUTTON_MOTION_MASK |
GDK_BUTTON_PRESS_MASK);
gtk_widget_realize (window);
gdk_pixmap = gdk_pixmap_create_from_xpm (window->window, &gdk_pixmap_mask,
&style->bg[GTK_STATE_NORMAL],
xpm_file);
......@@ -2883,10 +2889,6 @@ shape_create_icon (char *xpm_file,
gtk_widget_shape_combine_mask (window, gdk_pixmap_mask, px,py);
gtk_widget_set_events (window,
gtk_widget_get_events (window) |
GDK_BUTTON_MOTION_MASK |
GDK_BUTTON_PRESS_MASK);
gtk_signal_connect (GTK_OBJECT (window), "button_press_event",
GTK_SIGNAL_FUNC (shape_pressed),NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment