don't load font unless needed

ulab-original
jsorg71 20 years ago
parent 750f55b6ef
commit 5a149e01ae

@ -216,6 +216,7 @@ struct xrdp_painter* xrdp_painter_create(struct xrdp_wm* wn);
void xrdp_painter_delete(struct xrdp_painter* self); void xrdp_painter_delete(struct xrdp_painter* self);
int xrdp_painter_begin_update(struct xrdp_painter* self); int xrdp_painter_begin_update(struct xrdp_painter* self);
int xrdp_painter_end_update(struct xrdp_painter* self); int xrdp_painter_end_update(struct xrdp_painter* self);
int xrdp_painter_font_needed(struct xrdp_painter* self);
int xrdp_painter_set_clip(struct xrdp_painter* self, int xrdp_painter_set_clip(struct xrdp_painter* self,
int x, int y, int cx, int cy); int x, int y, int cx, int cy);
int xrdp_painter_clr_clip(struct xrdp_painter* self); int xrdp_painter_clr_clip(struct xrdp_painter* self);

@ -233,6 +233,7 @@ int xrdp_bitmap_set_focus(struct xrdp_bitmap* self, int focused)
return 0; return 0;
} }
painter = xrdp_painter_create(self->wm); painter = xrdp_painter_create(self->wm);
xrdp_painter_font_needed(painter);
xrdp_painter_begin_update(painter); xrdp_painter_begin_update(painter);
if (focused) if (focused)
{ {
@ -827,6 +828,7 @@ int xrdp_bitmap_invalidate(struct xrdp_bitmap* self, struct xrdp_rect* rect)
if (self->type == WND_TYPE_BITMAP) /* if 0, bitmap, leave */ if (self->type == WND_TYPE_BITMAP) /* if 0, bitmap, leave */
return 0; return 0;
painter = xrdp_painter_create(self->wm); painter = xrdp_painter_create(self->wm);
xrdp_painter_font_needed(painter);
painter->rop = 0xcc; /* copy */ painter->rop = 0xcc; /* copy */
if (rect == 0) if (rect == 0)
painter->use_clip = 0; painter->use_clip = 0;

@ -73,6 +73,7 @@ struct xrdp_font* xrdp_font_create(struct xrdp_wm* wm)
int datasize; int datasize;
struct xrdp_font_item* f; struct xrdp_font_item* f;
//g_printf("loading font\n");
self = (struct xrdp_font*)g_malloc(sizeof(struct xrdp_font), 1); self = (struct xrdp_font*)g_malloc(sizeof(struct xrdp_font), 1);
self->wm = wm; self->wm = wm;
make_stream(s); make_stream(s);

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save