Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CF: gcfclient patch
- To: crossfire (at) ifi.uio.no
- Subject: CF: gcfclient patch
- From: David Sundqvist <>
- Date: Thu, 3 Dec 1998 23:19:46 +0100 (CET)
- Sender:
Hi people,
Ok, here's a patch that will fix the lost keybinding problem (nasty buffer
overrun that one).
It also fixes a problem while loading/updating large amounts of objects in
the inventory window and the possiblity of an animation being done before
the widget was actually drawn (GTK+ usually updates widgets
asyncronously unless explicitly told to draw the widget). Mainly I've seen
it when loading characters with lots of animations and many objects in the
inventory, but it may also be what caused the segfault when dropping many
objects.
Best regards, have fun, and keep sending bugreports :)
/David
*** client-0.95.1.orig/gx11.c Mon Nov 30 02:39:47 1998
--- client-0.95.1/gx11.c Thu Dec 3 23:11:49 1998
***************
*** 394,401 ****
static GtkWidget *history_list = NULL;
static GtkWidget *gtkwin_config = NULL;
! static char last_str[MAX_BUF];
!
static int pickup_mode = 0;
--- 394,400 ----
static GtkWidget *history_list = NULL;
static GtkWidget *gtkwin_config = NULL;
! static char *last_str;
static int pickup_mode = 0;
***************
*** 440,445 ****
--- 439,446 ----
void end_windows()
{
+ free(last_str);
+
/* XFreeGC(display, gc_root);
XFreeGC(display, gc_game);
XFreeGC(display, gc_stats);
***************
*** 2160,2170 ****
--- 2161,2173 ----
for (list=0; list < 8; list++) {
gtk_adjustment_set_value (GTK_ADJUSTMENT (GTK_RANGE (GTK_CLIST(l->gtk_list[list])->vscrollbar)->adjustment), l->pos[list]);
gtk_clist_thaw (GTK_CLIST(l->gtk_list[list]));
+ gtk_widget_draw (l->gtk_list[list],NULL);
}
} else {
gtk_adjustment_set_value (GTK_ADJUSTMENT (GTK_RANGE (GTK_CLIST(l->gtk_list[0])->vscrollbar)->adjustment), l->pos[0]);
gtk_clist_thaw (GTK_CLIST(l->gtk_list[0]));
+ gtk_widget_draw (l->gtk_list[0],NULL);
}
}
***************
*** 5335,5340 ****
--- 5338,5344 ----
int sync_display = 0;
static int get_root_display(char *display_name,int gargc, char **gargv) {
gtk_init (&gargc,&gargv);
+ last_str=malloc(32767);
create_splash();
create_windows();