diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-02-14 10:47:49 +0100 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-02-14 15:09:24 -0500 |
| commit | 4c7cc1cfa64bf5722f059eae0528d510c2ae636f (patch) | |
| tree | bf9657e364a76cdcd11ae86c81335b74d4d56fa0 /openbox/openbox.c | |
| parent | 512d93afcc3e7dd5caa42cdb69508964c6338f3d (diff) | |
Introducing the icon cache.
If an icon is the same as one in the cache, then it uses that one.
icons of different sizes (from the same client) are linked together into
one, and resizes of icons are cached and linked to all the various sizes.
so you only need one icon in memory for all your terminals now. ya!
Diffstat (limited to 'openbox/openbox.c')
| -rw-r--r-- | openbox/openbox.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/openbox/openbox.c b/openbox/openbox.c index cb14187c..f2dc7159 100644 --- a/openbox/openbox.c +++ b/openbox/openbox.c @@ -86,17 +86,18 @@ #include <X11/keysym.h> -RrInstance *ob_rr_inst; -RrTheme *ob_rr_theme; -ObMainLoop *ob_main_loop; -Display *ob_display; -gint ob_screen; -gboolean ob_replace_wm = FALSE; -gboolean ob_sm_use = TRUE; -gchar *ob_sm_id = NULL; -gchar *ob_sm_save_file = NULL; -gboolean ob_sm_restore = TRUE; -gboolean ob_debug_xinerama = FALSE; +RrInstance *ob_rr_inst; +RrImageCache *ob_rr_icons; +RrTheme *ob_rr_theme; +ObMainLoop *ob_main_loop; +Display *ob_display; +gint ob_screen; +gboolean ob_replace_wm = FALSE; +gboolean ob_sm_use = TRUE; +gchar *ob_sm_id = NULL; +gchar *ob_sm_save_file = NULL; +gboolean ob_sm_restore = TRUE; +gboolean ob_debug_xinerama = FALSE; static ObState state; static gboolean xsync = FALSE; @@ -182,6 +183,7 @@ gint main(gint argc, gchar **argv) ob_rr_inst = RrInstanceNew(ob_display, ob_screen); if (ob_rr_inst == NULL) ob_exit_with_error(_("Failed to initialize the obrender library.")); + ob_rr_icons = RrImageCacheNew(); XSynchronize(ob_display, xsync); @@ -398,6 +400,7 @@ gint main(gint argc, gchar **argv) XSync(ob_display, FALSE); RrThemeFree(ob_rr_theme); + RrImageCacheUnref(ob_rr_icons); RrInstanceFree(ob_rr_inst); session_shutdown(being_replaced); |
