Added missed case into draw code. (Thanks Tim!)

Fri Jul 31 13:23:50 1998  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Added
	  missed case into draw code. (Thanks Tim!)

	* gtk/gtkrc.c gtk/gtkstyle.c: When unrealizing/destroying
	  call engine-specific code first. Misc cleanups.

	* themes/Makefile.in themes/configure.in: Fixups with
	  GTK_CFLAGS.

Thu Jul 30 18:09:21 1998  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c gtk/gtkstyle.c: More mm fixups

	* gtk/gtktooltips.c: Pass a widget (the window) to the
	  drawing function instead of the GtkTooltips.

Thu Jul 30 17:27:10 1998  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c: Abstract out checking for shape
	  extension into a function.

	* gtk/gtkwindow.c: Fix up gtk_window_expose()/draw().
	  Remove extra callls to gtk_window_draw().
This commit is contained in:
Owen Taylor
1998-07-31 18:27:00 +00:00
committed by Owen Taylor
parent 257ef68381
commit 607f7ddde9
9 changed files with 51 additions and 67 deletions

View File

@@ -1597,12 +1597,12 @@ gdk_window_shape_combine_mask (GdkWindow *window,
g_return_if_fail (window != NULL);
#ifdef HAVE_SHAPE_EXT
window_private = (GdkWindowPrivate*) window;
if (window_private->destroyed)
return;
if (gdk_window_have_shape_ext())
{
window_private = (GdkWindowPrivate*) window;
if (window_private->destroyed)
return;
if (mask)
{
GdkWindowPrivate *pixmap_private;
@@ -2542,13 +2542,12 @@ gdk_window_set_child_shapes (GdkWindow *window)
g_return_if_fail (window != NULL);
#ifdef HAVE_SHAPE_EXT
private = (GdkWindowPrivate*) window;
if (private->destroyed)
return;
if (gdk_window_have_shape_ext())
{
private = (GdkWindowPrivate*) window;
if (private->destroyed)
return;
gdk_propagate_shapes (private->xdisplay, private->xwindow);
}
gdk_propagate_shapes (private->xdisplay, private->xwindow);
#endif
}
@@ -2560,12 +2559,11 @@ gdk_window_combine_child_shapes (GdkWindow *window)
g_return_if_fail (window != NULL);
#ifdef HAVE_SHAPE_EXT
private = (GdkWindowPrivate*) window;
if (private->destroyed)
return;
if (gdk_window_have_shape_ext())
{
private = (GdkWindowPrivate*) window;
if (private->destroyed)
return;
gdk_propagate_combine_shapes (private->xdisplay, private->xwindow);
}
gdk_propagate_combine_shapes (private->xdisplay, private->xwindow);
#endif
}

View File

@@ -1597,12 +1597,12 @@ gdk_window_shape_combine_mask (GdkWindow *window,
g_return_if_fail (window != NULL);
#ifdef HAVE_SHAPE_EXT
window_private = (GdkWindowPrivate*) window;
if (window_private->destroyed)
return;
if (gdk_window_have_shape_ext())
{
window_private = (GdkWindowPrivate*) window;
if (window_private->destroyed)
return;
if (mask)
{
GdkWindowPrivate *pixmap_private;
@@ -2542,13 +2542,12 @@ gdk_window_set_child_shapes (GdkWindow *window)
g_return_if_fail (window != NULL);
#ifdef HAVE_SHAPE_EXT
private = (GdkWindowPrivate*) window;
if (private->destroyed)
return;
if (gdk_window_have_shape_ext())
{
private = (GdkWindowPrivate*) window;
if (private->destroyed)
return;
gdk_propagate_shapes (private->xdisplay, private->xwindow);
}
gdk_propagate_shapes (private->xdisplay, private->xwindow);
#endif
}
@@ -2560,12 +2559,11 @@ gdk_window_combine_child_shapes (GdkWindow *window)
g_return_if_fail (window != NULL);
#ifdef HAVE_SHAPE_EXT
private = (GdkWindowPrivate*) window;
if (private->destroyed)
return;
if (gdk_window_have_shape_ext())
{
private = (GdkWindowPrivate*) window;
if (private->destroyed)
return;
gdk_propagate_combine_shapes (private->xdisplay, private->xwindow);
}
gdk_propagate_combine_shapes (private->xdisplay, private->xwindow);
#endif
}

View File

@@ -52,11 +52,11 @@ static guint gtk_rc_styles_hash (const GSList *rc_styles);
static gint gtk_rc_styles_compare (const GSList *a,
const GSList *b);
static GtkRcStyle* gtk_rc_style_find (const char *name);
static GSList * gtk_rc_styles_match (GSList *sets,
static GSList * gtk_rc_styles_match (GSList *rc_styles,
GSList *sets,
guint path_length,
gchar *path,
gchar *path_reversed,
GSList *rc_styles);
gchar *path_reversed);
static GtkStyle * gtk_rc_style_to_style (GtkRcStyle *rc_style);
static GtkStyle* gtk_rc_style_init (GSList *rc_styles);
static void gtk_rc_parse_file (const gchar *filename,
@@ -376,6 +376,9 @@ gtk_rc_style_unref (GtkRcStyle *rc_style)
if (rc_style->ref_count == 0)
{
if (rc_style->engine)
rc_style->engine->destroy_rc_style (rc_style);
if (rc_style->name)
g_free (rc_style->name);
if (rc_style->fontset_name)
@@ -387,9 +390,6 @@ gtk_rc_style_unref (GtkRcStyle *rc_style)
if (rc_style->bg_pixmap_name[i])
g_free (rc_style->bg_pixmap_name[i]);
if (rc_style->engine)
rc_style->engine->destroy_rc_style (rc_style);
g_free (rc_style);
}
}
@@ -499,11 +499,12 @@ gtk_rc_reparse_all (void)
}
static GSList *
gtk_rc_styles_match (GSList *sets,
gtk_rc_styles_match (GSList *rc_styles,
GSList *sets,
guint path_length,
gchar *path,
gchar *path_reversed,
GSList *rc_styles)
gchar *path_reversed)
{
GtkRcSet *rc_set;
@@ -530,7 +531,7 @@ gtk_rc_get_style (GtkWidget *widget)
guint path_length;
gtk_widget_path (widget, &path_length, &path, &path_reversed);
rc_styles = gtk_rc_styles_match (gtk_rc_sets_widget, path_length, path, path_reversed, rc_styles);
rc_styles = gtk_rc_styles_match (rc_styles, gtk_rc_sets_widget, path_length, path, path_reversed);
g_free (path);
g_free (path_reversed);
@@ -542,7 +543,7 @@ gtk_rc_get_style (GtkWidget *widget)
guint path_length;
gtk_widget_class_path (widget, &path_length, &path, &path_reversed);
rc_styles = gtk_rc_styles_match (gtk_rc_sets_widget_class, path_length, path, path_reversed, rc_styles);
rc_styles = gtk_rc_styles_match (rc_styles, gtk_rc_sets_widget_class, path_length, path, path_reversed);
g_free (path);
g_free (path_reversed);
}
@@ -562,7 +563,7 @@ gtk_rc_get_style (GtkWidget *widget)
path_reversed = g_strdup (path);
g_strreverse (path_reversed);
rc_styles = gtk_rc_styles_match (gtk_rc_sets_class, path_length, path, path_reversed, rc_styles);
rc_styles = gtk_rc_styles_match (rc_styles, gtk_rc_sets_class, path_length, path, path_reversed);
g_free (path_reversed);
type = gtk_type_parent (type);

View File

@@ -526,6 +526,9 @@ gtk_style_detach (GtkStyle *style)
style->attach_count -= 1;
if (style->attach_count == 0)
{
if (style->engine)
style->engine->unrealize_style (style);
gtk_gc_release (style->black_gc);
gtk_gc_release (style->white_gc);
@@ -539,8 +542,6 @@ gtk_style_detach (GtkStyle *style)
gtk_gc_release (style->text_gc[i]);
gtk_gc_release (style->base_gc[i]);
}
if (style->engine)
style->engine->unrealize_style (style);
gtk_style_unref (style);
}

