don't load font unless needed
This commit is contained in:
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);
|
||||
int xrdp_painter_begin_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 x, int y, int cx, int cy);
|
||||
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;
|
||||
}
|
||||
painter = xrdp_painter_create(self->wm);
|
||||
xrdp_painter_font_needed(painter);
|
||||
xrdp_painter_begin_update(painter);
|
||||
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 */
|
||||
return 0;
|
||||
painter = xrdp_painter_create(self->wm);
|
||||
xrdp_painter_font_needed(painter);
|
||||
painter->rop = 0xcc; /* copy */
|
||||
if (rect == 0)
|
||||
painter->use_clip = 0;
|
||||
|
@ -73,6 +73,7 @@ struct xrdp_font* xrdp_font_create(struct xrdp_wm* wm)
|
||||
int datasize;
|
||||
struct xrdp_font_item* f;
|
||||
|
||||
//g_printf("loading font\n");
|
||||
self = (struct xrdp_font*)g_malloc(sizeof(struct xrdp_font), 1);
|
||||
self->wm = wm;
|
||||
make_stream(s);
|
||||
|
1108
xrdp/xrdp_painter.c
1108
xrdp/xrdp_painter.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user