summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-07-14 20:24:14 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-07-14 20:24:14 +0000
commit0bcf86c032b1204aed17b9e59b42f9ef1266840c (patch)
tree58ed91ddc232b9c057b653c64e279ce9769db675
parented7408e1ff3b2fcb59b1566b80c1af29d1b40367 (diff)
downloadgdk-pixbuf-0bcf86c032b1204aed17b9e59b42f9ef1266840c.tar.gz
use FALSE for size_only most of the time when calling
Fri Jul 14 16:21:26 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtktextlayout.c: use FALSE for size_only most of the time when calling gtk_text_layout_get_line_display() to avoid causing double reshapes when a redraw follows immediately after. Tue Jul 11 11:13:40 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate appropriate region and gdk_window_process_updates() so trough updating doesn't lag behind the window being scrolled. * gdk/gdkgc.c: Make parent_class pointer static. Sun Jul 9 21:31:23 2000 Owen Taylor <otaylor@redhat.com> * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c: include <string.h>. * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix cut-and-paste error in computing memory offset for 4 channels.
-rw-r--r--ChangeLog23
-rw-r--r--ChangeLog.pre-2-023
-rw-r--r--ChangeLog.pre-2-1023
-rw-r--r--ChangeLog.pre-2-223
-rw-r--r--ChangeLog.pre-2-423
-rw-r--r--ChangeLog.pre-2-623
-rw-r--r--ChangeLog.pre-2-823
-rw-r--r--gdk-pixbuf/ChangeLog4
-rw-r--r--gdk-pixbuf/gdk-pixbuf.c1
-rw-r--r--gdk/gdkgc.c2
-rw-r--r--gdk/gdkpixbuf-render.c2
-rw-r--r--gtk/gtkrange.c34
-rw-r--r--gtk/gtktextlayout.c20
-rw-r--r--gtk/gtktextview.c2
14 files changed, 212 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index ed7b7efad..cd195b728 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktextlayout.c: use FALSE for size_only most
+ of the time when calling gtk_text_layout_get_line_display()
+ to avoid causing double reshapes when a redraw follows
+ immediately after.
+
+Tue Jul 11 11:13:40 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+ appropriate region and gdk_window_process_updates() so trough
+ updating doesn't lag behind the window being scrolled.
+
+ * gdk/gdkgc.c: Make parent_class pointer static.
+
+Sun Jul 9 21:31:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+ include <string.h>.
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+ cut-and-paste error in computing memory offset for 4 channels.
+
Fri Jul 14 14:05:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index ed7b7efad..cd195b728 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktextlayout.c: use FALSE for size_only most
+ of the time when calling gtk_text_layout_get_line_display()
+ to avoid causing double reshapes when a redraw follows
+ immediately after.
+
+Tue Jul 11 11:13:40 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+ appropriate region and gdk_window_process_updates() so trough
+ updating doesn't lag behind the window being scrolled.
+
+ * gdk/gdkgc.c: Make parent_class pointer static.
+
+Sun Jul 9 21:31:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+ include <string.h>.
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+ cut-and-paste error in computing memory offset for 4 channels.
+
Fri Jul 14 14:05:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index ed7b7efad..cd195b728 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktextlayout.c: use FALSE for size_only most
+ of the time when calling gtk_text_layout_get_line_display()
+ to avoid causing double reshapes when a redraw follows
+ immediately after.
+
+Tue Jul 11 11:13:40 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+ appropriate region and gdk_window_process_updates() so trough
+ updating doesn't lag behind the window being scrolled.
+
+ * gdk/gdkgc.c: Make parent_class pointer static.
+
+Sun Jul 9 21:31:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+ include <string.h>.
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+ cut-and-paste error in computing memory offset for 4 channels.
+
Fri Jul 14 14:05:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index ed7b7efad..cd195b728 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktextlayout.c: use FALSE for size_only most
+ of the time when calling gtk_text_layout_get_line_display()
+ to avoid causing double reshapes when a redraw follows
+ immediately after.
+
+Tue Jul 11 11:13:40 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+ appropriate region and gdk_window_process_updates() so trough
+ updating doesn't lag behind the window being scrolled.
+
+ * gdk/gdkgc.c: Make parent_class pointer static.
+
+Sun Jul 9 21:31:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+ include <string.h>.
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+ cut-and-paste error in computing memory offset for 4 channels.
+
Fri Jul 14 14:05:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index ed7b7efad..cd195b728 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktextlayout.c: use FALSE for size_only most
+ of the time when calling gtk_text_layout_get_line_display()
+ to avoid causing double reshapes when a redraw follows
+ immediately after.
+
+Tue Jul 11 11:13:40 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+ appropriate region and gdk_window_process_updates() so trough
+ updating doesn't lag behind the window being scrolled.
+
+ * gdk/gdkgc.c: Make parent_class pointer static.
+
+Sun Jul 9 21:31:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+ include <string.h>.
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+ cut-and-paste error in computing memory offset for 4 channels.
+
Fri Jul 14 14:05:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index ed7b7efad..cd195b728 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktextlayout.c: use FALSE for size_only most
+ of the time when calling gtk_text_layout_get_line_display()
+ to avoid causing double reshapes when a redraw follows
+ immediately after.
+
+Tue Jul 11 11:13:40 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+ appropriate region and gdk_window_process_updates() so trough
+ updating doesn't lag behind the window being scrolled.
+
+ * gdk/gdkgc.c: Make parent_class pointer static.
+
+Sun Jul 9 21:31:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+ include <string.h>.
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+ cut-and-paste error in computing memory offset for 4 channels.
+
Fri Jul 14 14:05:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index ed7b7efad..cd195b728 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtktextlayout.c: use FALSE for size_only most
+ of the time when calling gtk_text_layout_get_line_display()
+ to avoid causing double reshapes when a redraw follows
+ immediately after.
+
+Tue Jul 11 11:13:40 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+ appropriate region and gdk_window_process_updates() so trough
+ updating doesn't lag behind the window being scrolled.
+
+ * gdk/gdkgc.c: Make parent_class pointer static.
+
+Sun Jul 9 21:31:23 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+ include <string.h>.
+
+ * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+ cut-and-paste error in computing memory offset for 4 channels.
+
Fri Jul 14 14:05:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index e0d202f5a..4bc6ed39c 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,7 @@
+Tue Jul 11 11:26:42 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gdk-pixbuf.c: Add <string.h> include.
+
Tue Jul 11 06:20:14 2000 Tim Janik <timj@gtk.org>
* io-gif.c (gdk_pixbuf__gif_image_load_animation):
diff --git a/gdk-pixbuf/gdk-pixbuf.c b/gdk-pixbuf/gdk-pixbuf.c
index 50947ba8e..be3b26803 100644
--- a/gdk-pixbuf/gdk-pixbuf.c
+++ b/gdk-pixbuf/gdk-pixbuf.c
@@ -25,6 +25,7 @@
#include <config.h>
#include <math.h>
#include <stdlib.h>
+#include <string.h>
#include "gdk-pixbuf.h"
#include "gdk-pixbuf-private.h"
diff --git a/gdk/gdkgc.c b/gdk/gdkgc.c
index 07f80e94a..aea21dc7f 100644
--- a/gdk/gdkgc.c
+++ b/gdk/gdkgc.c
@@ -33,7 +33,7 @@
static void gdk_gc_class_init (GObjectClass *class);
static void gdk_gc_finalize (GObject *object);
-GObjectClass *parent_class;
+static GObjectClass *parent_class;
GType
gdk_gc_get_type (void)
diff --git a/gdk/gdkpixbuf-render.c b/gdk/gdkpixbuf-render.c
index 39bda4cc1..8831ba8a4 100644
--- a/gdk/gdkpixbuf-render.c
+++ b/gdk/gdkpixbuf-render.c
@@ -191,7 +191,7 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf,
if (pixbuf->n_channels == 4)
{
- buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
+ buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 4;
rowstride = pixbuf->rowstride;
gdk_draw_rgb_32_image_dithalign (drawable, gc,
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index bd3521634..c884e03fd 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -392,6 +392,36 @@ gtk_range_trough_click (GtkRange *range,
return GTK_TROUGH_NONE;
}
+static GdkRegion *
+get_window_region (GdkWindow *window)
+{
+ GdkRectangle rect;
+
+ gdk_window_get_position (window, &rect.x, &rect.y);
+ gdk_window_get_size (window, &rect.width, &rect.height);
+
+ return gdk_region_rectangle (&rect);
+}
+
+static void
+move_and_update_window (GdkWindow *window, gint x, gint y)
+{
+ GdkRegion *old_region;
+ GdkRegion *new_region;
+ GdkWindow *parent = gdk_window_get_parent (window);
+
+ old_region = get_window_region (window);
+ gdk_window_move (window, x, y);
+ new_region = get_window_region (window);
+
+ gdk_region_subtract (old_region, new_region);
+ gdk_window_invalidate_region (parent, old_region, TRUE);
+ gdk_region_destroy (old_region);
+ gdk_region_destroy (new_region);
+
+ gdk_window_process_updates (parent, TRUE);
+}
+
void
gtk_range_default_hslider_update (GtkRange *range)
{
@@ -427,7 +457,7 @@ gtk_range_default_hslider_update (GtkRange *range)
else if (x > right)
x = right;
- gdk_window_move (range->slider, x, GTK_WIDGET (range)->style->ythickness);
+ move_and_update_window (range->slider, x, GTK_WIDGET (range)->style->ythickness);
}
}
@@ -466,7 +496,7 @@ gtk_range_default_vslider_update (GtkRange *range)
else if (y > bottom)
y = bottom;
- gdk_window_move (range->slider, GTK_WIDGET (range)->style->xthickness, y);
+ move_and_update_window (range->slider, GTK_WIDGET (range)->style->xthickness, y);
}
}
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index b4dd559fb..03f419c37 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -1459,7 +1459,7 @@ gtk_text_layout_get_iter_at_pixel (GtkTextLayout *layout,
get_line_at_y (layout, y, &line, &line_top);
- display = gtk_text_layout_get_line_display (layout, line, TRUE);
+ display = gtk_text_layout_get_line_display (layout, line, FALSE);
x -= display->x_offset;
y -= line_top + display->top_margin;
@@ -1521,7 +1521,7 @@ gtk_text_layout_get_cursor_locations (GtkTextLayout *layout,
line = gtk_text_iter_get_line (iter);
line_top = gtk_text_btree_find_line_top (layout->buffer->tree, line, layout);
- display = gtk_text_layout_get_line_display (layout, line, TRUE);
+ display = gtk_text_layout_get_line_display (layout, line, FALSE);
pango_layout_get_cursor_pos (display->layout, gtk_text_iter_get_line_byte (iter),
strong_pos ? &pango_strong_pos : NULL,
@@ -1587,7 +1587,7 @@ gtk_text_layout_get_iter_location (GtkTextLayout *layout,
tree = gtk_text_iter_get_btree (iter);
line = gtk_text_iter_get_line (iter);
- display = gtk_text_layout_get_line_display (layout, line, TRUE);
+ display = gtk_text_layout_get_line_display (layout, line, FALSE);
rect->y = gtk_text_btree_find_line_top (tree, line, layout);
@@ -1645,7 +1645,7 @@ find_display_line_below (GtkTextLayout *layout,
while (line && !found_line)
{
- GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, TRUE);
+ GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, FALSE);
gint byte_index = 0;
GSList *tmp_list = pango_layout_get_lines (display->layout);
@@ -1707,7 +1707,7 @@ find_display_line_above (GtkTextLayout *layout,
while (line && !found_line)
{
- GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, TRUE);
+ GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, FALSE);
PangoRectangle logical_rect;
gint byte_index = 0;
@@ -1822,7 +1822,7 @@ gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout,
line = gtk_text_iter_get_line (iter);
line_byte = gtk_text_iter_get_line_byte (iter);
- display = gtk_text_layout_get_line_display (layout, line, TRUE);
+ display = gtk_text_layout_get_line_display (layout, line, FALSE);
tmp_list = pango_layout_get_lines (display->layout);
layout_line = tmp_list->data;
@@ -1836,7 +1836,7 @@ gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout,
gint byte_offset = 0;
gtk_text_layout_free_line_display (layout, display);
- display = gtk_text_layout_get_line_display (layout, prev_line, TRUE);
+ display = gtk_text_layout_get_line_display (layout, prev_line, FALSE);
tmp_list = pango_layout_get_lines (display->layout);
@@ -1913,7 +1913,7 @@ gtk_text_layout_move_iter_to_next_line (GtkTextLayout *layout,
gint byte_offset = 0;
GSList *tmp_list;
- display = gtk_text_layout_get_line_display (layout, line, TRUE);
+ display = gtk_text_layout_get_line_display (layout, line, FALSE);
tmp_list = pango_layout_get_lines (display->layout);
while (tmp_list && !found_after)
@@ -1968,7 +1968,7 @@ gtk_text_layout_move_iter_to_x (GtkTextLayout *layout,
line = gtk_text_iter_get_line (iter);
line_byte = gtk_text_iter_get_line_byte (iter);
- display = gtk_text_layout_get_line_display (layout, line, TRUE);
+ display = gtk_text_layout_get_line_display (layout, line, FALSE);
tmp_list = pango_layout_get_lines (display->layout);
while (tmp_list)
@@ -2052,7 +2052,7 @@ gtk_text_layout_move_iter_visually (GtkTextLayout *layout,
{
GtkTextLine *line = gtk_text_iter_get_line (iter);
gint line_byte = gtk_text_iter_get_line_byte (iter);
- GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, TRUE);
+ GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, FALSE);
int byte_count = gtk_text_line_byte_count (line);
int new_index;
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index d9826d36c..ccdec0eb2 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -48,6 +48,8 @@
*
*/
+#include <string.h>
+
#include "gtkbindings.h"
#include "gtkdnd.h"
#include "gtkmain.h"