Possible Win32 bug: gdk_draw_pixmap and GtkAdjustment
- From: Michael Mitton <Michael Mitton millersville edu>
- To: "Gtk-Devel-List (E-mail)" <gtk-devel-list gnome org>
- Subject: Possible Win32 bug: gdk_draw_pixmap and GtkAdjustment
- Date: Wed, 21 Feb 2001 08:45:23 -0500
I seem to be finding a lot of bugs right now...
Here's what I found this time. Again, using the .dll's from
http://user.sgic.fi/~tml/gimp/win32/
Are these new bugs, or are they known? I'll make a sample program for you
if they're new.
Thank you
-Michael
1. gdk_draw_pixmap(widget->window, gc, widget->window, ...) (ie, used
for moving text during a scoll) will freeze the machine. (note the src and
dest are the same) Problem is "fixed" when I create a temporary pixmap and
use that as an in-between. I've verified all of the variables used here are
sane.
Here's the code snip...
#ifdef __CYGWIN__
// This is what needs to be run under windows
temp = gdk_pixmap_new(widget->window, width, count * term->charheight,
-1);
gdk_draw_pixmap(temp,
term->scroll_gc, /* must use this to generate expose
events */
widget->window,
offx, offy + (firstrow + offset) * term->charheight,
0, 0,
width, count*term->charheight);
gdk_draw_pixmap(widget->window,
term->scroll_gc, /* must use this to generate expose
events */
temp,
0, 0,
offx, offy + firstrow * term->charheight,
-1, -1);
gdk_pixmap_unref(temp);
#else
// This is the original code that works fine under Linux
gdk_draw_pixmap(widget->window,
term->scroll_gc,
widget->window,
offx, offy + (firstrow + offset) * term->charheight,
offx, offy + firstrow * term->charheight,
width, count*term->charheight);
#endif
2. Modification of the values in the GtkAdjustment structure seem to
freeze the machine too. I haven't found a work-around for this yet. I've
verified all of the variables used here are sane.
Here's the code snip...
static void
zvt_term_fix_scrollbar (ZvtTerm *term)
{
#ifdef __CYGWIN__
// Have not found a fix yet
#else
// This is the original code that works fine under Linux
GTK_ADJUSTMENT(term->adjustment)->upper =
term->vx->vt.scrollbacklines + term->vx->vt.height - 1;
GTK_ADJUSTMENT(term->adjustment)->page_increment =
term->vx->vt.height - 1;
GTK_ADJUSTMENT(term->adjustment)->page_size =
term->vx->vt.height - 1;
GTK_ADJUSTMENT(term->adjustment)->value =
term->vx->vt.scrollbackoffset + term->vx->vt.scrollbacklines;
gtk_signal_emit_by_name (GTK_OBJECT (term->adjustment), "changed");
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]