Cache pixmaps for mouse effects to improve performance

This commit is contained in:
o9000
2016-01-01 04:57:08 +01:00
parent a38b90dbab
commit a6da0186e0
11 changed files with 80 additions and 47 deletions

View File

@@ -162,9 +162,9 @@ void init_execp_panel(void *p)
execp->area.size_mode = LAYOUT_FIXED;
execp->area._resize = resize_execp;
execp->area._get_tooltip_text = execp_get_tooltip;
execp->area.has_mouse_press_effect = execp->area.has_mouse_over_effect =
execp->backend->lclick_command || execp->backend->mclick_command || execp->backend->rclick_command ||
execp->backend->uwheel_command || execp->backend->dwheel_command;
execp->area.has_mouse_press_effect = panel_config.mouse_effects && (execp->area.has_mouse_over_effect =
execp->backend->lclick_command || execp->backend->mclick_command || execp->backend->rclick_command ||
execp->backend->uwheel_command || execp->backend->dwheel_command);
execp->area.resize_needed = TRUE;
execp->area.on_screen = TRUE;
@@ -205,7 +205,7 @@ void execp_default_font_changed()
if (!execp->backend->has_font) {
execp->area.resize_needed = TRUE;
execp->area.redraw_needed = TRUE;
schedule_redraw(&execp->area);
}
}
}