Here is an updated patch with no WConf settings.
>From 91577a672f77f559c6606d9c3ba34a795339002b Mon Sep 17 00:00:00 2001 From: David Couzelis <[email protected]> Date: Thu, 12 Jan 2012 20:36:52 -0500 Subject: [PATCH] Prevent dock icons from being removed because of a change in resolution. --- src/dock.c | 12 +++--------- src/wconfig.h.in | 4 ++-- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/dock.c b/src/dock.c index 9d74b49..96d8c61 100644 --- a/src/dock.c +++ b/src/dock.c @@ -1080,22 +1080,16 @@ WDock *wDockCreate(WScreen * scr, int type) { WDock *dock; WAppIcon *btn; - int icon_count; make_keys(); dock = wmalloc(sizeof(WDock)); memset(dock, 0, sizeof(WDock)); - if (type == WM_CLIP) - icon_count = CLIP_MAX_ICONS; - else - icon_count = scr->scr_height / wPreferences.icon_size; - - dock->icon_array = wmalloc(sizeof(WAppIcon *) * icon_count); - memset(dock->icon_array, 0, sizeof(WAppIcon *) * icon_count); + dock->max_icons = DOCK_MAX_ICONS; - dock->max_icons = icon_count; + dock->icon_array = wmalloc(sizeof(WAppIcon *) * dock->max_icons); + memset(dock->icon_array, 0, sizeof(WAppIcon *) * dock->max_icons); btn = mainIconCreate(scr, type); diff --git a/src/wconfig.h.in b/src/wconfig.h.in index 5008ac6..5b70e53 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -325,8 +325,8 @@ * Set this to zero if you want instant raise. */ #define AUTO_RAISE_DELAY 600 -/* Max. number of icons the clip can have */ -#define CLIP_MAX_ICONS 32 +/* Max. number of icons the dock and clip can have */ +#define DOCK_MAX_ICONS 32 /* blink interval when invoking a menu item */ #define MENU_BLINK_DELAY 60000 -- 1.7.8.3
