sync
This commit is contained in:
parent
50c8bafd9f
commit
ac06c97e30
820 changed files with 467502 additions and 386453 deletions
|
@ -1,4 +1,4 @@
|
|||
# -*- makefile -*-
|
||||
# -*- makefile -*-
|
||||
# $OpenBSD: Makefile.inc,v 1.9 2012/09/30 10:12:51 espie Exp $
|
||||
|
||||
.ifndef FVWM_MAKEFILE_INC
|
||||
|
|
|
@ -221,9 +221,9 @@ char *expand(char *input, char *arguments[],FvwmWindow *tmp_win)
|
|||
l2 = l;
|
||||
|
||||
if(strncasecmp(input, "AddToFunc", 9) == 0 || input[0] == '+')
|
||||
{
|
||||
{
|
||||
addto = 1;
|
||||
}
|
||||
}
|
||||
i=0;
|
||||
while(i<l)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
* This module is all original code
|
||||
* by Rob Nation
|
||||
* This module is all original code
|
||||
* by Rob Nation
|
||||
* Copyright 1993, Robert Nation
|
||||
* You may use this code for any purpose, as long as the original
|
||||
* copyright remains in the source code and all documentation
|
||||
|
@ -47,7 +47,7 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
/* remove Fw from list */
|
||||
if (Fw->prev) Fw->prev->next = Fw->next;
|
||||
if (Fw->next) Fw->next->prev = Fw->prev;
|
||||
|
||||
|
||||
/* insert Fw at start */
|
||||
Fw->next = Scr.FvwmRoot.next;
|
||||
if (Scr.FvwmRoot.next) Scr.FvwmRoot.next->prev = Fw;
|
||||
|
@ -57,14 +57,14 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
else
|
||||
{
|
||||
/* move the windowlist around so that Fw is at the top */
|
||||
|
||||
|
||||
FvwmWindow *tmp_win;
|
||||
|
||||
|
||||
/* find the window on the windowlist */
|
||||
tmp_win = &Scr.FvwmRoot;
|
||||
tmp_win = &Scr.FvwmRoot;
|
||||
while (tmp_win && tmp_win != Fw)
|
||||
tmp_win = tmp_win->next;
|
||||
|
||||
|
||||
if (tmp_win) /* the window is on the (non-zero length) windowlist */
|
||||
{
|
||||
/* make tmp_win point to the last window on the list */
|
||||
|
@ -83,7 +83,7 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(Scr.NumberOfScreens > 1)
|
||||
{
|
||||
XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
|
||||
|
@ -114,15 +114,15 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
|
||||
if (Fw != NULL)
|
||||
{
|
||||
/*
|
||||
Make sure at least part of window is on this page
|
||||
/*
|
||||
Make sure at least part of window is on this page
|
||||
before giving it focus...
|
||||
*/
|
||||
if ( (Fw->Desk == Scr.CurrentDesk) &&
|
||||
( ((Fw->frame_x + Fw->frame_width) >= 0 &&
|
||||
( ((Fw->frame_x + Fw->frame_width) >= 0 &&
|
||||
Fw->frame_x < Scr.MyDisplayWidth) &&
|
||||
((Fw->frame_y + Fw->frame_height) >= 0 &&
|
||||
Fw->frame_y < Scr.MyDisplayHeight)
|
||||
((Fw->frame_y + Fw->frame_height) >= 0 &&
|
||||
Fw->frame_y < Scr.MyDisplayHeight)
|
||||
)
|
||||
)
|
||||
{
|
||||
|
@ -178,7 +178,7 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
w = Fw->icon_pixmap_w;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if((Fw)&&(Fw->flags & Lenience))
|
||||
{
|
||||
XSetInputFocus (dpy, w, RevertToParent, lastTimestamp);
|
||||
|
|
|
@ -364,7 +364,7 @@ int main(int argc, char **argv)
|
|||
gethostname(client,MAXHOSTNAME);
|
||||
buflen = len+14 + strlen(client);
|
||||
rdisplay_string = safemalloc(buflen);
|
||||
snprintf(rdisplay_string, buflen,
|
||||
snprintf(rdisplay_string, buflen,
|
||||
"HOSTDISPLAY=%s:%s",client,&display_string[9]);
|
||||
putenv(rdisplay_string);
|
||||
}
|
||||
|
|
|
@ -995,8 +995,8 @@ void RaiseWindow(FvwmWindow *t)
|
|||
Motif menus. Instead raise wins[0] only above the topmost window
|
||||
which is managed by us.
|
||||
*/
|
||||
if (wins[0] != Scr.FvwmRoot.stack_next->frame && wins[0] != Scr.FvwmRoot.stack_next->icon_w && wins[0] != Scr.FvwmRoot.stack_next->icon_pixmap_w)
|
||||
{
|
||||
if (wins[0] != Scr.FvwmRoot.stack_next->frame && wins[0] != Scr.FvwmRoot.stack_next->icon_w && wins[0] != Scr.FvwmRoot.stack_next->icon_pixmap_w)
|
||||
{
|
||||
if (Scr.FvwmRoot.stack_next->flags & ICONIFIED)
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -35,7 +35,7 @@ extern struct queue_buff_struct **pipeQueue;
|
|||
#define M_MAP (1<<16)
|
||||
|
||||
/* It turns out this is defined by <sys/stream.h> on Solaris 2.6.
|
||||
I suspect that simply redefining this will lead to trouble;
|
||||
I suspect that simply redefining this will lead to trouble;
|
||||
at some point, these should probably be renamed (FVWM_MSG_ERROR?). */
|
||||
#ifdef M_ERROR
|
||||
# undef M_ERROR
|
||||
|
|
|
@ -597,7 +597,7 @@ Bool PlaceWindow(FvwmWindow *tmp_win, unsigned long tflag,int Desk, int PageX, i
|
|||
/* RBW - allow StartsOnPage to go through, even if iconic. */
|
||||
( ((!((tmp_win->wmhints)&&
|
||||
(tmp_win->wmhints->flags & StateHint)&&
|
||||
(tmp_win->wmhints->initial_state == IconicState)))
|
||||
(tmp_win->wmhints->initial_state == IconicState)))
|
||||
|| (HonorStartsOnPage)) ) )
|
||||
{
|
||||
/* Get user's window placement, unless RandomPlacement is specified */
|
||||
|
|
|
@ -273,7 +273,7 @@ void checkPanFrames(void)
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* check they are the right size */
|
||||
if (edge_thickness != last_edge_thickness) {
|
||||
XResizeWindow (dpy, Scr.PanFrameTop.win, Scr.MyDisplayWidth, edge_thickness);
|
||||
|
@ -425,7 +425,7 @@ void initPanFrames()
|
|||
valuemask, &attributes);
|
||||
Scr.PanFrameTop.isMapped=Scr.PanFrameLeft.isMapped=
|
||||
Scr.PanFrameRight.isMapped= Scr.PanFrameBottom.isMapped=False;
|
||||
|
||||
|
||||
edge_thickness = saved_thickness;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,13 +56,13 @@ install:
|
|||
${DESTDIR}${INCSDIR}/X11/bitmaps" ; \
|
||||
${INSTALL_DATA} ${.CURDIR}/$$f \
|
||||
${DESTDIR}${INCSDIR}/X11/bitmaps ; \
|
||||
done
|
||||
done
|
||||
@for f in ${PIXMAPS}; do \
|
||||
echo "${INSTALL_DATA} $$f \
|
||||
${DESTDIR}${INCSDIR}/X11/pixmaps" ; \
|
||||
${INSTALL_DATA} ${.CURDIR}/$$f \
|
||||
${DESTDIR}${INCSDIR}/X11/pixmaps ; \
|
||||
done
|
||||
done
|
||||
|
||||
clean:
|
||||
|
||||
|
|
|
@ -38,12 +38,12 @@
|
|||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING.GPL. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
|
@ -60,9 +60,9 @@
|
|||
#define SCALE 65535.0
|
||||
#define HALF_SCALE (SCALE / 2)
|
||||
typedef enum {
|
||||
R_MAX_G_MIN, R_MAX_B_MIN,
|
||||
G_MAX_B_MIN, G_MAX_R_MIN,
|
||||
B_MAX_R_MIN, B_MAX_G_MIN
|
||||
R_MAX_G_MIN, R_MAX_B_MIN,
|
||||
G_MAX_B_MIN, G_MAX_R_MIN,
|
||||
B_MAX_R_MIN, B_MAX_G_MIN
|
||||
} MinMaxState;
|
||||
|
||||
|
||||
|
@ -73,9 +73,9 @@ typedef enum {
|
|||
|
||||
/* FIXMS: This can probably be optimized more, examine later. */
|
||||
|
||||
static void
|
||||
color_mult (unsigned short *red,
|
||||
unsigned short *green,
|
||||
static void
|
||||
color_mult (unsigned short *red,
|
||||
unsigned short *green,
|
||||
unsigned short *blue, double k)
|
||||
{
|
||||
if (*red == *green && *red == *blue) {
|
||||
|
@ -129,7 +129,7 @@ color_mult (unsigned short *red,
|
|||
} else {
|
||||
min = r;
|
||||
min_max_state = G_MAX_R_MIN;
|
||||
a = b - r;
|
||||
a = b - r;
|
||||
}
|
||||
} else {
|
||||
max = b;
|
||||
|
@ -138,7 +138,7 @@ color_mult (unsigned short *red,
|
|||
a = g - r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
delta = max - min;
|
||||
a = a / delta;
|
||||
|
||||
|
@ -149,7 +149,7 @@ color_mult (unsigned short *red,
|
|||
s = 2.0 * SCALE - (max + min);
|
||||
}
|
||||
s = delta/s;
|
||||
|
||||
|
||||
l *= k;
|
||||
if (l > SCALE) {
|
||||
l = SCALE;
|
||||
|
@ -162,7 +162,7 @@ color_mult (unsigned short *red,
|
|||
if (l <= HALF_SCALE) {
|
||||
max = l * (1 + s);
|
||||
} else {
|
||||
max = s * SCALE + l - s * l;
|
||||
max = s * SCALE + l - s * l;
|
||||
}
|
||||
|
||||
min = 2 * l - max;
|
||||
|
@ -204,7 +204,7 @@ color_mult (unsigned short *red,
|
|||
|
||||
*red = (unsigned short) r;
|
||||
*green = (unsigned short) g;
|
||||
*blue = (unsigned short) b;
|
||||
*blue = (unsigned short) b;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ XFontStruct *GetFontOrFixed(Display *disp, char *fontname)
|
|||
"[GetFontOrFixed]: WARNING -- can't get font %s, trying 'fixed'",
|
||||
fontname);
|
||||
/* fixed should always be avail, so try that */
|
||||
if ((fnt = XLoadQueryFont(disp,"fixed"))==NULL)
|
||||
if ((fnt = XLoadQueryFont(disp,"fixed"))==NULL)
|
||||
{
|
||||
fprintf(stderr,"[GetFontOrFixed]: ERROR -- can't get font 'fixed'");
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ char *GetArgument(char **pstr)
|
|||
/* skip tok and following whitespace/separators in pstr & DON'T realloc */
|
||||
EatWS(*pstr);
|
||||
|
||||
if (!**pstr)
|
||||
if (!**pstr)
|
||||
*pstr=NULL; /* change \0 to NULL */
|
||||
|
||||
return tok;
|
||||
|
@ -171,11 +171,11 @@ char *GetNextArgument(char *indata,char **token)
|
|||
* 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
char *GetNextArgument(char *indata,char **token)
|
||||
{
|
||||
{
|
||||
char *t,*start, *end, *text;
|
||||
|
||||
t = indata;
|
||||
|
@ -219,7 +219,7 @@ char *GetNextArgument(char *indata,char **token)
|
|||
{
|
||||
/* Check for qouted text */
|
||||
if(*start == '"')
|
||||
{
|
||||
{
|
||||
start++;
|
||||
while((*start != '"')&&(*start != 0))
|
||||
{
|
||||
|
@ -274,7 +274,7 @@ const char *MatchToken(register const char *s, register const char *w)
|
|||
if (*w=='\0' && /* end of word and */
|
||||
(*s=='\0' || ispunct(*s) || isspace(*s))) /* same in string */
|
||||
return s; /* return endptr */
|
||||
else
|
||||
else
|
||||
return NULL; /* no match */
|
||||
}
|
||||
#endif
|
||||
|
@ -286,7 +286,7 @@ const char *MatchToken(register const char *s, register const char *w)
|
|||
= 0 if s = t
|
||||
> 0 if s > t
|
||||
|
||||
Note arguments are not declares register, so the function can be
|
||||
Note arguments are not declares register, so the function can be
|
||||
used with the bsearch() <search.h> function of the c library.
|
||||
|
||||
*/
|
||||
|
@ -310,7 +310,7 @@ int XCmpToken(char *s, char **t)
|
|||
if ((*s=='\0' && (ispunct(*w) || isspace(*w)))||
|
||||
(*w=='\0' && (ispunct(*s) || isspace(*s))) )
|
||||
return 0; /* 1st word equal */
|
||||
else
|
||||
else
|
||||
return toupper(*s)-toupper(*w); /* smaller/greater */
|
||||
}
|
||||
|
||||
|
|
|
@ -43,13 +43,13 @@ char *CatString3(char *a, char *b, char *c)
|
|||
|
||||
/***************************************************************************
|
||||
* A simple routine to copy a string, stripping spaces and mallocing
|
||||
* space for the new string
|
||||
* space for the new string
|
||||
***************************************************************************/
|
||||
void CopyString(char **dest, char *source)
|
||||
{
|
||||
int len;
|
||||
char *start;
|
||||
|
||||
|
||||
if (source == NULL)
|
||||
{
|
||||
*dest = NULL;
|
||||
|
@ -66,7 +66,7 @@ void CopyString(char **dest, char *source)
|
|||
len++;
|
||||
source++;
|
||||
}
|
||||
|
||||
|
||||
source--;
|
||||
while((isspace(*source))&&(*source != 0)&&(len >0))
|
||||
{
|
||||
|
@ -75,15 +75,15 @@ void CopyString(char **dest, char *source)
|
|||
}
|
||||
*dest = safemalloc(len+1);
|
||||
strncpy(*dest,start,len);
|
||||
(*dest)[len]=0;
|
||||
(*dest)[len]=0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* Copies a string into a new, malloc'ed string
|
||||
* Strips leading spaces and trailing spaces and new lines
|
||||
*
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
char *stripcpy(char *source)
|
||||
{
|
||||
char *tmp,*ptr;
|
||||
|
@ -106,7 +106,7 @@ char *stripcpy(char *source)
|
|||
ptr[len]=0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
int StrEquals(char *s1,char *s2)
|
||||
{
|
||||
if (!s1 && !s2)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
int opt_argc = argc - 6; /* options start at 6th argument for modules */
|
||||
char **opt_argv = argv + 6;
|
||||
|
||||
/* ... (open config file, etc.) */
|
||||
/* ... (open config file, etc.) */
|
||||
|
||||
/* Get global X resources */
|
||||
MergeXResources(NULL, &db, False);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/***************************************************************************
|
||||
* Please translate the strings into the language which you use for
|
||||
* Please translate the strings into the language which you use for
|
||||
* your pop-up menus.
|
||||
*
|
||||
* Some decisions about where a function is prohibited (based on
|
||||
* mwm-function-hints) is based on a string comparison between the
|
||||
* Some decisions about where a function is prohibited (based on
|
||||
* mwm-function-hints) is based on a string comparison between the
|
||||
* menu item and the strings below.
|
||||
***************************************************************************/
|
||||
#define MOVE_STRING "move"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* safemalloc - mallocs specified space or exits if there's a
|
||||
* safemalloc - mallocs specified space or exits if there's a
|
||||
* problem
|
||||
*
|
||||
***********************************************************************/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef TRUE
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
|||
* (including the null string) '?' matches any single char. For use
|
||||
* by filenameforall. Note that '*' matches across directory boundaries
|
||||
*
|
||||
* This code donated by Paul Hudson <paulh@harlequin.co.uk>
|
||||
* This code donated by Paul Hudson <paulh@harlequin.co.uk>
|
||||
* It is public domain, no strings attached. No guarantees either.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
@ -61,7 +61,7 @@ int matchWildcards(char *pattern, char *string)
|
|||
if (*pattern == '\\')
|
||||
pattern ++; /* has strange, but harmless effects if the last
|
||||
character is a '\\' */
|
||||
if (*pattern++ != *string++)
|
||||
if (*pattern++ != *string++)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -37,5 +37,5 @@ Tells the module to display for \fIsec\fP seconds instead of default of 3.
|
|||
|
||||
|
||||
.SH AUTHOR
|
||||
Robert Nation
|
||||
Robert Nation
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "../../libs/fvwmlib.h"
|
||||
#include "../../libs/fvwmlib.h"
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* Subroutine Prototypes
|
||||
*
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
void DeadPipe(int nonsense);
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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".
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*************************************************************************
|
||||
*
|
||||
* Subroutine Prototypes
|
||||
*
|
||||
*
|
||||
*************************************************************************/
|
||||
void DeadPipe(int nonsense);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "fvwmlib.h"
|
||||
#include "fvwmlib.h"
|
||||
|
||||
extern Display *dpy;
|
||||
extern char *MyName;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
******************************************************************************/
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# -*- makefile -*-
|
||||
# -*- makefile -*-
|
||||
# $OpenBSD: Makefile.inc,v 1.9 2012/09/30 10:12:51 espie Exp $
|
||||
|
||||
.ifndef FVWM_MAKEFILE_INC
|
||||
|
|
|
@ -350,7 +350,7 @@ Key F8 A M CirculateDown
|
|||
*FvwmPagerFore white
|
||||
*FvwmPagerHilight #2d2d2d
|
||||
*FvwmPagerGeometry 80x60-1-1
|
||||
*FvwmPagerLabel 0 "OpenBSD"
|
||||
*FvwmPagerLabel 0 "SecBSD"
|
||||
*FvwmPagerLabel 1 Maker
|
||||
*FvwmPagerLabel 2 Mail
|
||||
*FvwmPagerLabel 3 Matlab
|
||||
|
|
|
@ -18,7 +18,7 @@ print "AddToMenu XLockMenu \"XLock Modes\" Title\n";
|
|||
while (<XL>)
|
||||
{
|
||||
chomp;
|
||||
|
||||
|
||||
/where mode is one of:/ && do
|
||||
{
|
||||
$start = 1;
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh
|
||||
|
||||
# Some time ago, Martin Kraemer <Martin.Kraemer@mch.sni.de> posted an
|
||||
# incomplete script to convert fvwm-1 'rc' files to fvwm-2. I've just
|
||||
# recently fixed and enhanced that script; it's complete (or nearly
|
||||
# so) now. This should help if you choose to convert.
|
||||
#
|
||||
#
|
||||
# I've also made a couple of other minor changes to make life easier
|
||||
# for our users here: I changed the default initialization from "Read
|
||||
# .fvwmrc" to "Read .fvwm2rc" (in fvwm/fvwmc), and I installed fvwm 2
|
||||
# as "fvwm2". With these changes, users can easily convert at their
|
||||
# leisure.
|
||||
#
|
||||
#
|
||||
# Herewith the script. It's using GNU awk (gawk), but will run with
|
||||
# any "new" awk (nawk on Suns (SunOS 4, Solaris), awk on most other
|
||||
# systems). If you do not use gawk, it will be case-sensitive (the
|
||||
|
@ -116,7 +116,7 @@ BEGIN {
|
|||
print $0;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
################ Rename common items ##############
|
||||
/Restart/ && /fvwm/ {
|
||||
gsub("fvwm", "fvwm2"); gsub("fvwm22","fvwm2"); # try to leave paths alone
|
||||
|
@ -390,7 +390,7 @@ BEGIN {
|
|||
|
||||
# hack: popup declarations cannot have leading whitespace
|
||||
/^Popup/ {
|
||||
if (inpopup)
|
||||
if (inpopup)
|
||||
print "ERROR: EndPopup missing\n" NR ": " $0 >"'$TTY'";
|
||||
if (infunction)
|
||||
print "ERROR: EndFunction missing\n" NR ": " $0 >"'$TTY'";
|
||||
|
@ -432,7 +432,7 @@ BEGIN {
|
|||
/^[ \t]*StubbornIcons[ \t]*/ ||
|
||||
/^[ \t]*StubbornIconPlacement[ \t]*/ ||
|
||||
/^[ \t]*StubbornPlacement[ \t]*/ ||
|
||||
/^[ \t]*Cursor[ \t]*/ {
|
||||
/^[ \t]*Cursor[ \t]*/ {
|
||||
print "#! " $0 " [deleted]";
|
||||
if (warned[$1]==FALSE) {
|
||||
print "Warning: " $1 " not in Fvwm2, command dropped" >"'$TTY'";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
* This is an all new program to set the root window to an Xpm pixmap.
|
||||
* Copyright 1993, Rob Nation
|
||||
* Copyright 1993, Rob Nation
|
||||
* You may use this file for anything you want, as long as the copyright
|
||||
* is kept intact. No guarantees of any sort are made in any way regarding
|
||||
* this program or anything related to it.
|
||||
|
@ -13,7 +13,7 @@
|
|||
#include <string.h>
|
||||
#include <X11/Xos.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include "../libs/fvwmlib.h"
|
||||
#include "../libs/fvwmlib.h"
|
||||
#include <X11/xpm.h> /* Has to be after Intrinsic.h gets included */
|
||||
|
||||
int save_colors = 0;
|
||||
|
@ -39,7 +39,7 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
dpy = XOpenDisplay(display_name);
|
||||
if (!dpy)
|
||||
if (!dpy)
|
||||
{
|
||||
fprintf(stderr, "Xpmroot: unable to open display '%s'\n",
|
||||
XDisplayName (display_name));
|
||||
|
@ -47,11 +47,11 @@ int main(int argc, char **argv)
|
|||
}
|
||||
screen = DefaultScreen(dpy);
|
||||
root = RootWindow(dpy, screen);
|
||||
|
||||
|
||||
SetRootWindow(argv[1]);
|
||||
|
||||
prop = XInternAtom(dpy, "_XSETROOT_ID", False);
|
||||
|
||||
|
||||
(void)XGetWindowProperty(dpy, root, prop, 0L, 1L, True, AnyPropertyType,
|
||||
&type, &format, &length, &after, &data);
|
||||
if ((type == XA_PIXMAP) && (format == 32) && (length == 1) && (after == 0))
|
||||
|
@ -76,8 +76,8 @@ void SetRootWindow(char *tline)
|
|||
xpm_attributes.colormap = root_attr.colormap;
|
||||
xpm_attributes.valuemask = XpmSize | XpmReturnPixels|XpmColormap;
|
||||
if((val = XpmReadFileToPixmap(dpy,root, tline,
|
||||
&rootXpm, &shapeMask,
|
||||
&xpm_attributes))!= XpmSuccess)
|
||||
&rootXpm, &shapeMask,
|
||||
&xpm_attributes))!= XpmSuccess)
|
||||
{
|
||||
if(val == XpmOpenFailed)
|
||||
fprintf(stderr, "Couldn't open pixmap file\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue