X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbmtable.c;h=df5878d35b7104a00f00503d7dd7d99e6c8c2c60;hb=e059c633b01937f450ff9fa873cfc6b773aa74cc;hp=f1e52887105b54772f285782c2100bad3eaf7a7e;hpb=5f3f9ad231bc0c24d34c00e3936e226d9834589a;p=lyx.git diff --git a/src/bmtable.c b/src/bmtable.c index f1e5288710..df5878d35b 100644 --- a/src/bmtable.c +++ b/src/bmtable.c @@ -68,7 +68,8 @@ FL_OBJECT *fl_add_bmtable(int type, FL_Coord x, FL_Coord y, } -static void draw_bitmaptable(FL_OBJECT *ob) +static +void draw_bitmaptable(FL_OBJECT *ob) { int i, j, lx; FL_Coord mx, my; @@ -253,15 +254,9 @@ void fl_set_bmtable_pixmap_data(FL_OBJECT * ob, int nx, int ny, char ** pdata) { BMTABLE_SPEC * sp = (BMTABLE_SPEC *)ob->spec; - extern Colormap color_map; if (sp) { Pixmap dummy_shapemask = 0; -#if 0 - // I can't see why this initalization is needed. (Lgb) - XpmAttributes dumb_attributes = {0}; -#else - XpmAttributes dumb_attributes; -#endif + XpmAttributes dumb_attributes = { 0 }; sp->nx = nx; sp->ny = ny; sp->bx = FL_abs(ob->bw); @@ -271,7 +266,7 @@ void fl_set_bmtable_pixmap_data(FL_OBJECT * ob, int nx, int ny, sp->i = -1; sp->maxi = sp->nx * sp->ny; sp->bdata = 0; - dumb_attributes.colormap = color_map; + dumb_attributes.colormap = fl_state[fl_get_vclass()].colormap; dumb_attributes.closeness = 30000; dumb_attributes.valuemask = XpmColormap | XpmCloseness; if (XCreatePixmapFromData(fl_display, fl_winget(), pdata, @@ -284,7 +279,6 @@ void fl_set_bmtable_pixmap_data(FL_OBJECT * ob, int nx, int ny, XFreePixmap(fl_display, dummy_shapemask); } } - XFlush(fl_display); } } @@ -308,7 +302,7 @@ void fl_set_bmtable_file(FL_OBJECT * ob, int nx, int ny, char const * filename) #else -void fl_set_bmtable_file(FL_OBJECT *, int, int, char const *) +void fl_set_bmtable_file(FL_OBJECT * ob, int nx, int ny, char const * filename) { fprintf(stderr, "Set bmtable file: Sorry, I need X11 release 6 to do " "work!\n"); @@ -320,15 +314,11 @@ void fl_set_bmtable_file(FL_OBJECT *, int, int, char const *) void fl_set_bmtable_pixmap_file(FL_OBJECT *ob, int nx, int ny, char const *filename) { - extern Colormap color_map; + //extern Colormap color_map; BMTABLE_SPEC *sp = (BMTABLE_SPEC *)ob->spec; if (sp) { Pixmap dummy_shapemask = 0; -#if 0 - XpmAttributes dumb_attributes = {0}; -#else - XpmAttributes dumb_attributes; -#endif + XpmAttributes dumb_attributes = { 0 }; sp->nx = nx; sp->ny = ny; sp->bx = FL_abs(ob->bw); @@ -339,7 +329,7 @@ void fl_set_bmtable_pixmap_file(FL_OBJECT *ob, int nx, int ny, char const *filen sp->maxi = sp->nx * sp->ny; sp->bdata = 0; - dumb_attributes.colormap = color_map; + dumb_attributes.colormap = fl_state[fl_get_vclass()].colormap; dumb_attributes.closeness = 30000; dumb_attributes.valuemask = XpmColormap | XpmCloseness; @@ -353,7 +343,7 @@ void fl_set_bmtable_pixmap_file(FL_OBJECT *ob, int nx, int ny, char const *filen XFreePixmap(fl_display, dummy_shapemask); } } - XFlush(fl_display); + //XFlush(fl_display); } }