1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00
This commit is contained in:
kojima
1999-04-16 02:07:45 +00:00
parent c98f229d9c
commit 4b609a4ddc
8 changed files with 51 additions and 19 deletions

3
README
View File

@@ -15,6 +15,8 @@
Matthew Hawkins Matthew Hawkins
]d
Web/FTP Master Web/FTP Master
@@ -348,6 +350,7 @@ Authors
Alfredo K. Kojima <kojima@windowmaker.org> Alfredo K. Kojima <kojima@windowmaker.org>
Dan Pascu <dan@windowmaker.org> Dan Pascu <dan@windowmaker.org>
Matt Hawkins <matt@windowmaker.org> Matt Hawkins <matt@windowmaker.org>
]d <id@windowmaker.org>
Please don't ask us questions before reading the documentation (esp. the 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 FAQ, this file and INSTALL files) and about "cool" things you see in

View File

@@ -2542,6 +2542,7 @@ setClipTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
} }
scr->clip_title_pixel[index] = color->pixel; scr->clip_title_pixel[index] = color->pixel;
#ifdef GRADIENT_CLIP_ARROW
if (index == CLIP_NORMAL) { if (index == CLIP_NORMAL) {
RImage *image; RImage *image;
RColor color1, color2; RColor color1, color2;
@@ -2562,6 +2563,8 @@ setClipTitleColor(WScreen *scr, WDefaultEntry *entry, XColor *color, long index)
RConvertImage(scr->rcontext, image, &scr->clip_arrow_gradient); RConvertImage(scr->rcontext, image, &scr->clip_arrow_gradient);
RDestroyImage(image); RDestroyImage(image);
} }
#endif /* GRADIENT_CLIP_ARROW */
return REFRESH_ICON_TITLE_COLOR; return REFRESH_ICON_TITLE_COLOR;
} }

View File

@@ -318,8 +318,10 @@ paintClipButtons(WAppIcon *clipIcon, Bool lpushed, Bool rpushed)
int pt = CLIP_BUTTON_SIZE*ICON_SIZE/64; int pt = CLIP_BUTTON_SIZE*ICON_SIZE/64;
int tp = ICON_SIZE - pt; int tp = ICON_SIZE - pt;
int as = pt - 15; /* 15 = 5+5+5 */ 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; Bool collapsed = clipIcon->dock->collapsed;
#endif
if (rpushed) { if (rpushed) {
p[0].x = tp+1; 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); XFillPolygon(dpy, win, scr->draw_gc, p, 3, Convex, CoordModeOrigin);
XSetForeground(dpy, scr->draw_gc, scr->black_pixel); XSetForeground(dpy, scr->draw_gc, scr->black_pixel);
} }
if (collapsed) { #ifdef GRADIENT_CLIP_ARROW
gc = scr->clip_title_gc; if (!collapsed) {
} else {
XSetFillStyle(dpy, scr->copy_gc, FillTiled); XSetFillStyle(dpy, scr->copy_gc, FillTiled);
XSetTile(dpy, scr->copy_gc, scr->clip_arrow_gradient); XSetTile(dpy, scr->copy_gc, scr->clip_arrow_gradient);
XSetClipMask(dpy, scr->copy_gc, None); XSetClipMask(dpy, scr->copy_gc, None);
gc = scr->copy_gc; gc = scr->copy_gc;
} }
#endif /* GRADIENT_CLIP_ARROW */
p[0].x = p[3].x = ICON_SIZE-6-as; p[0].x = p[3].x = ICON_SIZE-6-as;
p[0].y = p[3].y = 5; 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); XFillPolygon(dpy, win, scr->draw_gc, p, 3, Convex, CoordModeOrigin);
XDrawLines(dpy, win, scr->draw_gc, p, 4, CoordModeOrigin); XDrawLines(dpy, win, scr->draw_gc, p, 4, CoordModeOrigin);
} else { } else {
#ifdef GRADIENT_CLIP_ARROW
if (!collapsed) if (!collapsed)
XSetTSOrigin(dpy, gc, ICON_SIZE-6-as, 5); XSetTSOrigin(dpy, gc, ICON_SIZE-6-as, 5);
#endif
XFillPolygon(dpy, win, gc, p,3,Convex,CoordModeOrigin); XFillPolygon(dpy, win, gc, p,3,Convex,CoordModeOrigin);
XDrawLines(dpy, win, gc, p,4,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); XFillPolygon(dpy, win, scr->draw_gc, p, 3, Convex, CoordModeOrigin);
XDrawLines(dpy, win, scr->draw_gc, p, 4, CoordModeOrigin); XDrawLines(dpy, win, scr->draw_gc, p, 4, CoordModeOrigin);
} else { } else {
#ifdef GRADIENT_CLIP_ARROW
if (!collapsed) if (!collapsed)
XSetTSOrigin(dpy, gc, 5, ICON_SIZE-6-as); XSetTSOrigin(dpy, gc, 5, ICON_SIZE-6-as);
#endif
XFillPolygon(dpy, win, gc, p,3,Convex,CoordModeOrigin); XFillPolygon(dpy, win, gc, p,3,Convex,CoordModeOrigin);
XDrawLines(dpy, win, gc, p,4,CoordModeOrigin); XDrawLines(dpy, win, gc, p,4,CoordModeOrigin);
} }
#ifdef GRADIENT_CLIP_ARROW
if (!collapsed) if (!collapsed)
XSetFillStyle(dpy, scr->copy_gc, FillSolid); XSetFillStyle(dpy, scr->copy_gc, FillSolid);
#endif
} }