View File

@@ -1731,6 +1731,8 @@ gtk_widget_queue_clear_area (GtkWidget *widget,
width = wwidth - x;
if (y + height > wheight)
height = wheight - y;
gtk_widget_queue_draw_data (widget, x, y, width, height, NULL);
}
}

View File

@@ -19,7 +19,7 @@ pixmap_path ".:/home/raster/themes"
style "default"
{
font = "-adobe-helvetica-medium-r-normal--8-*-*-*-*-*-*-*"
# font = "-adobe-helvetica-medium-r-normal--8-*-*-*-*-*-*-*"
# bg_pixmap[NORMAL] = "marble.xpm"
engine "win95"
@@ -118,7 +118,7 @@ widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list"
# common default
class "GtkWidget" style "default"
class "GtkScrollbar" style "red-bar"
#class "GtkScrollbar" style "red-bar"
widget_class "GtkWindow" style "window"
widget_class "GtkDialog" style "window"

View File

@@ -19,7 +19,7 @@ pixmap_path ".:/home/raster/themes"
style "default"
{
font = "-adobe-helvetica-medium-r-normal--8-*-*-*-*-*-*-*"
# font = "-adobe-helvetica-medium-r-normal--8-*-*-*-*-*-*-*"
# bg_pixmap[NORMAL] = "marble.xpm"
engine "win95"
@@ -118,7 +118,7 @@ widget "main window.*GtkScrolledWindow.*GtkButton*" style "button_list"
# common default
class "GtkWidget" style "default"
class "GtkScrollbar" style "red-bar"
#class "GtkScrollbar" style "red-bar"
widget_class "GtkWindow" style "window"
widget_class "GtkDialog" style "window"

View File

@@ -112,10 +112,6 @@ DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
libpixmap_la_LDFLAGS =
libpixmap_la_LIBADD =
libpixmap_la_OBJECTS = pixmap_theme_draw.lo pixmap_theme_main.lo
@@ -184,7 +180,7 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
$(mkinstalldirs) $(exec_prefix)/share/gtk/themes/$$l; \
for f in `ls $$p`; do \
if test -f $$p/$$f; then \
$(INSTALL) $$p/$$f \
$(INSTALL) $$p/$$f \
$(exec_prefix)/share/gtk/themes/$$l/; \
fi; \
done; \

View File

@@ -28,18 +28,6 @@ AC_PROG_MAKE_SET
AM_PATH_GTK(1.1.0, ,
AC_MSG_ERROR([*** GTK 1.1 not installed - please install first ***]))
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
# Find the X11 include and library directories
AC_PATH_X
AC_PATH_XTRA
CFLAGS="$CFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
# Checks for header files.
AC_HEADER_STDC