From 4b609a4ddc30aa0b4a8e5dd04c3309c7074dae17 Mon Sep 17 00:00:00 2001 From: kojima Date: Fri, 16 Apr 1999 02:07:45 +0000 Subject: [PATCH] dunno --- README | 3 +++ src/defaults.c | 3 +++ src/dock.c | 18 ++++++++++++------ src/misc.c | 4 +++- src/screen.h | 2 ++ src/startup.c | 18 +++++++++--------- src/superfluous.c | 13 ++++++++++--- src/wconfig.h.in | 9 +++++++++ 8 files changed, 51 insertions(+), 19 deletions(-) diff --git a/README b/README index f7f74bf2..cb65eba8 100644 --- a/README +++ b/README @@ -15,6 +15,8 @@ Matthew Hawkins + ]d + Web/FTP Master @@ -348,6 +350,7 @@ Authors Alfredo K. Kojima Dan Pascu Matt Hawkins +]d Please don't ask us questions before reading the documentation (esp. the FAQ, this file and INSTALL files) and about "cool" things you see in diff --git a/src/defaults.c b/src/defaults.c index e1c5507a..a5340f79 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -2542,6 +2542,7 @@ setClipTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index) } scr->clip_title_pixel[index] = color->pixel; +#ifdef GRADIENT_CLIP_ARROW if (index == CLIP_NORMAL) { RImage *image; RColor color1, color2; @@ -2562,6 +2563,8 @@ setClipTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index) RConvertImage(scr->rcontext, image, &scr->clip_arrow_gradient); RDestroyImage(image); } +#endif /* GRADIENT_CLIP_ARROW */ + return REFRESH_ICON_TITLE_COLOR; } diff --git a/src/dock.c b/src/dock.c index 9179773e..45188d7b 100644 --- a/src/dock.c +++ b/src/dock.c @@ -318,8 +318,10 @@ paintClipButtons(WAppIcon *clipIcon, Bool lpushed, Bool rpushed) int pt = CLIP_BUTTON_SIZE*ICON_SIZE/64; int tp = ICON_SIZE - pt; int as = pt - 15; /* 15 = 5+5+5 */ - GC gc; + GC gc = scr->clip_title_gc; +#ifdef GRADIENT_CLIP_ARROW Bool collapsed = clipIcon->dock->collapsed; +#endif if (rpushed) { p[0].x = tp+1; @@ -341,14 +343,14 @@ paintClipButtons(WAppIcon *clipIcon, Bool lpushed, Bool rpushed) XFillPolygon(dpy, win, scr->draw_gc, p, 3, Convex, CoordModeOrigin); XSetForeground(dpy, scr->draw_gc, scr->black_pixel); } - if (collapsed) { - gc = scr->clip_title_gc; - } else { +#ifdef GRADIENT_CLIP_ARROW + if (!collapsed) { XSetFillStyle(dpy, scr->copy_gc, FillTiled); XSetTile(dpy, scr->copy_gc, scr->clip_arrow_gradient); XSetClipMask(dpy, scr->copy_gc, None); gc = scr->copy_gc; } +#endif /* GRADIENT_CLIP_ARROW */ p[0].x = p[3].x = ICON_SIZE-6-as; p[0].y = p[3].y = 5; @@ -360,9 +362,10 @@ paintClipButtons(WAppIcon *clipIcon, Bool lpushed, Bool rpushed) XFillPolygon(dpy, win, scr->draw_gc, p, 3, Convex, CoordModeOrigin); XDrawLines(dpy, win, scr->draw_gc, p, 4, CoordModeOrigin); } else { +#ifdef GRADIENT_CLIP_ARROW if (!collapsed) XSetTSOrigin(dpy, gc, ICON_SIZE-6-as, 5); - +#endif XFillPolygon(dpy, win, gc, p,3,Convex,CoordModeOrigin); XDrawLines(dpy, win, gc, p,4,CoordModeOrigin); } @@ -377,14 +380,17 @@ paintClipButtons(WAppIcon *clipIcon, Bool lpushed, Bool rpushed) XFillPolygon(dpy, win, scr->draw_gc, p, 3, Convex, CoordModeOrigin); XDrawLines(dpy, win, scr->draw_gc, p, 4, CoordModeOrigin); } else { +#ifdef GRADIENT_CLIP_ARROW if (!collapsed) XSetTSOrigin(dpy, gc, 5, ICON_SIZE-6-as); - +#endif XFillPolygon(dpy, win, gc, p,3,Convex,CoordModeOrigin); XDrawLines(dpy, win, gc, p,4,CoordModeOrigin); } +#ifdef GRADIENT_CLIP_ARROW if (!collapsed) XSetFillStyle(dpy, scr->copy_gc, FillSolid); +#endif } diff --git a/src/misc.c b/src/misc.c index 02cfc412..772ef145 100644 --- a/src/misc.c +++ b/src/misc.c @@ -32,8 +32,10 @@ #include #include +#include #include + #include "WindowMaker.h" #include "GNUstep.h" #include "screen.h" @@ -1434,7 +1436,7 @@ ExecuteShellCommand(WScreen *scr, char *command) #ifdef HAVE_SETPGID setpgid(0, 0); #endif - execl(shell, shell, "-c", command, NULL); + execl(shell, shell, "-c", wstrappend("exec ", command), NULL); wsyserror("could not execute %s -c %s", shell, command); Exit(-1); } else if (pid < 0) { diff --git a/src/screen.h b/src/screen.h index 3df2a1a9..f115dafd 100644 --- a/src/screen.h +++ b/src/screen.h @@ -237,7 +237,9 @@ typedef struct _WScreen { unsigned int geometry_display_height; int keymove_tick; +#ifdef GRADIENT_CLIP_ARROW Pixmap clip_arrow_gradient; +#endif struct RContext *rcontext; /* wrlib context */ diff --git a/src/startup.c b/src/startup.c index a315658a..3cf178cd 100644 --- a/src/startup.c +++ b/src/startup.c @@ -160,18 +160,18 @@ extern void NotifyDeadProcess(pid_t pid, unsigned char status); typedef struct _CrashPanel { WMWindow *win; /* main window */ - WMLabel *iconL; /* application icon */ - WMLabel *nameL; /* title of panel */ + WMLabel *iconL; /* application icon */ + WMLabel *nameL; /* title of panel */ - WMFrame *sepF; /* separator frame */ - - WMLabel *noteL; /* Title of note */ - WMLabel *note2L; /* body of note with what happened */ + WMFrame *sepF; /* separator frame */ + + WMLabel *noteL; /* Title of note */ + WMLabel *note2L; /* body of note with what happened */ - WMFrame *whatF; /* "what to do next" frame */ - WMPopUpButton *whatP; /* action selection popup button */ + WMFrame *whatF; /* "what to do next" frame */ + WMPopUpButton *whatP; /* action selection popup button */ - WMButton *okB; /* ok button */ + WMButton *okB; /* ok button */ Bool done; /* if finished with this dialog */ int action; /* what to do after */ diff --git a/src/superfluous.c b/src/superfluous.c index 3596650b..5fad30df 100644 --- a/src/superfluous.c +++ b/src/superfluous.c @@ -27,7 +27,7 @@ #include #include - +#include #include #include @@ -139,7 +139,14 @@ DoKaboom(WScreen *scr, Window win, int x, int y) RDestroyImage(icon); RDestroyImage(back); } -#else /* !DEMATERIALIZE_ICON */ +#endif /* DEMATERIALIZE_ICON */ + + + + + + +#ifdef NORMAL_ICON_KABOOM void DoKaboom(WScreen *scr, Window win, int x, int y) { @@ -284,7 +291,7 @@ DoKaboom(WScreen *scr, Window win, int x, int y) XFreePixmap(dpy, tmp); } -#endif /* !DEMATERIALIZE_ICON */ +#endif /* NORMAL_ICON_KABOOM */ Pixmap diff --git a/src/wconfig.h.in b/src/wconfig.h.in index 43bf8ce0..1c59284c 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -222,6 +222,11 @@ */ #undef WINDOW_BIRTH_ZOOM +/* + * whether arrow drawing in clip buttons should be gradiented + */ +#undef GRADIENT_CLIP_ARROWS + #define TEXTURE_PLUGIN @@ -567,6 +572,10 @@ #define XKB_OFF "[EN]" #endif +#ifndef DEMATERIALIZE_ICON +# define NORMAL_ICON_KABOOM +#endif + #if HAVE_LIBINTL_H && I18N # include # define _(text) gettext(text) -- 2.11.4.GIT