View File

@@ -32,8 +32,10 @@
#include <math.h> #include <math.h>
#include <time.h> #include <time.h>
#include <WUtil.h>
#include <wraster.h> #include <wraster.h>
#include "WindowMaker.h" #include "WindowMaker.h"
#include "GNUstep.h" #include "GNUstep.h"
#include "screen.h" #include "screen.h"
@@ -1434,7 +1436,7 @@ ExecuteShellCommand(WScreen *scr, char *command)
#ifdef HAVE_SETPGID #ifdef HAVE_SETPGID
setpgid(0, 0); setpgid(0, 0);
#endif #endif
execl(shell, shell, "-c", command, NULL); execl(shell, shell, "-c", wstrappend("exec ", command), NULL);
wsyserror("could not execute %s -c %s", shell, command); wsyserror("could not execute %s -c %s", shell, command);
Exit(-1); Exit(-1);
} else if (pid < 0) { } else if (pid < 0) {

View File

@@ -237,7 +237,9 @@ typedef struct _WScreen {
unsigned int geometry_display_height; unsigned int geometry_display_height;
int keymove_tick; int keymove_tick;
#ifdef GRADIENT_CLIP_ARROW
Pixmap clip_arrow_gradient; Pixmap clip_arrow_gradient;
#endif
struct RContext *rcontext; /* wrlib context */ struct RContext *rcontext; /* wrlib context */

View File

@@ -27,7 +27,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <math.h>
#include <time.h> #include <time.h>
#include <wraster.h> #include <wraster.h>
@@ -139,7 +139,14 @@ DoKaboom(WScreen *scr, Window win, int x, int y)
RDestroyImage(icon); RDestroyImage(icon);
RDestroyImage(back); RDestroyImage(back);
} }
#else /* !DEMATERIALIZE_ICON */ #endif /* DEMATERIALIZE_ICON */
#ifdef NORMAL_ICON_KABOOM
void void
DoKaboom(WScreen *scr, Window win, int x, int y) 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); XFreePixmap(dpy, tmp);
} }
#endif /* !DEMATERIALIZE_ICON */ #endif /* NORMAL_ICON_KABOOM */
Pixmap Pixmap

View File

@@ -222,6 +222,11 @@
*/ */
#undef WINDOW_BIRTH_ZOOM #undef WINDOW_BIRTH_ZOOM
/*
* whether arrow drawing in clip buttons should be gradiented
*/
#undef GRADIENT_CLIP_ARROWS
#define TEXTURE_PLUGIN #define TEXTURE_PLUGIN
@@ -567,6 +572,10 @@
#define XKB_OFF "[EN]" #define XKB_OFF "[EN]"
#endif #endif
#ifndef DEMATERIALIZE_ICON
# define NORMAL_ICON_KABOOM
#endif
#if HAVE_LIBINTL_H && I18N #if HAVE_LIBINTL_H && I18N
# include <libintl.h> # include <libintl.h>
# define _(text) gettext(text) # define _(text) gettext(text)