diff --git a/BUGS b/BUGS index 13b1e079..cd37cea3 100644 --- a/BUGS +++ b/BUGS @@ -2,16 +2,18 @@ requests that, through the ICCCM 2.0 manager selection stuff - the app menu does not update after a style/theme change without restart. - stacking code is buggy (or XFree is buggy) +- after restart focus is losed or switched to another window. May be related + to the one above. - save session doesnt work on some platforms (Alpha and Sparc) - texture pixmaps are being incorrectly freed somewhere. Either -fix bug (to support broken MetroX servers) or remove all useless references -to the Pixmap (to save memory and drop bug compatibility). + fix bug (to support broken MetroX servers) or remove all useless references + to the Pixmap (to save memory and drop bug compatibility). - host information is not saved/honored by the dock or save session stuff. -It should at least check if the host is the local machine and only save it -in the session/allow docking it if yes. + It should at least check if the host is the local machine and only save it + in the session/allow docking it if yes. - the SHELL environment variable support in the apps menu was removed -because of a problem with tcsh. If ~/.tcshrc contains "stty erase ^H", -it will block and the cmd will not be executed. + because of a problem with tcsh. If ~/.tcshrc contains "stty erase ^H", + it will block and the cmd will not be executed. - mouse grab being done in client window (in wWindowResetMouseGrabs()) -instead of the frame window. If grab is done in frame, titlebar buttons -dont work well + instead of the frame window. If grab is done in frame, titlebar buttons + dont work well diff --git a/ChangeLog b/ChangeLog index 511278ba..7b7ecbe6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,8 +22,12 @@ Changes since version 0.51.2: - remember window shortcuts after restart - change edge resistance to account for panels and stuffs - narrower menus -- fixed auto raise/lower behaviour of clip for docked icons that have their - own window +- fixed auto raise/lower behaviour of clip for docked applications that have + their own window (applets). +- cleaned up Clip's autocollapsing code, and made it to be similar to the + auto raise/lower code (much cleaner). +- fixed a race condition in Clip behavior when changing workspaces, if set to + autocollapsing. Changes since version 0.51.1: diff --git a/Makefile.in b/Makefile.in index 64066afa..43ea29c1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -104,7 +104,7 @@ mkinstalldirs src/config.h.in src/stamp-h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WINGs/Resources/Makefile.in b/WINGs/Resources/Makefile.in index c4efd06b..6451bfc8 100644 --- a/WINGs/Resources/Makefile.in +++ b/WINGs/Resources/Makefile.in @@ -103,7 +103,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WPrefs.app/po/Makefile.in b/WPrefs.app/po/Makefile.in index 183659e8..d40cc2a7 100644 --- a/WPrefs.app/po/Makefile.in +++ b/WPrefs.app/po/Makefile.in @@ -113,7 +113,7 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WPrefs.app/tiff/Makefile.in b/WPrefs.app/tiff/Makefile.in index 2dc7de82..71cfecfd 100644 --- a/WPrefs.app/tiff/Makefile.in +++ b/WPrefs.app/tiff/Makefile.in @@ -104,7 +104,7 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WPrefs.app/xpm/Makefile.in b/WPrefs.app/xpm/Makefile.in index 1a1ebfcd..eb4019b5 100644 --- a/WPrefs.app/xpm/Makefile.in +++ b/WPrefs.app/xpm/Makefile.in @@ -104,7 +104,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WindowMaker/Backgrounds/Makefile.in b/WindowMaker/Backgrounds/Makefile.in index 7989ec54..31a9eb6d 100755 --- a/WindowMaker/Backgrounds/Makefile.in +++ b/WindowMaker/Backgrounds/Makefile.in @@ -103,7 +103,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WindowMaker/Defaults/Makefile.in b/WindowMaker/Defaults/Makefile.in index 3fc71515..cb8beac7 100755 --- a/WindowMaker/Defaults/Makefile.in +++ b/WindowMaker/Defaults/Makefile.in @@ -105,7 +105,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WindowMaker/IconSets/Makefile.in b/WindowMaker/IconSets/Makefile.in index 31104865..689abe87 100755 --- a/WindowMaker/IconSets/Makefile.in +++ b/WindowMaker/IconSets/Makefile.in @@ -105,7 +105,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WindowMaker/Icons/Makefile.in b/WindowMaker/Icons/Makefile.in index da69a963..181b4606 100755 --- a/WindowMaker/Icons/Makefile.in +++ b/WindowMaker/Icons/Makefile.in @@ -104,7 +104,7 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WindowMaker/Pixmaps/Makefile.in b/WindowMaker/Pixmaps/Makefile.in index a8d56197..d328f890 100755 --- a/WindowMaker/Pixmaps/Makefile.in +++ b/WindowMaker/Pixmaps/Makefile.in @@ -104,7 +104,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WindowMaker/Styles/Makefile.in b/WindowMaker/Styles/Makefile.in index 7b887fa8..e21e2e49 100755 --- a/WindowMaker/Styles/Makefile.in +++ b/WindowMaker/Styles/Makefile.in @@ -104,7 +104,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/WindowMaker/Themes/Makefile.in b/WindowMaker/Themes/Makefile.in index 3e780943..ecc620ab 100755 --- a/WindowMaker/Themes/Makefile.in +++ b/WindowMaker/Themes/Makefile.in @@ -105,7 +105,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/src/dock.c b/src/dock.c index 42a9c484..3df19350 100644 --- a/src/dock.c +++ b/src/dock.c @@ -139,6 +139,7 @@ Bool moveIconBetweenDocks(WDock *src, WDock *dest, WAppIcon *icon, int x, int y) static void clipEnterNotify(WObjDescriptor *desc, XEvent *event); static void clipLeaveNotify(WObjDescriptor *desc, XEvent *event); static void clipAutoCollapse(void *cdata); +static void clipAutoExpand(void *cdata); static void launchDockedApplication(WAppIcon *btn); static void clipAutoLower(void *cdata); @@ -682,10 +683,10 @@ toggleAutoCollapseCallback(WMenu *menu, WMenuEntry *entry) dock = (WDock*) entry->clientdata; dock->auto_collapse = !dock->auto_collapse; - if (dock->auto_collapse_magic) { - WMDeleteTimerHandler(dock->auto_collapse_magic); - dock->auto_collapse_magic = NULL; - } + //if (dock->auto_collapse_magic) { + // WMDeleteTimerHandler(dock->auto_collapse_magic); + // dock->auto_collapse_magic = NULL; + //} entry->flags.indicator_on = ((WDock*)entry->clientdata)->auto_collapse; @@ -3028,10 +3029,20 @@ wClipUpdateForWorkspaceChange(WScreen *scr, int workspace) WDock *old_clip = scr->workspaces[scr->current_workspace]->clip; wDockHideIcons(old_clip); - if (old_clip->auto_raise_lower) + if (old_clip->auto_raise_lower) { + if (old_clip->auto_raise_magic) { + WMDeleteTimerHandler(old_clip->auto_raise_magic); + old_clip->auto_raise_magic = NULL; + } wDockLower(old_clip); - if (old_clip->auto_collapse && !old_clip->collapsed) + } + if (old_clip->auto_collapse) { + if (old_clip->auto_expand_magic) { + WMDeleteTimerHandler(old_clip->auto_expand_magic); + old_clip->auto_expand_magic = NULL; + } old_clip->collapsed = 1; + } wDockShowIcons(scr->workspaces[workspace]->clip); } if (scr->flags.clip_balloon_mapped) @@ -3901,16 +3912,28 @@ clipEnterNotify(WObjDescriptor *desc, XEvent *event) if (!dock || dock->type!=WM_CLIP) return; + /* The auto raise/lower code */ if (dock->auto_lower_magic) { WMDeleteTimerHandler(dock->auto_lower_magic); dock->auto_lower_magic = NULL; } - if (dock->auto_raise_lower) { + if (dock->auto_raise_lower && !dock->auto_raise_magic) { dock->auto_raise_magic = WMAddTimerHandler(AUTO_RAISE_DELAY, clipAutoRaise, (void *)dock); } + /* The auto expand/collapse code */ + if (dock->auto_collapse_magic) { + WMDeleteTimerHandler(dock->auto_collapse_magic); + dock->auto_collapse_magic = NULL; + } + if (dock->auto_collapse && !dock->auto_expand_magic) { + dock->auto_expand_magic = WMAddTimerHandler(AUTO_EXPAND_DELAY, + clipAutoExpand, + (void *)dock); + } + if (btn->xindex == 0 && btn->yindex == 0) showClipBalloon(dock, dock->screen_ptr->current_workspace); else { @@ -3919,15 +3942,6 @@ clipEnterNotify(WObjDescriptor *desc, XEvent *event) dock->screen_ptr->flags.clip_balloon_mapped = 0; } } - if (dock->auto_collapse) { - if (dock->auto_collapse_magic) { - WMDeleteTimerHandler(dock->auto_collapse_magic); - dock->auto_collapse_magic = NULL; - } - - if (dock->collapsed) - toggleCollapsed(dock); - } } @@ -3961,22 +3975,20 @@ clipLeave(WDock *dock) WMDeleteTimerHandler(dock->auto_raise_magic); dock->auto_raise_magic = NULL; } - if (dock->auto_raise_lower) { + if (dock->auto_raise_lower && !dock->auto_lower_magic) { dock->auto_lower_magic = WMAddTimerHandler(AUTO_LOWER_DELAY, clipAutoLower, (void *)dock); } - if (dock->auto_collapse) { - if (dock->auto_collapse_magic) { - WMDeleteTimerHandler(dock->auto_collapse_magic); - dock->auto_collapse_magic = NULL; - } - if (!dock->collapsed) { - dock->auto_collapse_magic = WMAddTimerHandler(AUTO_COLLAPSE_DELAY, - clipAutoCollapse, - (void *)dock); - } + if (dock->auto_expand_magic) { + WMDeleteTimerHandler(dock->auto_expand_magic); + dock->auto_expand_magic = NULL; + } + if (dock->auto_collapse && !dock->auto_collapse_magic) { + dock->auto_collapse_magic = WMAddTimerHandler(AUTO_COLLAPSE_DELAY, + clipAutoCollapse, + (void *)dock); } } @@ -4003,13 +4015,30 @@ clipAutoCollapse(void *cdata) if (dock->type!=WM_CLIP || !dock->auto_collapse) return; - if (!dock->collapsed && dock->auto_collapse_magic!=NULL) { - toggleCollapsed(dock); + if (dock->auto_collapse_magic) { + dock->collapsed = 1; + wDockHideIcons(dock); } dock->auto_collapse_magic = NULL; } +static void +clipAutoExpand(void *cdata) +{ + WDock *dock = (WDock *)cdata; + + if (dock->type!=WM_CLIP || !dock->auto_collapse) + return; + + if (dock->auto_expand_magic) { + dock->collapsed = 0; + wDockShowIcons(dock); + } + dock->auto_expand_magic = NULL; +} + + static void clipAutoLower(void *cdata) { diff --git a/src/dock.h b/src/dock.h index ff457b48..9add37c4 100644 --- a/src/dock.h +++ b/src/dock.h @@ -43,6 +43,7 @@ typedef struct WDock { #define EXTENDED_DOCK WM_CLIP int type; + WMagicNumber auto_expand_magic; WMagicNumber auto_collapse_magic; WMagicNumber auto_raise_magic; WMagicNumber auto_lower_magic; diff --git a/src/texture.c b/src/texture.c index 05b2cba1..ea495251 100644 --- a/src/texture.c +++ b/src/texture.c @@ -635,9 +635,9 @@ bevelImage(RImage *image, int relief) case WREL_MENUENTRY: color.red = color.green = color.blue = 80; color.alpha = 0; - /* + /**/ ROperateLine(image, RAddOperation, 1, 0, width-2, 0, &color); - */ + /**/ ROperateLine(image, RAddOperation, 0, 0, 0, height-1, &color); @@ -646,14 +646,14 @@ bevelImage(RImage *image, int relief) ROperateLine(image, RSubtractOperation, width-1, 0, width-1, height-1, &color); - /* + /**/ ROperateLine(image, RSubtractOperation, 1, height-2, width-2, height-2, &color); color.red = color.green = color.blue = 0; color.alpha = 255; RDrawLine(image, 0, height-1, width-1, height-1, &color); - */ + /**/ break; } diff --git a/src/wconfig.h.in b/src/wconfig.h.in index 6d129ad0..02c657e9 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -426,12 +426,16 @@ /* Delay (in ms) after which the clip will autocollapse when leaved */ #define AUTO_COLLAPSE_DELAY 1000 +/* Delay (in ms) after which the clip will autoexpand when entered. + * Set this to zero if you want instant expanding. */ +#define AUTO_EXPAND_DELAY 600 + /* Delay (in ms) after which the clip will be lowered when leaved */ #define AUTO_LOWER_DELAY 1000 /* Delay (in ms) after which the clip will be raised when entered. * Set this to zero if you want instant raise. */ -#define AUTO_RAISE_DELAY 650 +#define AUTO_RAISE_DELAY 600 /* Max. number of icons the clip can have */ diff --git a/src/window.c b/src/window.c index 8fe089e0..2860e0f1 100644 --- a/src/window.c +++ b/src/window.c @@ -1652,7 +1652,7 @@ wWindowConstrainSize(WWindow *wwin, int *nwidth, int *nheight) } } else { width = (height * sizeh->min_aspect.x) / sizeh->min_aspect.y; - if (width > sizeh->min_width) { + if (width < sizeh->min_width) { width = sizeh->min_width; height = (width*sizeh->min_aspect.y) / sizeh->min_aspect.x; }