Hi, I'm currently working on packaging LyX 1.4.5.1 for Zaurus (Cacko ROM, IPKG), and, using the XForms frontend, I get surprising low performance, in particular when typing text very quickly.
I investigate the problem, and it appears that, for each character typed, LyX re-set the pixmap of ALL toolbar buttons, even if the new pixmap is the same than the old one. I fixed this problem (see the attached patch), and LyX suddenly becomes much much faster :-) Jiba
diff -ruN ./lyx-1.4.5.1.orig/src/frontends/xforms/XFormsToolbar.C ./lyx-1.4.5.1/src/frontends/xforms/XFormsToolbar.C --- ./lyx-1.4.5.1.orig/src/frontends/xforms/XFormsToolbar.C 2004-11-16 21:41:38.000000000 +0100 +++ ./lyx-1.4.5.1/src/frontends/xforms/XFormsToolbar.C 2007-12-23 23:49:17.505146282 +0100 @@ -403,17 +403,21 @@ p->generateInactivePixmaps(); if (status.enabled()) { + if (p->unused_pixmap != p->inactive_pixmap) { fl_activate_object(p->icon); fl_set_pixmap_pixmap(p->icon, p->active_pixmap, p->mask); p->unused_pixmap = p->inactive_pixmap; + } } else { + if (p->unused_pixmap != p->active_pixmap) { fl_deactivate_object(p->icon); fl_set_pixmap_pixmap(p->icon, p->inactive_pixmap, p->mask); p->unused_pixmap = p->active_pixmap; + } } }
signature.asc
Description: PGP signature