mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
Fixed Clip regarding auto raise/lower and autocollapse behavior.
Also rewrote that part of code to be much cleaner.
This commit is contained in:
18
BUGS
18
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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
87
src/dock.c
87
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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user