This commit is contained in:
purplerain 2024-10-06 22:00:57 +00:00
parent 50c8bafd9f
commit ac06c97e30
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
820 changed files with 467502 additions and 386453 deletions

View file

@ -1,4 +1,4 @@
/* FvwmBacker Module for Fvwm.
/* FvwmBacker Module for Fvwm.
*
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
* Mike_Finger@atk.com)
@ -18,7 +18,7 @@
* own risk. Permission to use this program for any purpose is given,
* as long as the copyright is kept intact. */
#include "../../libs/fvwmlib.h"
#include "../../libs/fvwmlib.h"
/* Function Prototypes */

View file

@ -1,4 +1,4 @@
/* FvwmWinList Module for Fvwm.
/* FvwmWinList Module for Fvwm.
*
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
* Mike_Finger@atk.com)

View file

@ -1,4 +1,4 @@
/* FvwmBacker Module for Fvwm.
/* FvwmBacker Module for Fvwm.
*
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
* Mike_Finger@atk.com)

View file

@ -37,5 +37,5 @@ Tells the module to display for \fIsec\fP seconds instead of default of 3.
.SH AUTHOR
Robert Nation
Robert Nation

View file

@ -8,7 +8,7 @@
* Copyright 1993, Robert Nation. No guarantees or warantees or anything
* are provided or implied in any way whatsoever. Use this program at your
* own risk. Permission to use this program for any purpose is given,
* as long as the copyright is kept intact.
* as long as the copyright is kept intact.
*/
/***********************************************************************
@ -93,22 +93,22 @@ void CreateIconWindow(button_info *b)
XGCValues gcv;
unsigned long gcm=0;
Pixmap temp;
gcm = GCForeground | GCBackground;
gcv.background=buttonBack(b);
gcv.foreground=buttonFore(b);
XChangeGC(Dpy,NormalGC,gcm,&gcv);
#ifdef SHAPE
XShapeCombineMask(Dpy,b->IconWin,ShapeBounding,0,0,
b->icon->picture,ShapeSet);
#endif
temp = XCreatePixmap(Dpy,Root,b->icon->width,
b->icon->height,d_depth);
XCopyPlane(Dpy,b->icon->picture,temp,NormalGC,
0,0,b->icon->width,b->icon->height,0,0,1);
XSetWindowBackgroundPixmap(Dpy,b->IconWin,temp);
XFreePixmap(Dpy,temp);
/* We won't use the icon pixmap anymore... but we still need it for
@ -177,7 +177,7 @@ void ConfigureIconWindow(button_info *b)
yoff=(BH-(h+font->ascent+font->descent))>>1;
else
yoff=(BH-h)>>1;
if(xoff < framew+xpad)
xoff = framew+xpad;
if(yoff < framew+ypad)
@ -188,7 +188,7 @@ void ConfigureIconWindow(button_info *b)
XMoveResizeWindow(Dpy, b->IconWin, x,y,w,h);
/* Doesn't this belong above?
/* Doesn't this belong above?
#ifdef XPM
#ifdef SHAPE
if (b->icon->mask!=None)
@ -205,5 +205,5 @@ void ConfigureIconWindow(button_info *b)
XSetWindowBackgroundPixmap(Dpy,b->IconWin,b->icon->picture);
*/
#endif
#endif
}

View file

@ -58,7 +58,7 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
baseWidth = 1;
baseHeight = 1;
}
if(hints->flags & PMaxSize)
{
maxWidth = hints->max_width;
@ -79,24 +79,24 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
xinc = 1;
yinc = 1;
}
/*
* First, clamp to min and max values
*/
if (dwidth < minWidth) dwidth = minWidth;
if (dheight < minHeight) dheight = minHeight;
if (dwidth > maxWidth) dwidth = maxWidth;
if (dheight > maxHeight) dheight = maxHeight;
/*
* Second, fit to base + N * inc
*/
dwidth = ((dwidth - baseWidth) / xinc * xinc) + baseWidth;
dheight = ((dheight - baseHeight) / yinc * yinc) + baseHeight;
/*
* Third, adjust for aspect ratio
*/
@ -116,16 +116,16 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
*
* minAspectX * dheight > minAspectY * dwidth
* maxAspectX * dheight < maxAspectY * dwidth
*
*
*/
if (hints->flags & PAspect)
{
if (minAspectX * dheight > minAspectY * dwidth)
{
delta = makemult(minAspectX * dheight / minAspectY - dwidth,
xinc);
if (dwidth + delta <= maxWidth)
if (dwidth + delta <= maxWidth)
dwidth += delta;
else
{
@ -134,7 +134,7 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
if (dheight - delta >= minHeight) dheight -= delta;
}
}
if (maxAspectX * dheight < maxAspectY * dwidth)
{
delta = makemult(dwidth * maxAspectY / maxAspectX - dheight,
@ -149,7 +149,7 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
}
}
}
*widthp = dwidth;
*heightp = dheight;
return;

View file

@ -40,7 +40,7 @@ void DumpButtons(button_info *b)
else
fprintf(stderr,"0x%lx(%ix%i@,0x%04lx): ",(unsigned long)b,
b->BWidth,b->BHeight,b->flags);
if(b->flags&b_Font)
fprintf(stderr,"Font(%s,0x%lx) ",b->font_string,(unsigned long)b->font);
if(b->flags&b_Padding)
@ -267,7 +267,7 @@ void SaveButtons(button_info *b)
fprintf(stderr,")");
}
fprintf(stderr,"\n");
if(b->flags&b_Container)
{
i=0;

View file

@ -1,9 +1,9 @@
#include "../../libs/fvwmlib.h"
#include "../../libs/fvwmlib.h"
/*************************************************************************
*
* Subroutine Prototypes
*
*
*************************************************************************/
void DeadPipe(int nonsense);

View file

@ -3,14 +3,14 @@
.SH NAME
FvwmForm - input form module for Fvwm
.SH SYNOPSIS
FvwmForm must be spawned by Fvwm.
FvwmForm must be spawned by Fvwm.
It will not work from the command line.
.SH DESCRIPTION
FvwmForm provides a mechanism to get user input and act accordingly.
This is achieved by means of a form that the user can fill out,
and from which the user can select actions he wants Fvwm to take.
A form consists of five types of items:
text labels,
text labels,
single-line text inputs,
mutually-exclusive selections,
multiple-choice selections,
@ -162,7 +162,7 @@ FvwmForm will assure only one is selected.
.TP 4
.B *FvwmFormButton \fItype\fP "\fIstring\fP" [\fIkey\fP]
This option specifies an action button.
The button has \fIstring\fP as a label,
The button has \fIstring\fP as a label,
and excutes a set of Fvwm \fIcommand\fP when it is activated.
The commands should be specified using the *FvwmFormCommand option.
@ -180,7 +180,7 @@ continue
FvwmForm will resume execution after sending the commands.
.TP 16
restart
After sending the commands,
After sending the commands,
FvwmForm will reset all the values to the initial ones,
and then resume execution.
.TP 16
@ -263,7 +263,7 @@ This example simulates the mwm way of confirming logout.
Style "QuitVerify" NoTitle, NoHandles, BorderWidth 3
.SH EXAMPLE 2 - Remote Login
This example lets the user type in a hostname,
This example lets the user type in a hostname,
and optionally a user name on the remote machine,
and opens an xterm window from the remote host.

View file

@ -11,7 +11,7 @@ FvwmIconBox is spawned by fvwm, so no command line invocation will work.
.SH DESCRIPTION
The FvwmIconBox module provides an icon manager. The user can do
operations, like iconify and deiconify, for each icon shown in the
module via mouse and keyboard.
module via mouse and keyboard.
FvwmIconBox reads the same .fvwmrc file as fvwm reads when it starts up,
and looks for lines similar to "*FvwmIconBoxFore green".

View file

@ -67,22 +67,22 @@ void CreateIconWindow(struct icon_info *item)
/* pixmap */
if (max_icon_height != 0){
item->icon_pixmap_w =
XCreateWindow(dpy, icon_win, 0, 0,
item->icon_pixmap_w =
XCreateWindow(dpy, icon_win, 0, 0,
max(max_icon_width,item->icon_w),
max(max_icon_height,item->icon_h),
max(max_icon_height,item->icon_h),
0,CopyFromParent,CopyFromParent,
CopyFromParent,valuemask,&attributes);
CopyFromParent,valuemask,&attributes);
XSelectInput(dpy, item->icon_pixmap_w, ICON_EVENTS);
}
/* label */
item->IconWin =
XCreateWindow(dpy, icon_win, 0, 0,
XCreateWindow(dpy, icon_win, 0, 0,
max_icon_width,
max_icon_height + 10,
max_icon_height + 10,
0,CopyFromParent,CopyFromParent,
CopyFromParent,valuemask,&attributes);
CopyFromParent,valuemask,&attributes);
XSelectInput(dpy, item->IconWin, ICON_EVENTS);
}
@ -104,10 +104,10 @@ void ConfigureIconWindow(struct icon_info *item)
if (item->icon_file != NULL && (!(item->extra_flags & DEFAULTICON) || !(item->wmhints &&
item->wmhints->flags &
(IconPixmapHint|IconWindowHint)))){
(IconPixmapHint|IconWindowHint)))){
/* monochrome bitmap */
GetBitmapFile(item);
/* color pixmap */
if((item->icon_w == 0)&&(item->icon_h == 0))
GetXPMFile(item);
@ -117,7 +117,7 @@ void ConfigureIconWindow(struct icon_info *item)
for his patch to handle icon windows */
if((item->icon_h == 0)&&(item->icon_w == 0)&&
(item->wmhints) && (item->wmhints->flags & IconWindowHint))
GetIconWindow(item);
GetIconWindow(item);
/* icon bitmap from the application */
if((item->icon_h == 0)&&(item->icon_w == 0)&&
@ -128,7 +128,7 @@ void ConfigureIconWindow(struct icon_info *item)
#ifdef SHAPE
if (item->icon_maskPixmap != None)
{
XShapeCombineMask(dpy, item->icon_pixmap_w, ShapeBounding,
XShapeCombineMask(dpy, item->icon_pixmap_w, ShapeBounding,
hr, hr, item->icon_maskPixmap, ShapeSet);
}
#endif
@ -137,7 +137,7 @@ void ConfigureIconWindow(struct icon_info *item)
if(item->icon_depth == -1)
{
temp = item->iconPixmap;
item->iconPixmap =
item->iconPixmap =
XCreatePixmap(dpy, Root, item->icon_w,
item->icon_h,d_depth);
XCopyPlane(dpy,temp,item->iconPixmap,NormalGC,
@ -148,11 +148,11 @@ void ConfigureIconWindow(struct icon_info *item)
void AdjustIconWindow(struct icon_info *item, int n)
{
int x=0,y=0,w,h,h2,h3,w3;
w3 = w = max_icon_width + icon_relief;
h3 = h2 = max_icon_height + icon_relief;
h = h2 + 6 + font->ascent + font->descent;
switch (primary){
case LEFT:
case RIGHT:
@ -181,7 +181,7 @@ void AdjustIconWindow(struct icon_info *item, int n)
default:
break;
}
item->x = x;
item->y = y;
@ -208,10 +208,10 @@ void GetBitmapFile(struct icon_info *item)
path = findIconFile(item->icon_file, iconPath,R_OK);
if(path == NULL)return;
if(XReadBitmapFile (dpy, Root,path,(unsigned int *)&item->icon_w,
if(XReadBitmapFile (dpy, Root,path,(unsigned int *)&item->icon_w,
(unsigned int *)&item->icon_h,
&item->iconPixmap,
(int *)&HotX,
(int *)&HotX,
(int *)&HotY) != BitmapSuccess)
{
item->icon_w = 0;
@ -242,7 +242,7 @@ void GetXPMFile(struct icon_info *item)
XpmImage my_image;
path = findIconFile(item->icon_file, pixmapPath,R_OK);
if(path == NULL)return;
if(path == NULL)return;
XGetWindowAttributes(dpy,Root,&root_attr);
xpm_attributes.colormap = root_attr.colormap;
@ -257,7 +257,7 @@ void GetXPMFile(struct icon_info *item)
color_reduce_pixmap(&my_image,save_color_limit);
rc = XpmCreatePixmapFromXpmImage(dpy,Root, &my_image,
&item->iconPixmap,
&item->icon_maskPixmap,
&item->icon_maskPixmap,
&xpm_attributes);
if (rc != XpmSuccess) {
fprintf(stderr, "Problem creating pixmap from image, rc %d\n", rc);
@ -284,9 +284,9 @@ void GetIconWindow(struct icon_info *item)
unsigned int bw;
Window Junkroot;
if(!XGetGeometry(dpy, item->wmhints->icon_window, &Junkroot,
&x, &y, (unsigned int *)&item->icon_w,
(unsigned int *)&item->icon_h,
if(!XGetGeometry(dpy, item->wmhints->icon_window, &Junkroot,
&x, &y, (unsigned int *)&item->icon_w,
(unsigned int *)&item->icon_h,
&bw, (unsigned int *)&item->icon_depth))
return;
@ -301,7 +301,7 @@ void GetIconWindow(struct icon_info *item)
}
#endif
item->icon_w = min(max_icon_width + icon_relief, item->icon_w);
item->icon_w = min(max_icon_width + icon_relief, item->icon_w);
item->icon_h = min(max_icon_height + icon_relief, item->icon_h);
XReparentWindow(dpy, item->icon_pixmap_w, icon_win, 0, 0);
@ -324,7 +324,7 @@ void GetIconBitmap(struct icon_info *item)
GC gc;
if (!XGetGeometry(dpy, item->wmhints->icon_pixmap, &Junkroot, &x, &y,
(unsigned int *)&item->icon_w,
(unsigned int *)&item->icon_w,
(unsigned int *)&item->icon_h, &bw, &depth))
return;
@ -343,7 +343,7 @@ void GetIconBitmap(struct icon_info *item)
item->icon_h = min(max_icon_height, item->icon_h);
item->iconPixmap = XCreatePixmap(dpy, Root, item->icon_w,
item->icon_h, depth);
item->icon_h, depth);
gc = XCreateGC(dpy, item->iconPixmap, 0, NULL);
XCopyArea(dpy, item->wmhints->icon_pixmap, item->iconPixmap,
gc, 0, 0, item->icon_w, item->icon_h, 0, 0);
@ -372,16 +372,16 @@ Bool GetBackPixmap(void)
else{
IconwinPixmap = XCreatePixmap(dpy, Root, w, h, d_depth);
XCopyPlane(dpy, tmp_bitmap, IconwinPixmap, NormalGC, 0, 0, w, h,
0, 0, 1);
0, 0, 1);
XFreePixmap(dpy, tmp_bitmap);
}
free(path);
}
#ifdef XPM
if ( w == 0 && h == 0 && (path = findIconFile(IconwinPixmapFile,
pixmapPath,R_OK)) != NULL)
{
{
XGetWindowAttributes(dpy,Root,&root_attr);
xpm_attributes.colormap = root_attr.colormap;
xpm_attributes.closeness = 40000; /* same closeness used elsewhere */

View file

@ -120,7 +120,7 @@ static void set_draw_mode (WinManager *man, int flag)
else if (man->we_are_drawing && !flag) {
the_manager = man;
num = accumulate_walk_hashtab (count_nonsticky_in_hashtab);
ConsoleDebug (FVWM, "SetDrawMode on 0x%lx, num = %d\n",
ConsoleDebug (FVWM, "SetDrawMode on 0x%lx, num = %d\n",
(unsigned long)man, num);
if (num == 0)
@ -383,9 +383,9 @@ static void mini_icon (FvwmPacketBody *body)
body->mini_icon_data.width, body->mini_icon_data.height);
ConsoleDebug (FVWM, "mini_icon: 0x%lx 0x%lx %dx%dx%d\n",
ConsoleDebug (FVWM, "mini_icon: 0x%lx 0x%lx %dx%dx%d\n",
(unsigned long) win->pic.picture,
(unsigned long) win->pic.mask,
(unsigned long) win->pic.mask,
win->pic.width, win->pic.height, win->pic.depth);
}
#endif

View file

@ -65,7 +65,7 @@ static int num_builtins = sizeof (builtin_functions) / sizeof (FunctionType);
/************************************************************************/
struct charstring
struct charstring
{
char key;
int value;
@ -133,19 +133,19 @@ void print_args (int numargs, BuiltinArg *args)
break;
case ButtonArg:
ConsoleDebug (CONFIG, "Button: %d %d ",
ConsoleDebug (CONFIG, "Button: %d %d ",
args[i].value.button_value.offset,
args[i].value.button_value.base);
break;
case WindowArg:
ConsoleDebug (CONFIG, "Window: %d %d ",
ConsoleDebug (CONFIG, "Window: %d %d ",
args[i].value.button_value.offset,
args[i].value.button_value.base);
break;
case ManagerArg:
ConsoleDebug (CONFIG, "Manager: %d %d ",
ConsoleDebug (CONFIG, "Manager: %d %d ",
args[i].value.button_value.offset,
args[i].value.button_value.base);
break;
@ -174,7 +174,7 @@ static void print_binding (Binding *binding)
ConsoleDebug (CONFIG, "\tMouse: %d\n", binding->Button_Key);
}
else {
ConsoleDebug (CONFIG, "\tKey or action: %d %s\n", binding->Button_Key,
ConsoleDebug (CONFIG, "\tKey or action: %d %s\n", binding->Button_Key,
binding->key_name);
}
@ -185,7 +185,7 @@ static void print_binding (Binding *binding)
while (func) {
for (i = 0; i < num_builtins; i++) {
if (func->func == builtin_functions[i].func) {
ConsoleDebug (CONFIG, "\tFunction: %s %p ",
ConsoleDebug (CONFIG, "\tFunction: %s %p ",
builtin_functions[i].name, func->func);
break;
}
@ -197,7 +197,7 @@ static void print_binding (Binding *binding)
func = func->next;
}
}
#endif
#endif
void print_bindings (Binding *list)
{
@ -265,9 +265,9 @@ static int extract_int (char *p, int *n)
}
*n = atoi (p) * sign;
return 1;
}
}
/****************************************************************************
*
@ -276,7 +276,7 @@ static int extract_int (char *p, int *n)
* Return value is ptr to indata,updated to point to text after the word
* which is extracted.
* token is the extracted word, which is copied into a malloced
* space, and must be freed after use.
* space, and must be freed after use.
*
**************************************************************************/
@ -344,7 +344,7 @@ static char *parse_button (char *string, BuiltinArg *arg, int *flag,
char *rest, *token;
ButtonValue *bv;
int n;
ConsoleDebug (CONFIG, "parse_term: %s\n", string);
*flag = 1;
@ -396,7 +396,7 @@ static char *parse_button (char *string, BuiltinArg *arg, int *flag,
*flag = 0;
return NULL;
}
Free (token);
return rest;
}
@ -405,7 +405,7 @@ static void free_function_list (Function *func)
{
int i;
Function *fp = func;
while (fp) {
for (i = 0; i < fp->numargs; i++) {
if (fp->args[i].type == StringArg)
@ -416,7 +416,7 @@ static void free_function_list (Function *func)
Free (func);
}
}
static int funccasecmp(const void *key /* actually char* */,
const void *member /* actually FunctionType* */)
{
@ -474,7 +474,7 @@ static Function *parse_function (char **line, char *pstop_char)
ftype->func = builtin_functions_i->func;
ftype->numargs = builtin_functions_i->numargs;
ftype->next = NULL;
for (j = 0; j < builtin_functions_i->numargs && *pstop_char != ','; j++) {
ftype->args[j].type = builtin_functions_i->args[j];
switch (builtin_functions_i->args[j]) {
@ -488,7 +488,7 @@ static Function *parse_function (char **line, char *pstop_char)
return NULL;
}
if (extract_int (tok, &ftype->args[j].value.int_value) == 0) {
ConsoleMessage ("%s: expect integer argument: %s\n",
ConsoleMessage ("%s: expect integer argument: %s\n",
builtin_functions_i->name, tok);
Free (tok);
Free(ftype);
@ -497,7 +497,7 @@ static Function *parse_function (char **line, char *pstop_char)
}
Free (tok);
break;
case StringArg:
ptr = DoGetNextToken (ptr, &ftype->args[j].value.string_value,NULL,
",", pstop_char);
@ -511,7 +511,7 @@ static Function *parse_function (char **line, char *pstop_char)
}
ftype->args[j].type = builtin_functions_i->args[j];
break;
case ButtonArg:
case WindowArg:
case ManagerArg:
@ -525,7 +525,7 @@ static Function *parse_function (char **line, char *pstop_char)
}
ftype->args[j].type = builtin_functions_i->args[j];
break;
/* JmpArg can be a string or an int. However, if 'JmpArg'
* is recorded as the argument type in the argument array
* for a command, it means it is a string; the code for
@ -553,7 +553,7 @@ static Function *parse_function (char **line, char *pstop_char)
Free(tok);
}
break;
default:
ConsoleMessage ("internal error in parse_function\n");
Free(ftype);
@ -561,18 +561,18 @@ static Function *parse_function (char **line, char *pstop_char)
return NULL;
}
}
if (j != builtin_functions_i->numargs) {
ConsoleMessage ("%s: too few arguments\n", builtin_functions_i->name);
Free(ftype);
*line = NULL;
return NULL;
}
*line = ptr;
return ftype;
}
ConsoleMessage ("Unknown function: %s\n", name);
Free (name);
@ -661,7 +661,7 @@ static Function *parse_function_list (char *line)
ConsoleMessage ("No function defined\n");
return ret;
}
Binding *ParseMouseEntry (char *tline)
{
@ -672,25 +672,25 @@ Binding *ParseMouseEntry (char *tline)
int mods;
/* tline points after the key word "key" */
action = DoGetNextToken(tline,&token, NULL, ",", NULL);
action = DoGetNextToken(tline,&token, NULL, ",", NULL);
if(token != NULL) {
n1 = sscanf(token,"%d",&button);
Free(token);
}
action = DoGetNextToken(action,&token, NULL, ",", NULL);
action = DoGetNextToken(action,&token, NULL, ",", NULL);
if(token != NULL) {
n2 = sscanf(token,"%19s",modifiers);
Free(token);
}
if((n1 != 1)||(n2 != 1))
ConsoleMessage ("Mouse binding: Syntax error");
find_context(modifiers,&mods,key_modifiers,tline);
if((mods & AnyModifier)&&(mods&(~AnyModifier))) {
ConsoleMessage ("Binding specified AnyModifier and other modifers too. Excess modifiers will be ignored.");
}
new = (Binding *)safemalloc(sizeof(Binding));
new->IsMouse = 1;
new->Button_Key = button;
@ -700,7 +700,7 @@ Binding *ParseMouseEntry (char *tline)
new->Function = parse_function_list (action);
new->NextBinding = NULL;
new->LastBinding = new;
if (!new->Function) {
ConsoleMessage ("Bad action: %s\n", action);
Free (new->Action);
@ -727,13 +727,13 @@ static Binding *ParseKeyEntry (char *tline)
/* tline points after the key word "key" */
ptr = tline;
ptr = DoGetNextToken(ptr,&token, NULL, ",", NULL);
ptr = DoGetNextToken(ptr,&token, NULL, ",", NULL);
if(token != NULL) {
n1 = sscanf(token,"%19s",key);
Free(token);
}
action = DoGetNextToken(ptr,&token, NULL, ",", NULL);
action = DoGetNextToken(ptr,&token, NULL, ",", NULL);
if(token != NULL) {
n2 = sscanf(token,"%19s",modifiers);
Free(token);
@ -751,13 +751,13 @@ static Binding *ParseKeyEntry (char *tline)
* Don't let a 0 keycode go through, since that means AnyKey to the
* XGrabKey call in GrabKeys().
*/
if ((keysym = XStringToKeysym(key)) == NoSymbol ||
if ((keysym = XStringToKeysym(key)) == NoSymbol ||
XKeysymToKeycode(theDisplay, keysym) == 0) {
ConsoleMessage ("Can't find keysym: %s\n", key);
return NULL;
}
XDisplayKeycodes(theDisplay, &min, &max);
for (i=min; i<=max; i++) {
if (XKeycodeToKeysym(theDisplay, i, 0) == keysym) {
@ -893,13 +893,13 @@ static char *read_next_cmd (ReadOption flag)
retstring = cur_pos;
cur_pos += ModuleLen;
displaced = *cur_pos;
if (displaced == '*')
if (displaced == '*')
status = READ_OPTION;
else if (displaced == '\0')
status = READ_LINE;
else if (iswhite (displaced))
status = READ_ARG;
else
else
status = READ_LINE;
break;
}
@ -909,7 +909,7 @@ static char *read_next_cmd (ReadOption flag)
case READ_OPTION:
*cur_pos = displaced;
retstring = ++cur_pos;
while (*cur_pos != '*' && !iswhite (*cur_pos))
while (*cur_pos != '*' && !iswhite (*cur_pos))
cur_pos++;
displaced = *cur_pos;
*cur_pos = '\0';
@ -919,7 +919,7 @@ static char *read_next_cmd (ReadOption flag)
status = READ_LINE;
else if (iswhite (displaced))
status = READ_ARG;
else
else
status = READ_LINE;
break;
@ -935,7 +935,7 @@ static char *read_next_cmd (ReadOption flag)
status = READ_LINE;
else if (iswhite (displaced))
status = READ_ARG;
else
else
status = READ_LINE;
break;
@ -1020,8 +1020,8 @@ static NameType parse_format_dependencies (char *format)
static void handle_button_config (int manager, int context, char *option)
{
char *p;
ButtonState state;
ButtonState state;
p = read_next_cmd (READ_ARG);
if (!p) {
ConsoleMessage ("Bad line: %s\n", current_line);
@ -1048,7 +1048,7 @@ static void handle_button_config (int manager, int context, char *option)
ConsoleMessage ("This isn't a valid button state: %s\n", p);
return;
}
ConsoleDebug (CONFIG, "Setting buttonState[%s] to %s\n",
ConsoleDebug (CONFIG, "Setting buttonState[%s] to %s\n",
contextDefaults[context].name, p);
SET_MANAGER (manager, buttonState[context], state);
@ -1056,18 +1056,18 @@ static void handle_button_config (int manager, int context, char *option)
p = read_next_cmd (READ_ARG);
if ( !p )
return;
SET_MANAGER (manager, foreColorName[context],
SET_MANAGER (manager, foreColorName[context],
copy_string (&globals.managers[id].foreColorName[context], p));
/* check for optional back color */
p = read_next_cmd (READ_ARG);
if ( !p )
return;
ConsoleDebug (CONFIG, "Setting backColorName[%s] to %s\n",
contextDefaults[context].name, p);
SET_MANAGER (manager, backColorName[context],
SET_MANAGER (manager, backColorName[context],
copy_string (&globals.managers[id].backColorName[context], p));
}
@ -1131,7 +1131,7 @@ void read_in_resources (char *file)
ConsoleDebug (CONFIG, "In transient mode. Ignoring this line\n");
continue;
}
if (extract_int (option1, &manager) == 0 ||
if (extract_int (option1, &manager) == 0 ||
manager <= 0 || manager > globals.num_managers) {
ConsoleMessage ("Bad line: %s\n", current_line);
ConsoleMessage ("This is not a valid manager: %s.\n", option1);
@ -1191,7 +1191,7 @@ void read_in_resources (char *file)
ConsoleMessage ("Need an action\n");
continue;
}
switch (i) {
case MOUSE:
binding = ParseMouseEntry (q);
@ -1235,8 +1235,8 @@ void read_in_resources (char *file)
ConsoleDebug (CONFIG, "default background: %s\n", p);
for ( i = 0; i < NUM_CONTEXTS; i++ )
SET_MANAGER (manager, backColorName[i],
conditional_copy_string (&globals.managers[id].backColorName[i],
SET_MANAGER (manager, backColorName[i],
conditional_copy_string (&globals.managers[id].backColorName[i],
p));
}
else if (!strcasecmp (option1, "buttongeometry")) {
@ -1246,7 +1246,7 @@ void read_in_resources (char *file)
continue;
}
SET_MANAGER (manager, button_geometry_str,
SET_MANAGER (manager, button_geometry_str,
copy_string (&globals.managers[id].button_geometry_str, p));
}
else if (!strcasecmp (option1, "dontshow")) {
@ -1335,7 +1335,7 @@ void read_in_resources (char *file)
}
ConsoleDebug (CONFIG, "font: %s\n", p);
SET_MANAGER (manager, fontname,
SET_MANAGER (manager, fontname,
copy_string (&globals.managers[id].fontname, p));
}
else if (!strcasecmp (option1, "foreground")) {
@ -1347,8 +1347,8 @@ void read_in_resources (char *file)
ConsoleDebug (CONFIG, "default foreground: %s\n", p);
for ( i = 0; i < NUM_CONTEXTS; i++ )
SET_MANAGER (manager, foreColorName[i],
conditional_copy_string (&globals.managers[id].foreColorName[i],
SET_MANAGER (manager, foreColorName[i],
conditional_copy_string (&globals.managers[id].foreColorName[i],
p));
}
else if (!strcasecmp (option1, "format")) {
@ -1366,7 +1366,7 @@ void read_in_resources (char *file)
token = (char *)safemalloc(1);
*token = 0;
}
SET_MANAGER (manager, formatstring,
copy_string (&globals.managers[id].formatstring, token));
flags = parse_format_dependencies (token);
@ -1390,7 +1390,7 @@ void read_in_resources (char *file)
token = (char *)safemalloc(1);
*token = 0;
}
SET_MANAGER (manager, iconname,
copy_string (&globals.managers[id].iconname, token));
Free (token);
@ -1402,7 +1402,7 @@ void read_in_resources (char *file)
continue;
}
SET_MANAGER (manager, geometry_str,
SET_MANAGER (manager, geometry_str,
copy_string (&globals.managers[id].geometry_str, p));
}
else if (!strcasecmp (option1, "resolution")) {
@ -1494,9 +1494,9 @@ void read_in_resources (char *file)
if (!strcasecmp (p, "name")) {
i = SortName;
}
else if (!strcasecmp (p, "namewithcase")) {
i = SortNameCase;
}
else if (!strcasecmp (p, "namewithcase")) {
i = SortNameCase;
}
else if (!strcasecmp (p, "id")) {
i = SortId;
}
@ -1531,7 +1531,7 @@ void read_in_resources (char *file)
token = (char *)safemalloc(1);
*token = 0;
}
SET_MANAGER (manager, titlename,
copy_string (&globals.managers[id].titlename, token));
Free (token);

View file

@ -36,7 +36,7 @@ void print_stringlist (StringList *list)
case CLASS_NAME:
s = "class";
break;
default:
s = "unknown type";
}
@ -73,7 +73,7 @@ void add_to_stringlist (StringList *list, char *s)
type = ALL_NAME;
}
ConsoleDebug (WINLIST, "add_to_stringlist: %s %s\n",
ConsoleDebug (WINLIST, "add_to_stringlist: %s %s\n",
type == ALL_NAME ? "all" : s, pat);
new = (StringEl *)safemalloc (sizeof (StringEl));
@ -91,14 +91,14 @@ void add_to_stringlist (StringList *list, char *s)
ConsoleDebug (WINLIST, "Exiting add_to_stringlist\n");
}
static int matches_string (NameType type, char *pattern, char *tname,
static int matches_string (NameType type, char *pattern, char *tname,
char *iname, char *rname, char *cname)
{
int ans = 0;
ConsoleDebug (WINLIST, "matches_string: type: 0x%x pattern: %s\n",
ConsoleDebug (WINLIST, "matches_string: type: 0x%x pattern: %s\n",
type, pattern);
ConsoleDebug (WINLIST, "\tstrings: %s:%s %s:%s\n", tname, iname,
ConsoleDebug (WINLIST, "\tstrings: %s:%s %s:%s\n", tname, iname,
rname, cname);
if (tname && (type == ALL_NAME || type == TITLE_NAME)) {
@ -137,14 +137,14 @@ static int iconmanager_show (WinManager *man, char *tname, char *iname,
for (string = man->dontshow.list; string; string = string->next) {
ConsoleDebug (WINLIST, "Matching: %s\n", string->string);
if (matches_string (string->type, string->string, tname, iname,
if (matches_string (string->type, string->string, tname, iname,
rname, cname)) {
ConsoleDebug (WINLIST, "Dont show\n");
in_dontshowlist = 1;
break;
}
}
if (!in_dontshowlist) {
if (man->show.list == NULL) {
in_showlist = 1;
@ -202,7 +202,7 @@ void free_windata (WinData *p)
globals.select_win = NULL;
abort();
}
Free (p->resname);
Free (p->classname);
Free (p->iconname);
@ -275,7 +275,7 @@ int check_win_complete (WinData *p)
ConsoleDebug (WINLIST, "\tcomplete: 0\n\n");
return 0;
}
void init_winlists (void)
{
int i;
@ -294,7 +294,7 @@ void delete_win_hashtab (WinData *win)
entry = win->app_id & 0xff;
list = &hash_tab[entry];
if (win->win_prev)
if (win->win_prev)
win->win_prev->win_next = win->win_next;
else
list->head = win->win_next;
@ -303,7 +303,7 @@ void delete_win_hashtab (WinData *win)
else
list->tail = win->win_prev;
list->n--;
}
}
void insert_win_hashtab (WinData *win)
{

View file

@ -1,4 +1,4 @@
#include "../../libs/fvwmlib.h"
#include "../../libs/fvwmlib.h"
#define STICKY (1<<2) /* Does window stick to glass? */
#define ONTOP (1<<1) /* does window stay on top */
#define BORDER (1<<13) /* Is this decorated with border*/
@ -38,7 +38,7 @@ struct Item
/*************************************************************************
*
* Subroutine Prototypes
*
*
*************************************************************************/
void Loop(int *fd);
void SendInfo(int *fd,char *message,unsigned long window);

View file

@ -3,7 +3,7 @@
/*************************************************************************
*
* Subroutine Prototypes
*
*
*************************************************************************/
void DeadPipe(int nonsense);

View file

@ -115,13 +115,13 @@ int is_suitable_window(unsigned long *body)
if ((flags&MAXIMIZED) && !maximized)
return 0;
if ((flags&STICKY) && !sticky)
return 0;
if (!XGetWindowAttributes(dpy, (Window)body[1], &xwa))
return 0;
if (xwa.map_state != IsViewable)
return 0;
@ -138,7 +138,7 @@ int is_suitable_window(unsigned long *body)
&& (x + w > 0) && (y + h > 0)))
return 0;
}
if (!(flags&TITLE) && !untitled)
return 0;
@ -174,12 +174,12 @@ int get_window(void)
}
last = 1;
break;
case M_END_WINDOWLIST:
break;
default:
fprintf(console,
fprintf(console,
"%s: internal inconsistency: unknown message\n",
argv0);
break;
@ -198,7 +198,7 @@ void wait_configure(window_item *wi)
FD_ZERO(&infds);
FD_SET(fd[1], &infds);
select(fd_width,&infds, 0, 0, NULL);
while (!found)
while (!found)
if ((count = ReadFvwmPacket(fd[1],header,&body)) > 0) {
if ((header[1] == M_CONFIGURE_WINDOW)
&& (Window)body[1] == wi->frame)
@ -214,7 +214,7 @@ int atopixel(char *s, unsigned long f)
if (isalpha(s[l - 1])) {
char s2[24];
strcpy(s2,s);
s2[strlen(s2) - 1] = 0;
s2[strlen(s2) - 1] = 0;
return atoi(s2);
}
return (atoi(s) * f) / 100;
@ -225,7 +225,7 @@ void tile_windows(void)
char msg[128];
int cur_x = ofsx, cur_y = ofsy;
int wdiv, hdiv, i, j, count = 1;
window_item *w = reversed ? wins_tail : wins;
window_item *w = reversed ? wins_tail : wins;
if (horizontal) {
if ((maxnum > 0) && (maxnum < wins_count)) {
@ -242,7 +242,7 @@ void tile_windows(void)
for (j = 0; w && (j < maxnum); ++j) {
int nw = wdiv - w->bw * 2;
int nh = hdiv - w->bw * 2 - w->th;
if (resize) {
if (nostretch) {
if (nw > w->width)
@ -252,7 +252,7 @@ void tile_windows(void)
}
sprintf(msg, "Resize %lup %lup",
(nw > 0) ? nw : w->width,
(nh > 0) ? nh : w->height);
(nh > 0) ? nh : w->height);
SendInfo(fd,msg,w->frame);
}
sprintf(msg, "Move %up %up", cur_x, cur_y);
@ -281,7 +281,7 @@ void tile_windows(void)
for (j = 0; w && (j < maxnum); ++j) {
int nw = wdiv - w->bw * 2;
int nh = hdiv - w->bw * 2 - w->th;
if (resize) {
if (nostretch) {
if (nw > w->width)
@ -305,7 +305,7 @@ void tile_windows(void)
cur_x = ofsx;
cur_y += hdiv;
}
}
}
}
void cascade_windows(void)
@ -321,7 +321,7 @@ void cascade_windows(void)
sprintf(msg, "Move %up %up", cur_x, cur_y);
SendInfo(fd,msg,w->frame);
if (resize) {
if (nostretch) {
if (nostretch) {
if (maxw
&& (w->width > maxw))
nw = maxw;
@ -329,12 +329,12 @@ void cascade_windows(void)
&& (w->height > maxh))
nh = maxh;
} else {
nw = maxw;
nw = maxw;
nh = maxh;
}
if (nw || nh) {
sprintf(msg, "Resize %lup %lup",
nw ? nw : w->width,
sprintf(msg, "Resize %lup %lup",
nw ? nw : w->width,
nh ? nh : w->height);
SendInfo(fd,msg,w->frame);
}
@ -506,7 +506,7 @@ int main(int argc, char *argv[])
if (!(argv0 = strrchr(argv[0],'/')))
argv0 = argv[0];
else
else
++argv0;
if (argc < 6) {
@ -538,7 +538,7 @@ int main(int argc, char *argv[])
}
fd_width = GetFdWidth();
#ifdef USERC
strcpy(match, "*");
strcat(match, argv0);
@ -547,7 +547,7 @@ int main(int argc, char *argv[])
if ((config_line = GetConfigLine(argv[3], match))) {
char **args = NULL;
config_line_count = parse_line(config_line, &args);
parse_args("config args",
parse_args("config args",
config_line_count, args, 0);
free(config_line);
free(args);
@ -561,7 +561,7 @@ int main(int argc, char *argv[])
if (config_line[cllen - 1] == '\n')
config_line[cllen - 1] = 0;
config_line_count = parse_line(config_line, &args);
parse_args("config args",
parse_args("config args",
config_line_count, args, 0);
free(args);
}
@ -593,7 +593,7 @@ int main(int argc, char *argv[])
M_END_WINDOWLIST
));
SendInfo(fd,msg,0);
#ifdef FVWM1_MOVENULL
/* avoid interactive placement in fvwm version 1 */
if (!ofsx) ++ofsx;
@ -602,7 +602,7 @@ int main(int argc, char *argv[])
}
#else
SetMessageMask(fd,
M_CONFIGURE_WINDOW
M_CONFIGURE_WINDOW
| M_END_WINDOWLIST
);
#endif

View file

@ -1,4 +1,4 @@
#include "fvwmlib.h"
#include "fvwmlib.h"
#define STICKY 1
#define ICONIFIED 32 /* is it an icon now? */
@ -24,7 +24,7 @@ struct list
/*************************************************************************
*
* Subroutine Prototypes
*
*
*************************************************************************/
void Loop(int *fd);
void SendInfo(int *fd,char *message,unsigned long window);

View file

@ -1,4 +1,4 @@
#include "fvwmlib.h"
#include "fvwmlib.h"
#define STICKY 1
#define ICONIFIED 32 /* is it an icon now? */
@ -26,7 +26,7 @@ struct list
/*************************************************************************
*
* Subroutine Prototypes
*
*
*************************************************************************/
void Loop(int *fd);
void SendInfo(int *fd,char *message,unsigned long window);

View file

@ -1,4 +1,4 @@
#include "fvwmlib.h"
#include "fvwmlib.h"
extern Display *dpy;
extern char *MyName;

View file

@ -114,7 +114,7 @@ void RelieveWindow(Window win,int x,int y,int w,int h,
/************************************************************************
*
* Sizes and creates the window
* Sizes and creates the window
*
***********************************************************************/
XSizeHints mysizehints;
@ -146,7 +146,7 @@ void CreateWindow(int x,int y, int w, int h)
mysizehints.max_width = w + BAR_WIDTH + PAD_WIDTH3;
mysizehints.max_height = h + BAR_WIDTH + PAD_WIDTH3;
mysizehints.win_gravity = NorthWestGravity;
mysizehints.win_gravity = NorthWestGravity;
if(d_depth < 2)
{
@ -180,21 +180,21 @@ void CreateWindow(int x,int y, int w, int h)
gcm = GCForeground|GCBackground;
gcv.foreground = hilite_pix;
gcv.background = hilite_pix;
ReliefGC = XCreateGC(dpy, Root, gcm, &gcv);
ReliefGC = XCreateGC(dpy, Root, gcm, &gcv);
gcm = GCForeground|GCBackground;
gcv.foreground = shadow_pix;
gcv.background = shadow_pix;
ShadowGC = XCreateGC(dpy, Root, gcm, &gcv);
ShadowGC = XCreateGC(dpy, Root, gcm, &gcv);
_XA_WM_COLORMAP_WINDOWS = XInternAtom (dpy, "WM_COLORMAP_WINDOWS", False);
}
/****************************************************************************
*
*
* Loads a single color
*
****************************************************************************/
****************************************************************************/
Pixel GetColor(char *name)
{
XColor color;
@ -202,11 +202,11 @@ Pixel GetColor(char *name)
XGetWindowAttributes(dpy,Root,&attributes);
color.pixel = 0;
if (!XParseColor (dpy, attributes.colormap, name, &color))
if (!XParseColor (dpy, attributes.colormap, name, &color))
{
nocolor("parse",name);
}
else if(!XAllocColor (dpy, attributes.colormap, &color))
else if(!XAllocColor (dpy, attributes.colormap, &color))
{
nocolor("alloc",name);
}
@ -250,7 +250,7 @@ void Loop(Window target)
exposed = 1;
RedrawWindow(target);
break;
case ConfigureNotify:
XGetGeometry(dpy,main_win,&root,&x,&y,
(unsigned int *)&tw,(unsigned int *)&th,
@ -276,7 +276,7 @@ void Loop(Window target)
RedrawWindow(target);
}
break;
case ButtonPress:
if((Event.xbutton.y > Height-BAR_WIDTH) &&
(Event.xbutton.x < SCROLL_BAR_WIDTH+PAD_WIDTH3))
@ -324,7 +324,7 @@ void Loop(Window target)
RedrawWindow(target);
}
else if((Event.xbutton.y > Height- BAR_WIDTH ) &&
(Event.xbutton.x < Width- BAR_WIDTH))
(Event.xbutton.x < Width- BAR_WIDTH))
{
motion=HORIZONTAL;
target_x_offset=(Event.xbutton.x -PAD_WIDTH3-SCROLL_BAR_WIDTH)*
@ -332,14 +332,14 @@ void Loop(Window target)
(Width-BAR_WIDTH-PAD_WIDTH3-2*SCROLL_BAR_WIDTH);
if(target_x_offset < 0)
target_x_offset = 0;
if(target_x_offset + Width - BAR_WIDTH -PAD_WIDTH3> target_width)
target_x_offset = target_width - Width + BAR_WIDTH+PAD_WIDTH3;
XMoveWindow(dpy,target,-target_x_offset, -target_y_offset);
RedrawWindow(target);
}
else if((Event.xbutton.y > Height- BAR_WIDTH ) &&
(Event.xbutton.x > Width- BAR_WIDTH))
(Event.xbutton.x > Width- BAR_WIDTH))
{
exposed = 2;
motion=QUIT;
@ -417,7 +417,7 @@ void Loop(Window target)
(Width-BAR_WIDTH-PAD_WIDTH3-2*SCROLL_BAR_WIDTH);
if(target_x_offset < 0)
target_x_offset = 0;
if(target_x_offset + Width - BAR_WIDTH -PAD_WIDTH3> target_width)
target_x_offset = target_width - Width + BAR_WIDTH+PAD_WIDTH3;
XMoveWindow(dpy,target,-target_x_offset, -target_y_offset);
@ -473,7 +473,7 @@ void Loop(Window target)
(Width-BAR_WIDTH-PAD_WIDTH3-2*SCROLL_BAR_WIDTH);
if(target_x_offset < 0)
target_x_offset = 0;
if(target_x_offset + Width - BAR_WIDTH -PAD_WIDTH3> target_width)
target_x_offset = target_width - Width + BAR_WIDTH+PAD_WIDTH3;
XMoveWindow(dpy,target,-target_x_offset, -target_y_offset);
@ -488,7 +488,7 @@ void Loop(Window target)
RedrawWindow(target);
break;
case ClientMessage:
if ((Event.xclient.format==32) &&
if ((Event.xclient.format==32) &&
(Event.xclient.data.l[0]==wm_del_win))
{
DeadPipe(1);
@ -505,8 +505,8 @@ void Loop(Window target)
{
if (XGetWindowProperty (dpy,
target, Event.xproperty.atom, 0,
MAX_ICON_NAME_LEN, False, XA_STRING,
&actual,&actual_format, &nitems,
MAX_ICON_NAME_LEN, False, XA_STRING,
&actual,&actual_format, &nitems,
&bytesafter, (unsigned char **) &prop)
== Success && (prop != NULL))
change_icon_name(prop);
@ -519,7 +519,7 @@ void Loop(Window target)
XSetWMHints(dpy,main_win, wmhints);
XFree(wmhints);
}
else if(Event.xproperty.atom == XA_WM_NORMAL_HINTS)
else if(Event.xproperty.atom == XA_WM_NORMAL_HINTS)
{
/* don't do Normal Hints. They alter the size of the window */
}
@ -527,7 +527,7 @@ void Loop(Window target)
{
}
break;
case DestroyNotify:
DeadPipe(1);
break;
@ -561,7 +561,7 @@ void Loop(Window target)
/************************************************************************
*
* Draw the window
* Draw the window
*
***********************************************************************/
void RedrawWindow(Window target)
@ -573,7 +573,7 @@ void RedrawWindow(Window target)
while (XCheckTypedWindowEvent (dpy, main_win, Expose, &dummy))
exposed |= 1;
XSetWindowBorderWidth(dpy,target,0);
RelieveWindow(main_win,PAD_WIDTH3-2,PAD_WIDTH3-2,
@ -676,11 +676,11 @@ void RedrawWindow(Window target)
void change_window_name(char *str)
{
XTextProperty name;
if(str == NULL)
return;
if (XStringListToTextProperty(&str,1,&name) == 0)
if (XStringListToTextProperty(&str,1,&name) == 0)
{
fprintf(stderr,"%s: cannot allocate window name",MyName);
return;
@ -696,9 +696,9 @@ void change_window_name(char *str)
void change_icon_name(char *str)
{
XTextProperty name;
if(str == NULL)return;
if (XStringListToTextProperty(&str,1,&name) == 0)
if (XStringListToTextProperty(&str,1,&name) == 0)
{
fprintf(stderr,"%s: cannot allocate window name",MyName);
return;
@ -718,7 +718,7 @@ void GrabWindow(Window target)
Atom actual = None;
int actual_format;
unsigned long nitems, bytesafter;
XUnmapWindow(dpy,target);
XSync(dpy,0);
XGetGeometry(dpy,target,&root,&x,&y,
@ -741,8 +741,8 @@ void GrabWindow(Window target)
temp = NULL;
if (XGetWindowProperty (dpy,
target, XA_WM_ICON_NAME, 0,
MAX_ICON_NAME_LEN, False, XA_STRING,
&actual,&actual_format, &nitems,
MAX_ICON_NAME_LEN, False, XA_STRING,
&actual,&actual_format, &nitems,
&bytesafter, (unsigned char **) &prop)
== Success && (prop != NULL))
{
@ -752,7 +752,7 @@ void GrabWindow(Window target)
change_window_name(temp);
{
XWMHints *wmhints;
wmhints = XGetWMHints(dpy,target);
if(wmhints != NULL)
{
@ -767,7 +767,7 @@ void GrabWindow(Window target)
XSetWindowColormap(dpy,main_win,xwa.colormap);
}
}
XMapWindow(dpy,main_win);
RedrawWindow(target);
XFree(temp);
@ -779,9 +779,9 @@ void GrabWindow(Window target)
void RedrawLeftButton(GC rgc, GC sgc,int x1,int y1)
{
XSegment seg[4];
XSegment seg[4];
int i=0;
seg[i].x1 = x1+1; seg[i].y1 = y1+SCROLL_BAR_WIDTH/2;
seg[i].x2 = x1+SCROLL_BAR_WIDTH - 2; seg[i++].y2 = y1+1;
@ -806,7 +806,7 @@ void RedrawLeftButton(GC rgc, GC sgc,int x1,int y1)
void RedrawRightButton(GC rgc, GC sgc,int x1,int y1)
{
XSegment seg[4];
XSegment seg[4];
int i=0;
seg[i].x1 = x1+1; seg[i].y1 = y1+1;
@ -834,7 +834,7 @@ void RedrawRightButton(GC rgc, GC sgc,int x1,int y1)
void RedrawTopButton(GC rgc, GC sgc,int x1,int y1)
{
XSegment seg[4];
XSegment seg[4];
int i=0;
seg[i].x1 = x1+SCROLL_BAR_WIDTH/2; seg[i].y1 = y1+1;
@ -861,7 +861,7 @@ void RedrawTopButton(GC rgc, GC sgc,int x1,int y1)
void RedrawBottomButton(GC rgc, GC sgc,int x1, int y1)
{
XSegment seg[4];
XSegment seg[4];
int i=0;
seg[i].x1 = x1+1; seg[i].y1 = y1+1;
@ -885,4 +885,4 @@ void RedrawBottomButton(GC rgc, GC sgc,int x1, int y1)
seg[i].x2 = x1+SCROLL_BAR_WIDTH/2; seg[i++].y2 = y1+SCROLL_BAR_WIDTH - 1;
XDrawSegments(dpy, main_win, sgc, seg, i);
}

View file

@ -1,4 +1,4 @@
#include "fvwmlib.h"
#include "fvwmlib.h"
#define ACTION1 1
#define ACTION2 2
@ -15,7 +15,7 @@ struct list
/*************************************************************************
*
* Subroutine Prototypes
*
*
*************************************************************************/
void Loop(int *fd);
void SendInfo(int *fd,char *message,unsigned long window);

View file

@ -1,10 +1,10 @@
/* FvwmWinList Module for Fvwm.
/* FvwmWinList Module for Fvwm.
*
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
* Mike_Finger@atk.com)
*
* The functions in this header file that are the original work of Mike Finger.
*
*
* No guarantees or warantees or anything are provided or implied in any way
* whatsoever. Use this program at your own risk. Permission to use this
* program for any purpose is given, as long as the copyright is kept intact.

View file

@ -1,4 +1,4 @@
/* Part of the FvwmWinList Module for Fvwm.
/* Part of the FvwmWinList Module for Fvwm.
*
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
* Mike_Finger@atk.com)
@ -27,7 +27,7 @@ extern Window Root;
/****************************************************************************
Loads a single color
*****************************************************************************/
*****************************************************************************/
Pixel GetColor(char *name)
{
XColor color;
@ -35,9 +35,9 @@ Pixel GetColor(char *name)
XGetWindowAttributes(dpy,Root,&attributes);
color.pixel = 0;
if (!XParseColor (dpy, attributes.colormap, name, &color))
if (!XParseColor (dpy, attributes.colormap, name, &color))
nocolor("parse",name);
else if(!XAllocColor (dpy, attributes.colormap, &color))
else if(!XAllocColor (dpy, attributes.colormap, &color))
nocolor("alloc",name);
return color.pixel;
}

View file

@ -1,4 +1,4 @@
/* Part of the FvwmWinList Module for Fvwm.
/* Part of the FvwmWinList Module for Fvwm.
*
* The functions in this header file were originally part of the GoodStuff
* and FvwmIdent modules for Fvwm, so there copyrights are listed:

View file

@ -185,7 +185,7 @@ int main(int argc, char **argv)
sigemptyset(&sigact.sa_mask);
sigact.sa_handler = TerminateHandler;
sigaction(SIGPIPE, &sigact, NULL);
sigaction(SIGTERM, &sigact, NULL);
sigaction(SIGTERM, &sigact, NULL);
#else
signal(SIGPIPE, TerminateHandler);
signal(SIGTERM, TerminateHandler);
@ -1066,7 +1066,7 @@ PropMwmHints prop;
int ErrorHandler(Display *d, XErrorEvent *event)
{
char errmsg[256];
XGetErrorText(d, event->error_code, errmsg, sizeof(errmsg));
ConsoleMessage("%s failed request: %s\n", Module, errmsg);
ConsoleMessage("Major opcode: 0x%x, resource id: 0x%x\n",

View file

@ -1,6 +1,6 @@
#include "fvwmlib.h"
#include "fvwmlib.h"
/* FvwmWinList Module for Fvwm.
/* FvwmWinList Module for Fvwm.
*
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
* Mike_Finger@atk.com)
@ -50,13 +50,13 @@ typedef PropMotifWmHints PropMwmHints;
#define MWM_FUNC_MOVE (1L << 2)
#define MWM_FUNC_MINIMIZE (1L << 3)
#define MWM_FUNC_MAXIMIZE (1L << 4)
#define MWM_FUNC_CLOSE (1L << 5)
#define MWM_FUNC_CLOSE (1L << 5)
/* values for MwmHints.input_mode */
#define MWM_INPUT_MODELESS 0
#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
#define MWM_INPUT_SYSTEM_MODAL 2
#define MWM_INPUT_FULL_APPLICATION_MODAL 3
#define MWM_INPUT_FULL_APPLICATION_MODAL 3
/* bit definitions for MwmHints.decorations */
#define MWM_DECOR_ALL (1L << 0)

View file

@ -3,8 +3,8 @@ XCOMM $OpenBSD: Imakefile,v 1.1.1.1 2006/11/26 10:53:56 matthieu Exp $
FVWMTOP=../..
#include "../../Fvwm.tmpl"
SRCS= ButtonArray.c Colors.c FvwmWinList.c List.c Mallocs.c
OBJS= ButtonArray.o Colors.o FvwmWinList.o List.o Mallocs.o
SRCS= ButtonArray.c Colors.c FvwmWinList.c List.c Mallocs.c
OBJS= ButtonArray.o Colors.o FvwmWinList.o List.o Mallocs.o
DEPLIBS= $(FVWMLIB) $(DEPXPMLIB) $(DEPXLIB)
LOCAL_LIBRARIES= $(FVWMLIB) $(XPMLIB) $(XLIB)

View file

@ -1,10 +1,10 @@
/* FvwmWinList Module for Fvwm.
/* FvwmWinList Module for Fvwm.
*
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
* Mike_Finger@atk.com)
*
* The functions in this source file are the original work of Mike Finger.
*
*
* No guarantees or warantees or anything are provided or implied in any way
* whatsoever. Use this program at your own risk. Permission to use this
* program for any purpose is given, as long as the copyright is kept intact.
@ -64,7 +64,7 @@ int FindItem(List *list, long id)
if (temp==NULL) return -1;
return i;
}
/******************************************************************************
FindItemDesk - Find the item in the list matching the id, and desk id
******************************************************************************/
@ -95,8 +95,8 @@ int UpdateItemName(List *list, long id, char *string)
/******************************************************************************
UpdateItemDesk - Update the item in the list, setting desk as necessary.
returns 1 if desk was updated,
returns 0, if not changed
returns 1 if desk was updated,
returns 0, if not changed
returns -1 if not found
******************************************************************************/
int UpdateItemDesk(List *list, long id, long desk)
@ -131,7 +131,7 @@ int i;
if (flags!=-1) temp->flags=flags;
return i;
}
/******************************************************************************
FreeItem - Frees allocated space for an Item
******************************************************************************/

View file

@ -1,10 +1,10 @@
/* FvwmWinList Module for Fvwm.
/* FvwmWinList Module for Fvwm.
*
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
* Mike_Finger@atk.com)
*
* The functions in this source file that are the original work of Mike Finger.
*
*
* No guarantees or warantees or anything are provided or implied in any way
* whatsoever. Use this program at your own risk. Permission to use this
* program for any purpose is given, as long as the copyright is kept intact.

View file

@ -5,7 +5,7 @@
.PATH: ${DIST}/modules/FvwmWinList
PROG= FvwmWinList
SRCS= ButtonArray.c Colors.c FvwmWinList.c List.c Mallocs.c
SRCS= ButtonArray.c Colors.c FvwmWinList.c List.c Mallocs.c
LDADD+= -lXpm ${XLIB}
BINDIR= ${FVWMLIBDIR}

View file

@ -1,4 +1,4 @@
/* FvwmWinList Module for Fvwm.
/* FvwmWinList Module for Fvwm.
*
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
* Mike_Finger@atk.com)

View file

@ -1,4 +1,4 @@
# -*- makefile -*-
# -*- makefile -*-
# $OpenBSD: Makefile.inc,v 1.9 2012/09/30 10:12:51 espie Exp $
.ifndef FVWM_MAKEFILE_INC