mirror of
https://github.com/NishiOwO/fvwm1.git
synced 2025-04-21 16:54:44 +00:00
Initial import
This commit is contained in:
commit
6ce28fab50
46
Cleanme
Executable file
46
Cleanme
Executable file
@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
rm modules/FvwmAudio/FvwmAudio
|
||||
rm modules/FvwmBacker/FvwmBacker
|
||||
rm modules/FvwmBanner/FvwmBanner
|
||||
rm modules/FvwmClean/FvwmClean
|
||||
rm modules/FvwmDebug/FvwmDebug
|
||||
rm modules/FvwmIconBox/FvwmIconBox
|
||||
rm modules/FvwmIdent/FvwmIdent
|
||||
rm modules/FvwmPager/FvwmPager
|
||||
rm modules/FvwmSave/FvwmSave
|
||||
rm modules/FvwmSaveDesk/FvwmSaveDesk
|
||||
rm modules/FvwmScroll/FvwmScroll
|
||||
rm modules/FvwmWinList/FvwmWinList
|
||||
rm modules/FvwmAuto/FvwmAuto
|
||||
rm modules/GoodStuff/GoodStuff
|
||||
rm fvwm/fvwm
|
||||
rm xpmroot/xpmroot
|
||||
rm libs/*.a
|
||||
rm -f *.o
|
||||
rm -f *~
|
||||
rm -f *.bak
|
||||
rm -f *.orig
|
||||
rm -f *.rej
|
||||
rm -f Makefile
|
||||
rm -f core
|
||||
rm -f #*#
|
||||
rm -f */*.o
|
||||
rm -f */*~
|
||||
rm -f */*.bak
|
||||
rm -f */*.orig
|
||||
rm -f */*.rej
|
||||
rm -f */Makefile
|
||||
rm -f */core
|
||||
rm -f */#*#
|
||||
rm -f */*/*.o
|
||||
rm -f */*/*~
|
||||
rm -f */*/*.bak
|
||||
rm -f */*/*.orig
|
||||
rm -f */*/*.rej
|
||||
rm -f */*/Makefile
|
||||
rm -f */*/core
|
||||
rm -f */*/#*#
|
||||
|
||||
|
||||
|
||||
|
45
Imakefile
Normal file
45
Imakefile
Normal file
@ -0,0 +1,45 @@
|
||||
/* Imakefile for fvwm-1.20 and later. 1/31/94. */
|
||||
/* Procedure is xmkmf; make Makefiles; make all */
|
||||
/* make install; make install.man */
|
||||
|
||||
/* I need to get the #define XPM from configuration.h if its in there, */
|
||||
/* so that I can tell if I should include -lXpm */
|
||||
#include <configure.h>
|
||||
|
||||
#define IHaveSubdirs
|
||||
|
||||
/* Can define CDEBUGFLAGS to anything you need */
|
||||
/*CDEBUGFLAGS = -LMyLibrarydir*/
|
||||
|
||||
ALLSUBDIRS = libs \
|
||||
fvwm \
|
||||
modules/GoodStuff \
|
||||
modules/FvwmIdent \
|
||||
modules/FvwmDebug \
|
||||
modules/FvwmBacker \
|
||||
modules/FvwmClean \
|
||||
modules/FvwmPager \
|
||||
modules/FvwmAudio \
|
||||
modules/FvwmScroll \
|
||||
modules/FvwmIconBox \
|
||||
modules/FvwmSave \
|
||||
modules/FvwmSaveDesk \
|
||||
modules/FvwmAuto \
|
||||
modules/FvwmWinList
|
||||
|
||||
#ifdef XPM
|
||||
XPMSUBDIRS = xpmroot modules/FvwmBanner
|
||||
#endif
|
||||
|
||||
SUBDIRS = $(ALLSUBDIRS) $(XPMSUBDIRS) $(SHAPESUBDIRS)
|
||||
/* I have absolutely no idea what this does, but it seems to be needed */
|
||||
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
|
||||
|
||||
MakeSubdirs($(SUBDIRS))
|
||||
|
||||
/* Doesn't work for me! */
|
||||
/* #DependSubdirs($(SUBDIRS))*/
|
||||
|
||||
|
||||
|
||||
|
20
MakeMakefiles
Executable file
20
MakeMakefiles
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Replaces the commands xmkmf; make Makefiles for my broken setup.
|
||||
#
|
||||
|
||||
echo Making top-level Makefile
|
||||
xmkmf
|
||||
echo done
|
||||
|
||||
TOPDIR=`pwd`
|
||||
echo TOPDIR is $TOPDIR
|
||||
|
||||
for i in libs fvwm xpmroot modules/*
|
||||
do
|
||||
echo Making Makefile in $i
|
||||
cd $i ; xmkmf ; cd $TOPDIR
|
||||
echo done
|
||||
done
|
||||
|
||||
|
55
README.Install
Normal file
55
README.Install
Normal file
@ -0,0 +1,55 @@
|
||||
|
||||
This is release 1.something of fvwm.
|
||||
|
||||
fvwm is a relatively small window manager which provides a 3-D look for window
|
||||
decorations and a virtual desktop. It is reconfigurable in a manner
|
||||
similar to twm. Most of the Twm functionality has been maintained, with
|
||||
some new features added.
|
||||
|
||||
I would like to know about any bugs that you find.
|
||||
|
||||
In this release, there are many optional configuration items.
|
||||
Edit configure.h in this directory. Look in the file OS_specifics for settings
|
||||
that may be required to satisfy your operating system.
|
||||
|
||||
Edit the Imakefile in this directory if needed.
|
||||
|
||||
You should not need to modify the individual Imakefiles much.
|
||||
X11R4 users will want to edit fvwm/Imakefile and change
|
||||
InstallNonExecFile to InstallNonExec
|
||||
|
||||
Untar the fvwm-modules.tar file in this directory. If someone would like to
|
||||
clean up the build procedure, please do.
|
||||
|
||||
Untar the fvwm-icons.tar file in this directory. If someone would like to
|
||||
clean up the build procedure, please do.
|
||||
|
||||
execute the following commands
|
||||
|
||||
xmkmf
|
||||
make Makefiles
|
||||
(If this command fails or ends in an endless loop,
|
||||
use the shell script MakeMakefiles).
|
||||
make all
|
||||
Monitor the output of the above commands for error messages.
|
||||
|
||||
(It is likely that you will need root privilege to write to the
|
||||
installation directories. If so, become root now)
|
||||
make install
|
||||
make install.man
|
||||
Copy fvwm_icons/*.xpm to /usr/include/X11/pixmaps if you want to.
|
||||
Copy fvwm_icons/*.xbm to /usr/include/X11/bitmaps if you want to.
|
||||
Copy fvwm_icons/*.bitmap to /usr/include/X11/bitmaps if you want to.
|
||||
Copy fvwm_icons/*.icon to /usr/include/X11/bitmaps if you want to.
|
||||
|
||||
|
||||
When that's done, you can look at the optional modules in the
|
||||
optional directory. These will need to be built one by one. These
|
||||
modules are the ones which I believe may depend on the existence of
|
||||
software packages or hardware components which may not exist for many
|
||||
systems.
|
||||
|
||||
|
||||
Rob Nation
|
||||
|
||||
|
205
configure.h
Normal file
205
configure.h
Normal file
@ -0,0 +1,205 @@
|
||||
#define FVWMDIR "/usr/lib/X11/fvwm"
|
||||
/* #define FVWMDIR "/local/homes/dsp/nation/modules"*/
|
||||
#define FVWM_ICONDIR "/usr/include/X11/bitmaps:/usr/include/X11/pixmaps"
|
||||
#define FVWMRC "/usr/lib/X11/fvwm/system.fvwmrc"
|
||||
|
||||
/* Imake command needed to put modules in desired target location */
|
||||
/* Use the second version if it causes grief */
|
||||
#define TARGET_DIR BINDIR=FVWMDIR
|
||||
/* #define TARGET_DIR*/
|
||||
|
||||
|
||||
/* If you want Imake to leave your binary in the standard place where
|
||||
* Imake wants to leave binaries, then choose the second line here.
|
||||
* If you want to install it in a different directory, uncomment and
|
||||
* edit the first line */
|
||||
/* #define FVWM_BIN_DIR BINDIR=/local/homes/dsp/nation/bin/4.1.3*/
|
||||
#define FVWM_BIN_DIR BINDIR=/usr/bin/X11
|
||||
/*#define FVWM_BIN_DIR*/
|
||||
|
||||
/* Compiler over-ride for Imakefiles */
|
||||
/* Leave it as shown to get your default compiler */
|
||||
#define COMPILER CC=gcc
|
||||
/* #define COMPILER */
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*#define SHAPE
|
||||
* If you want the Shaped window extensions, specify #define SHAPE
|
||||
* Shaped window extensions seem to increase the window managers RSS
|
||||
* by about 60 Kbytes. They provide for leaving a title-bar on the window
|
||||
* without a border.
|
||||
* If you dont use shaped window extension, you can either make your shaped
|
||||
* windows undecorated, or live with a border and backdrop around all
|
||||
* your shaped windows (oclock, xeyes)
|
||||
*
|
||||
* If you normally use a shaped window (xeyes or oclock), you might as
|
||||
* well compile this extension in, since the memory cost is minimal in
|
||||
* this case (The shaped window shared libs will be loaded anyway. If you
|
||||
* don't normally use a shaped window, you have to decide for yourself
|
||||
***************************************************************************/
|
||||
#define SHAPE
|
||||
|
||||
/***************************************************************************
|
||||
*#define XPM
|
||||
* if you want color icons, specify #define XPM, and get libXpm
|
||||
* from sunsite.unc.edu. The following files are recommended in addition
|
||||
* to the fvwm package (from ftp.x.org)
|
||||
* /pub/R6untarred/contrib/lib/xpm-3.4c
|
||||
* /pub/X11/contrib/xpm3icons.tar.Z, sample icons
|
||||
* /pub/X11/contrib/ctwm-3.0.tar.Z, pull out the icons. ctwm has really nice
|
||||
* color icons.
|
||||
* and this from ftp.x.org:
|
||||
* /contrib/icons.tar.gz, lots of sample icons,
|
||||
*
|
||||
* For monochrome, Xpm icons still work, but they're only better than regular
|
||||
* bitmaps because they're shaped (if you specify #define SHAPE).
|
||||
***************************************************************************/
|
||||
#define XPM
|
||||
/* linker flags needed to locate and link in the Xpm library, if you use it */
|
||||
#define XPMLIBRARY -L/usr/lib/X11 -lXpm
|
||||
|
||||
/***************************************************************************
|
||||
*#define M4
|
||||
* Causes m4 pre-processor patches to be included. Try man m4 for more info.
|
||||
* Warning: m4 defines macros for some simple things like "include"
|
||||
* which might mess up a config like
|
||||
* IconPath /usr/include/X11/bitmaps, for example, so you
|
||||
* would need to include
|
||||
* undefine(`include') to fix that one. Some version of m4
|
||||
* seem to give good error messages, others don't?
|
||||
***************************************************************************/
|
||||
/* #define M4 */
|
||||
|
||||
/***************************************************************************
|
||||
*#define NO_PAGER
|
||||
* Omits the code for the built-in pager. The pager module FvwmPager
|
||||
* can be used instead.
|
||||
***************************************************************************/
|
||||
/* #define NO_PAGER */
|
||||
|
||||
/***************************************************************************
|
||||
*#define NON_VIRTUAL
|
||||
* Omits the virtual desktop - requires NO_PAGER
|
||||
***************************************************************************/
|
||||
/* #define NON_VIRTUAL */
|
||||
|
||||
/***************************************************************************
|
||||
*#define NO_SAVEUNDERS
|
||||
* tells thw WM not to request save unders for pop-up
|
||||
* menus. A quick test using monochrome X11 shows that save
|
||||
* unders cost about 4Kbytes RAM, but saves a lot of
|
||||
* window redraws if you have windows that take a while
|
||||
* to refresh. For xcolor, I assume the cost is more like
|
||||
* 4Kbytesx8 = 32kbytes (256 color).
|
||||
***************************************************************************/
|
||||
/* #define NO_SAVEUNDERS */
|
||||
|
||||
/***************************************************************************
|
||||
*#define NO_WINDOWLIST
|
||||
* Caused fvwm built-in window-list to be omitted. The window-list
|
||||
* module FvwmWinList can be used instead
|
||||
***************************************************************************/
|
||||
/* #define NO_WINDOWLIST */
|
||||
|
||||
/***************************************************************************
|
||||
*#define PRUNE
|
||||
* Removes old configuration commands:
|
||||
* BoundaryWidth, NoBoundaryWidth, Sticky, NoTitle, NoBorder,
|
||||
* StaysOnTop, StartsOnDesk, CirculateSkip, WindowListSkip, Icon,
|
||||
* SuppressIcons, and Module (when used for initial startup
|
||||
* These commands were replaced with Style, except for the Module
|
||||
* command, which is replaced with InitFunction
|
||||
*
|
||||
*
|
||||
***************************************************************************/
|
||||
/* #define PRUNE */
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* Really, no one but me should need this
|
||||
*
|
||||
************************************************************************/
|
||||
#if defined __sun__ && !defined SYSV
|
||||
#define BROKEN_SUN_HEADERS
|
||||
#endif
|
||||
/***************************************************************************
|
||||
*
|
||||
* In theory, this stuff can be replaced with GNU Autoconf
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
#if defined _POSIX_SOURCE || defined SYSV || defined __sun__
|
||||
|
||||
#define HAVE_WAITPID 1
|
||||
#define HAVE_GETITIMER 1
|
||||
#define HAVE_SETITIMER 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_UNAME 1
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
#else
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Do it yourself here if you don't like the above!
|
||||
*
|
||||
**************************************************************************/
|
||||
/***************************************************************************
|
||||
* Define if you have waitpid.
|
||||
**************************************************************************/
|
||||
#define HAVE_WAITPID 1
|
||||
/***************************************************************************
|
||||
* Define if you have getitimer/setitimer.
|
||||
* undefining this will break auto-raise
|
||||
**************************************************************************/
|
||||
#define HAVE_GETITIMER 1
|
||||
#define HAVE_SETITIMER 1
|
||||
|
||||
/***************************************************************************
|
||||
* Define if you have sysconf
|
||||
**************************************************************************/
|
||||
#define HAVE_SYSCONF 1
|
||||
|
||||
/***************************************************************************
|
||||
* Define if you have uname. Otherwise, define gethostname
|
||||
***************************************************************************/
|
||||
#define HAVE_UNAME 1
|
||||
/* #define HAVE_GETHOSTNAME 1 */
|
||||
|
||||
#endif /* End of do-it-yourself OS support section */
|
||||
|
||||
|
||||
/* 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
|
||||
* menu item and the strings below */
|
||||
#define MOVE_STRING "move"
|
||||
#define RESIZE_STRING1 "size"
|
||||
#define RESIZE_STRING2 "resize"
|
||||
#define MINIMIZE_STRING "minimize"
|
||||
#define MINIMIZE_STRING2 "iconify"
|
||||
#define MAXIMIZE_STRING "maximize"
|
||||
#define CLOSE_STRING1 "close"
|
||||
#define CLOSE_STRING2 "delete"
|
||||
#define CLOSE_STRING3 "destroy"
|
||||
#define CLOSE_STRING4 "quit"
|
||||
|
||||
#ifdef __alpha
|
||||
#define NEEDS_ALPHA_HEADER
|
||||
#undef BROKEN_SUN_HEADERS
|
||||
#endif /* (__alpha) */
|
||||
|
||||
|
||||
/* Allows gcc users to use inline, doesn't cause problems
|
||||
* for others. */
|
||||
#ifndef __GNUC__
|
||||
#define FVWM_INLINE /*nothing*/
|
||||
#else
|
||||
#if defined(__GNUC__) && !defined(inline)
|
||||
#define FVWM_INLINE __inline__
|
||||
#else
|
||||
#define FVWM_INLINE inline
|
||||
#endif
|
||||
#endif
|
44
documentation/WhereToGetIt
Normal file
44
documentation/WhereToGetIt
Normal file
@ -0,0 +1,44 @@
|
||||
Return-Path: morton!joe@sd.com
|
||||
Return-Path: <morton!joe@sd.com>
|
||||
Received: from sd.com (guardian.tessi.com) by rocket (SPCOT.6)
|
||||
id AA06675; Wed, 30 Mar 94 18:08:00 EST
|
||||
Received: from guardian.tessi.com by sd.com (4.1/SMI-4.1)
|
||||
id AA02292; Wed, 30 Mar 94 15:07:52 PST
|
||||
Received: by morton.rain.com (/\==/\ Smail3.1.25.1 #25.3)
|
||||
id <m0pm9I8-0007jGC@morton.rain.com>; Wed, 30 Mar 94 15:03 PST
|
||||
Message-Id: <m0pm9I8-0007jGC@morton.rain.com>
|
||||
From: joe@morton.rain.com (Joe Moss)
|
||||
Subject: Re: fvwm versions: I'm confused
|
||||
Date: Wed, 30 Mar 94 15:03:19 PST
|
||||
In-Reply-To: <9403292134.AA26150@rocket>; from "Robert Nation" at Mar 29, 94 4:34 pm
|
||||
X-Mailer: ELM [version 2.3 PL11]
|
||||
|
||||
|
||||
|
||||
Robert,
|
||||
|
||||
A couple of suggestions:
|
||||
|
||||
1) Place a file in the fvwm distribution called 'WhereToGet'
|
||||
which tells people that the latested released version
|
||||
is on sunsite and that the latest beta version can be
|
||||
obtained from spcot.sanders.com - I think it would
|
||||
cut down on a lot of questions
|
||||
|
||||
2) A good source of icons is the directory 'AIcons' in
|
||||
the contrib directory of any X archive site, e.g.:
|
||||
|
||||
ftp.x.org: /contrib/AIcons
|
||||
|
||||
this is collection of the best icons taken from many
|
||||
sources (including the ones you're currently pointing
|
||||
people to). It also has the advantage of having had
|
||||
the colors reduced to a standard colormap of 30 or
|
||||
so colors, so the icons don't use up the entire color
|
||||
map on a PsuedoColor display
|
||||
|
||||
--
|
||||
Joe V. Moss | joe@morton.rain.com
|
||||
Morton & Associates | joem@m2xenix.psg.com
|
||||
7478 S.W. Coho Ct. | - or -
|
||||
Tualatin, OR 97062-9277 | uunet!m2xenix!morton!joe
|
209
documentation/error_codes
Normal file
209
documentation/error_codes
Normal file
@ -0,0 +1,209 @@
|
||||
/**********************************************************************
|
||||
*
|
||||
* This file contains the codes needed to descipher an Fvwm Internal
|
||||
* Error. This list is compiled from pieces of the X include files,
|
||||
* but is not actually used by the fvwm code. It is included for
|
||||
* debugging purposes.
|
||||
*********************************************************************/
|
||||
|
||||
/*************************************************************************
|
||||
* Request codes
|
||||
* From Xproto.h
|
||||
*************************************************************************/
|
||||
|
||||
#define X_CreateWindow 1
|
||||
#define X_ChangeWindowAttributes 2
|
||||
#define X_GetWindowAttributes 3
|
||||
#define X_DestroyWindow 4
|
||||
#define X_DestroySubwindows 5
|
||||
#define X_ChangeSaveSet 6
|
||||
#define X_ReparentWindow 7
|
||||
#define X_MapWindow 8
|
||||
#define X_MapSubwindows 9
|
||||
#define X_UnmapWindow 10
|
||||
#define X_UnmapSubwindows 11
|
||||
#define X_ConfigureWindow 12
|
||||
#define X_CirculateWindow 13
|
||||
#define X_GetGeometry 14
|
||||
#define X_QueryTree 15
|
||||
#define X_InternAtom 16
|
||||
#define X_GetAtomName 17
|
||||
#define X_ChangeProperty 18
|
||||
#define X_DeleteProperty 19
|
||||
#define X_GetProperty 20
|
||||
#define X_ListProperties 21
|
||||
#define X_SetSelectionOwner 22
|
||||
#define X_GetSelectionOwner 23
|
||||
#define X_ConvertSelection 24
|
||||
#define X_SendEvent 25
|
||||
#define X_GrabPointer 26
|
||||
#define X_UngrabPointer 27
|
||||
#define X_GrabButton 28
|
||||
#define X_UngrabButton 29
|
||||
#define X_ChangeActivePointerGrab 30
|
||||
#define X_GrabKeyboard 31
|
||||
#define X_UngrabKeyboard 32
|
||||
#define X_GrabKey 33
|
||||
#define X_UngrabKey 34
|
||||
#define X_AllowEvents 35
|
||||
#define X_GrabServer 36
|
||||
#define X_UngrabServer 37
|
||||
#define X_QueryPointer 38
|
||||
#define X_GetMotionEvents 39
|
||||
#define X_TranslateCoords 40
|
||||
#define X_WarpPointer 41
|
||||
#define X_SetInputFocus 42
|
||||
#define X_GetInputFocus 43
|
||||
#define X_QueryKeymap 44
|
||||
#define X_OpenFont 45
|
||||
#define X_CloseFont 46
|
||||
#define X_QueryFont 47
|
||||
#define X_QueryTextExtents 48
|
||||
#define X_ListFonts 49
|
||||
#define X_ListFontsWithInfo 50
|
||||
#define X_SetFontPath 51
|
||||
#define X_GetFontPath 52
|
||||
#define X_CreatePixmap 53
|
||||
#define X_FreePixmap 54
|
||||
#define X_CreateGC 55
|
||||
#define X_ChangeGC 56
|
||||
#define X_CopyGC 57
|
||||
#define X_SetDashes 58
|
||||
#define X_SetClipRectangles 59
|
||||
#define X_FreeGC 60
|
||||
#define X_ClearArea 61
|
||||
#define X_CopyArea 62
|
||||
#define X_CopyPlane 63
|
||||
#define X_PolyPoint 64
|
||||
#define X_PolyLine 65
|
||||
#define X_PolySegment 66
|
||||
#define X_PolyRectangle 67
|
||||
#define X_PolyArc 68
|
||||
#define X_FillPoly 69
|
||||
#define X_PolyFillRectangle 70
|
||||
#define X_PolyFillArc 71
|
||||
#define X_PutImage 72
|
||||
#define X_GetImage 73
|
||||
#define X_PolyText8 74
|
||||
#define X_PolyText16 75
|
||||
#define X_ImageText8 76
|
||||
#define X_ImageText16 77
|
||||
#define X_CreateColormap 78
|
||||
#define X_FreeColormap 79
|
||||
#define X_CopyColormapAndFree 80
|
||||
#define X_InstallColormap 81
|
||||
#define X_UninstallColormap 82
|
||||
#define X_ListInstalledColormaps 83
|
||||
#define X_AllocColor 84
|
||||
#define X_AllocNamedColor 85
|
||||
#define X_AllocColorCells 86
|
||||
#define X_AllocColorPlanes 87
|
||||
#define X_FreeColors 88
|
||||
#define X_StoreColors 89
|
||||
#define X_StoreNamedColor 90
|
||||
#define X_QueryColors 91
|
||||
#define X_LookupColor 92
|
||||
#define X_CreateCursor 93
|
||||
#define X_CreateGlyphCursor 94
|
||||
#define X_FreeCursor 95
|
||||
#define X_RecolorCursor 96
|
||||
#define X_QueryBestSize 97
|
||||
#define X_QueryExtension 98
|
||||
#define X_ListExtensions 99
|
||||
#define X_ChangeKeyboardMapping 100
|
||||
#define X_GetKeyboardMapping 101
|
||||
#define X_ChangeKeyboardControl 102
|
||||
#define X_GetKeyboardControl 103
|
||||
#define X_Bell 104
|
||||
#define X_ChangePointerControl 105
|
||||
#define X_GetPointerControl 106
|
||||
#define X_SetScreenSaver 107
|
||||
#define X_GetScreenSaver 108
|
||||
#define X_ChangeHosts 109
|
||||
#define X_ListHosts 110
|
||||
#define X_SetAccessControl 111
|
||||
#define X_SetCloseDownMode 112
|
||||
#define X_KillClient 113
|
||||
#define X_RotateProperties 114
|
||||
#define X_ForceScreenSaver 115
|
||||
#define X_SetPointerMapping 116
|
||||
#define X_GetPointerMapping 117
|
||||
#define X_SetModifierMapping 118
|
||||
#define X_GetModifierMapping 119
|
||||
#define X_NoOperation 127
|
||||
|
||||
/*****************************************************************
|
||||
* ERROR CODES
|
||||
* from X.h
|
||||
*****************************************************************/
|
||||
|
||||
#define Success 0 /* everything's okay */
|
||||
#define BadRequest 1 /* bad request code */
|
||||
#define BadValue 2 /* int parameter out of range */
|
||||
#define BadWindow 3 /* parameter not a Window */
|
||||
#define BadPixmap 4 /* parameter not a Pixmap */
|
||||
#define BadAtom 5 /* parameter not an Atom */
|
||||
#define BadCursor 6 /* parameter not a Cursor */
|
||||
#define BadFont 7 /* parameter not a Font */
|
||||
#define BadMatch 8 /* parameter mismatch */
|
||||
#define BadDrawable 9 /* parameter not a Pixmap or Window */
|
||||
#define BadAccess 10 /* depending on context:
|
||||
- key/button already grabbed
|
||||
- attempt to free an illegal
|
||||
cmap entry
|
||||
- attempt to store into a read-only
|
||||
color map entry.
|
||||
- attempt to modify the access control
|
||||
list from other than the local host.
|
||||
*/
|
||||
#define BadAlloc 11 /* insufficient resources */
|
||||
#define BadColor 12 /* no such colormap */
|
||||
#define BadGC 13 /* parameter not a GC */
|
||||
#define BadIDChoice 14 /* choice not in range or already used */
|
||||
#define BadName 15 /* font or color name doesn't exist */
|
||||
#define BadLength 16 /* Request length incorrect */
|
||||
#define BadImplementation 17 /* server is defective */
|
||||
|
||||
#define FirstExtensionError 128
|
||||
#define LastExtensionError 255
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* Event Types
|
||||
* From X.h
|
||||
*************************************************************************/
|
||||
#define KeyPress 2
|
||||
#define KeyRelease 3
|
||||
#define ButtonPress 4
|
||||
#define ButtonRelease 5
|
||||
#define MotionNotify 6
|
||||
#define EnterNotify 7
|
||||
#define LeaveNotify 8
|
||||
#define FocusIn 9
|
||||
#define FocusOut 10
|
||||
#define KeymapNotify 11
|
||||
#define Expose 12
|
||||
#define GraphicsExpose 13
|
||||
#define NoExpose 14
|
||||
#define VisibilityNotify 15
|
||||
#define CreateNotify 16
|
||||
#define DestroyNotify 17
|
||||
#define UnmapNotify 18
|
||||
#define MapNotify 19
|
||||
#define MapRequest 20
|
||||
#define ReparentNotify 21
|
||||
#define ConfigureNotify 22
|
||||
#define ConfigureRequest 23
|
||||
#define GravityNotify 24
|
||||
#define ResizeRequest 25
|
||||
#define CirculateNotify 26
|
||||
#define CirculateRequest 27
|
||||
#define PropertyNotify 28
|
||||
#define SelectionClear 29
|
||||
#define SelectionRequest 30
|
||||
#define SelectionNotify 31
|
||||
#define ColormapNotify 32
|
||||
#define ClientMessage 33
|
||||
#define MappingNotify 34
|
||||
#define LASTEvent 35 /* must be bigger than any event # */
|
||||
|
127
documentation/m4_hacks
Normal file
127
documentation/m4_hacks
Normal file
@ -0,0 +1,127 @@
|
||||
Return-Path: dale@felix.dircon.co.uk
|
||||
Return-Path: <dale@felix.dircon.co.uk>
|
||||
Received: from eagle.is.lmsc.lockheed.com by rocket (SPCOT.6)
|
||||
id AA07582; Wed, 30 Mar 94 21:26:48 EST
|
||||
Received: from felix.dircon.co.uk by eagle.is.lmsc.lockheed.com (5.65/Ultrix4.3-C)
|
||||
id AA27884; Wed, 30 Mar 1994 18:24:30 -0800
|
||||
Received: from ISOlde.dale.co.uk by tristan.dale.co.uk with smtp
|
||||
(Linux Smail3.1.28.1 #25) id m0pm2IB-0002kOC; Wed, 30 Mar 94 16:34 BST
|
||||
Received: by ISOlde.dale.co.uk (Linux Smail3.1.28.1 #25)
|
||||
id m0pm2IP-000JHaC; Wed, 30 Mar 94 16:35 BST
|
||||
Message-Id: <m0pm2IP-000JHaC@ISOlde.dale.co.uk>
|
||||
Date: Wed, 30 Mar 94 16:35 BST
|
||||
From: Pete.Chown@dale.dircon.co.uk
|
||||
Subject: fvwm, copyright infringement, m4, etc...
|
||||
|
||||
I came up with a hack in m4 to get round the problem where you get
|
||||
substitution for ordinary words, like 'include'. I wanted to
|
||||
substitute a # onto the beginning of every command, so you say
|
||||
#include as in cpp. I couldn't do that because only the underscore
|
||||
and the alphabetics are recognised by m4 as being legitimate in
|
||||
identifiers. However, I put an underscore onto the beginning, and
|
||||
that seems to work quite well.
|
||||
|
||||
Given that you refer to the same problem in the documentation for
|
||||
fvwm, I thought I would send the hack to you:
|
||||
|
||||
------ snip ------ snip ------ snip ------ snip ------ snip ------ snip
|
||||
divert(-1)
|
||||
changequote(+,-)
|
||||
changequote(@`,@')
|
||||
define(_,@`_dnl @')
|
||||
|
||||
# We now add an underscore onto the front of all the builtins, to prevent
|
||||
# unexpected conflicts with words in the text. The following gross hack does
|
||||
# this. Understand it if you can... ;-)
|
||||
|
||||
define(def,defn(@`define@'))
|
||||
define(definition,defn(@`defn@'))
|
||||
define(remove,defn(@`undefine@'))
|
||||
define(alias,@`def(@`$2@',definition(@`$1@'))@')
|
||||
define(hack,@`alias(@`$1@',@`_$1@') remove(@`$1@')@')
|
||||
|
||||
hack(@`builtin@')
|
||||
hack(@`changecom@')
|
||||
hack(@`changequote@')
|
||||
hack(@`debugfile@')
|
||||
hack(@`debugmode@')
|
||||
hack(@`decr@')
|
||||
hack(@`define@')
|
||||
hack(@`defn@')
|
||||
hack(@`divert@')
|
||||
hack(@`divnum@')
|
||||
hack(@`dnl@')
|
||||
hack(@`dumpdef@')
|
||||
hack(@`errprint@')
|
||||
hack(@`esyscmd@')
|
||||
hack(@`eval@')
|
||||
hack(@`file@')
|
||||
hack(@`format@')
|
||||
hack(@`gnu@')
|
||||
hack(@`ifdef@')
|
||||
hack(@`ifelse@')
|
||||
hack(@`include@')
|
||||
hack(@`incr@')
|
||||
hack(@`index@')
|
||||
hack(@`indir@')
|
||||
hack(@`len@')
|
||||
hack(@`line@')
|
||||
hack(@`m4exit@')
|
||||
hack(@`m4wrap@')
|
||||
hack(@`maketemp@')
|
||||
hack(@`patsubst@')
|
||||
hack(@`popdef@')
|
||||
hack(@`pushdef@')
|
||||
hack(@`regexp@')
|
||||
hack(@`shift@')
|
||||
hack(@`sinclude@')
|
||||
hack(@`substr@')
|
||||
hack(@`syscmd@')
|
||||
hack(@`sysval@')
|
||||
hack(@`traceoff@')
|
||||
hack(@`traceon@')
|
||||
hack(@`translit@')
|
||||
hack(@`undefine@')
|
||||
hack(@`undivert@')
|
||||
hack(@`unix@')
|
||||
|
||||
_undefine(@`def@')
|
||||
_undefine(@`definition@')
|
||||
_undefine(@`alias@')
|
||||
_undefine(@`hack@')
|
||||
|
||||
_divert(0)
|
||||
------ snip ------ snip ------ snip ------ snip ------ snip ------ snip
|
||||
|
||||
(I redefine the quotes as well, because I find that the ordinary
|
||||
single quote characters are much too common in text that you want to
|
||||
preprocess.)
|
||||
|
||||
One problem with this script is that if someone extends m4 by adding a
|
||||
new builtin command foo, say, then it will not get an underscore
|
||||
prepended; this is because you can't get m4 to give you a complete
|
||||
list of builtins. For the same reason, the script will probably give
|
||||
trouble with System V m4, because it won't have definitions for the
|
||||
GNU extensions.
|
||||
|
||||
Anyway, do what you want with the script - if you think it might be
|
||||
useful to fvwm users you are more than welcome to include it in the
|
||||
distribution. Or file it away in /dev/null if you are unimpressed.
|
||||
|
||||
I was rather concerned by the little bit of Motif that is getting
|
||||
distributed along with fvwm. It may be only a couple of pages out of
|
||||
10M (is Motif really that big? Argh!) but that will not stop you
|
||||
getting sued. If the Motif people start to get the idea that they are
|
||||
not selling so many copies because people use fvwm instead of twm,
|
||||
they will sue you for copyright infringement - not because there is
|
||||
any particular justice to them protecting two pages of code, but just
|
||||
because it is the easiest way of making you go away.
|
||||
|
||||
It is correct that there is no copyright in structures, only in the
|
||||
source code that defines them. So you would be quite within your
|
||||
rights to rewrite the offending two pages, and then I can't see that
|
||||
there is anything that the Motif people could do.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Pete.Chown@dale.dircon.co.uk "The Pen is mightier than the Quill"
|
||||
-- anonymous
|
24
documentation/mailing_list
Normal file
24
documentation/mailing_list
Normal file
@ -0,0 +1,24 @@
|
||||
A kind soul has set up a mailing list for fvwm. Here's the info:
|
||||
|
||||
|
||||
Okay, I set it up...
|
||||
|
||||
1. To subscribe:
|
||||
|
||||
mail to Majordomo@wonderland.org with the body of the message:
|
||||
|
||||
subscribe fvwm
|
||||
|
||||
That's all there is to it. To send to the list, mail to fvwm@wonderland.org.
|
||||
|
||||
2. To unsubscribe
|
||||
If you are bored with this list, the way to get off of the list is to mail
|
||||
Majordomo@wonderland.org a one line message (subject is ignored) saying
|
||||
unsubscribe fvwm -- that's it. If you get an error message, mail me,
|
||||
and I'll do it by hand.
|
||||
|
||||
3. There's also fvwm-announce. Just change 'fvwm' in the above instructions to
|
||||
'fvwm-announce'.
|
||||
|
||||
|
||||
|
391
documentation/modules.tex
Normal file
391
documentation/modules.tex
Normal file
@ -0,0 +1,391 @@
|
||||
\documentstyle[11pt]{article} % Specifies the document style.
|
||||
\setlength{\textwidth}{6in}
|
||||
\setlength{\oddsidemargin}{.25in}
|
||||
\setlength{\topmargin}{0in}
|
||||
\setlength{\textheight}{8in}
|
||||
\setcounter{secnumdepth}{2}
|
||||
|
||||
\begin{document} % End of preamble and beginning of text.
|
||||
|
||||
\title {The Fvwm Module Interface}
|
||||
\date{\today}
|
||||
\author {Robert J. Nation}
|
||||
\maketitle
|
||||
|
||||
\section{Concept}
|
||||
The module interface had several design goals:
|
||||
\begin{itemize}
|
||||
\item{Modules (user programs) should be able to provide the window
|
||||
manager with a limited amount of instruction regarding instructions to
|
||||
execute.}
|
||||
\item{Modules should not be able to corrupt the internal data bases
|
||||
maintained by Fvwm, nor should unauthorized modules be able to
|
||||
interface to Fvwm.}
|
||||
\item{Modules should be able to extract all or nearly all information
|
||||
held by the window manager, in a simple manner, to provide users with
|
||||
feedback not available from built in services.}
|
||||
\item{Modules should gracefully terminate when the window manager
|
||||
dies, quits, or is re-started.}
|
||||
\item{It should be possible for programmer-users to add modules
|
||||
without understanding the internals of Fvwm. Ideally, modules could be
|
||||
written in some scripting language such as Tcl/Tk.}
|
||||
\end{itemize}
|
||||
These goals have not entirely been met at this point, as the module
|
||||
interface is a work in progress.
|
||||
|
||||
\section{Implementation Overview}
|
||||
Although the module interface is not complete, some details of its
|
||||
implementation are available.
|
||||
\subsection{Security}
|
||||
Limited effort has been placed on security issues. In short, modules
|
||||
can not communicate with Fvwm unless they are launched by Fvwm, which
|
||||
means that they must be listed in the user's .fvwmrc file.
|
||||
Modules can only issue commands to Fvwm that could be issued from a
|
||||
menu or key binding. These measures do not keep a poorly written
|
||||
module from destroying windows or terminating an X session, but they
|
||||
do keep users from maliciously connecting to another users window
|
||||
manager, and it should keep modules from corrupting the Fvwm internal
|
||||
databases.
|
||||
\subsection{Interface and Initialization Mechanism}
|
||||
Modules MUST be launched by Fvwm. Fvwm will first open a pair of pipes
|
||||
for communication with the module. One pipe is for messages to Fvwm
|
||||
from the module, and the other is for messages to the module from
|
||||
Fvwm. Each module has its own pair of pipes. After the pipes are open,
|
||||
Fvwm will fork and spawn the module. Modules must be located in the
|
||||
ModulePath, as specified in the user's .fvwmrc file. Modules can be
|
||||
initiated as fvwm starts up, or can be launched part way through an X
|
||||
session.
|
||||
|
||||
The pipes already will be open when the module starts execution. The
|
||||
integer file descriptor are passed to the module as the first and
|
||||
second command line arguments. The third command line argument is the
|
||||
full path name of the .fvwmrc file that fvwm used during
|
||||
initialization. The next command line argument is the application
|
||||
window in whose context the module was launched. This will be 0 if the
|
||||
module is launched without an application window context. The next
|
||||
argument is the context of the window decoration in which the module
|
||||
was launched. Contexts are listed below:
|
||||
\begin{verbatim}
|
||||
#define C_NO_CONTEXT 0 - launched during initialization
|
||||
#define C_WINDOW 1 - launched from an application window
|
||||
#define C_TITLE 2 - launched from a title bar
|
||||
#define C_ICON 4 - launched from an icon window
|
||||
#define C_ROOT 8 - launched from the root window
|
||||
#define C_FRAME 16 - launched from a corner piece
|
||||
#define C_SIDEBAR 32 - launched from a side-bar
|
||||
#define C_L1 64 - launched from left button #1
|
||||
#define C_L2 128 - launched from left button #2
|
||||
#define C_L3 256 - launched from left button #3
|
||||
#define C_L4 512 - launched from left button #4
|
||||
#define C_L5 1024 - launched from left button #5
|
||||
#define C_R1 2048 - launched from right button #1
|
||||
#define C_R2 4096 - launched from right button #2
|
||||
#define C_R3 8192 - launched from right button #3
|
||||
#define C_R4 16384 - launched from right button #4
|
||||
#define C_R5 32768 - launched from right button #5
|
||||
\end{verbatim}
|
||||
An additional, user specified, command line argument may be present
|
||||
(it optional). This argument is the entire
|
||||
body of the Module command line in the .fvwmrc file,
|
||||
after the actual name of the module. It may contain
|
||||
spaces, qoutes, whatever. For example, in:
|
||||
\begin{verbatim}
|
||||
Module "FvwmIdentify" FvwmIdentify Hello rob! -fg purple
|
||||
\end{verbatim}
|
||||
the argument would be "Hello rob! -fg purple" all passed in
|
||||
argv[6].
|
||||
|
||||
In the future, command line arguments may
|
||||
be paresed in a more standard format.
|
||||
|
||||
The following mechanism is recommended to acquire the pipe
|
||||
descriptors:
|
||||
\begin{verbatim}
|
||||
int fd[2];
|
||||
void main(int argc, char **argv)
|
||||
{
|
||||
if((argc != 6)&&(argc != 7))
|
||||
{
|
||||
fprintf(stderr,"Modules should only be executed by fvwm!\n");
|
||||
exit(1);
|
||||
}
|
||||
fd[0] = atoi(argv[1]);
|
||||
fd[1] = atoi(argv[2]);
|
||||
|
||||
\end{verbatim}
|
||||
The descriptor fd[0] is available for the module to send messages to
|
||||
fvwm, while the descriptor fd[1] is available to read messages from
|
||||
fvwm.
|
||||
|
||||
Special attention is paid to the status of the pipe. If Fvwm gets a
|
||||
read error on a module-to-fvwm pipe, then it assumes that the module
|
||||
is terminating,
|
||||
and all communication with the module is terminated. Similarly, if a
|
||||
module gets a read error on an fvwm-to-module pipe, then it should
|
||||
assume that fvwm is terminating, and it should gracefully shut down.
|
||||
All modules should also allow themselves to be shut down via the
|
||||
Delete Window protocol for X-11.
|
||||
|
||||
\section{Module-to-Fvwm Communication}
|
||||
Modules communicate with fvwm via a simple protocol. In essence, a
|
||||
textual command line, similar to a command line which could be bound
|
||||
to a mouse, or key-stroke in the .fvwmrc, is transmitted to fvwm.
|
||||
|
||||
First, the module should send the ID of the window which should be
|
||||
manipulated. A window ID of ``None'' may be used, in which case Fvwm
|
||||
will prompt the user to select a window if needed. Next, length of
|
||||
the the command line is send as an integer. After that, the command
|
||||
line itself is sent. Finally, an integer 1 is sent if the module plans
|
||||
to continue operating, or 0 if the module is finished. The following
|
||||
subroutine is provided as an example of a suitable method of sending
|
||||
messages to fvwm:
|
||||
\begin{verbatim}
|
||||
void SendInfo(int *fd,Window win, char *message)
|
||||
{
|
||||
int w;
|
||||
|
||||
if((message != NULL)&&(strlen(message) >0))
|
||||
{
|
||||
/* if win == None, then Fvwm will prompt the user for a window
|
||||
* on which to operate, if needed. Some commands, like Exec,
|
||||
* don't operate on a window, so None is appropriate. */
|
||||
write(fd[0],&win,sizeof(Window));
|
||||
|
||||
/* calculate the length of the message */
|
||||
w=strlen(message);
|
||||
/* send the message length */
|
||||
write(fd[0],&w,sizeof(int));
|
||||
/* send the message itself
|
||||
write(fd[0],message,w);
|
||||
|
||||
/* send a 1, indicating that this module will keep going */
|
||||
/* a 0 would mean that this module is done */
|
||||
w=1;
|
||||
write(fd[0],&w,sizeof(int));
|
||||
}
|
||||
}
|
||||
\end{verbatim}
|
||||
|
||||
There is a special built-in function, Send\_WindowList, which causes
|
||||
fvwm to transmit everything that it is currently thinking about to
|
||||
the module which requests the information. This information contains
|
||||
the paging status (enabled/disabled), current desktop number, position
|
||||
on the desktop, current focus and, for each window, the window
|
||||
configuration, window, icon, and class names, and, if the window is
|
||||
iconified, the icon location and size.
|
||||
|
||||
An additional special function has been added to fvwm, which is used
|
||||
to control exactly what information fvwm passes to each module. The
|
||||
command Set\_Mask, followed by a number which is the bitwise OR of the
|
||||
packet-type values which the module wishes to receive. If the module
|
||||
never sends the Set\_Mask command, then all message types will be
|
||||
sent.
|
||||
|
||||
\section{Fvwm-to-Module Communication}
|
||||
Fvwm
|
||||
can send messages to the modules in either a broadcast mode, or a
|
||||
module specific mode. Certain messages regarding important window or
|
||||
desktop manipulations will be broadcast to all modules, whether they
|
||||
want it or not. Modules are able to request information about current windows
|
||||
from fvwm, via the Send\_WindowList built-in. When invoked this way,
|
||||
only requesting module will receive the data.
|
||||
|
||||
Packets from fvwm to modules conform to a standard format, so modules
|
||||
which are not interested in broadcast messages can easily ignore them.
|
||||
A header consisting of 3 unsigned long integers, followed by a body of
|
||||
a variable length make up a packet. The header always begins with
|
||||
0xffffffff. This is provided to help modules re-synchronize to the
|
||||
data stream if necessary. The next entry describes the packet type.
|
||||
Existing packet types are listing in the file module.h:
|
||||
\begin{verbatim}
|
||||
#define START_FLAG 0xffffffff
|
||||
|
||||
#define M_TOGGLE_PAGING 1
|
||||
#define M_NEW_PAGE 2
|
||||
#define M_NEW_DESK 4
|
||||
#define M_ADD_WINDOW 8
|
||||
#define M_RAISE_WINDOW 16
|
||||
#define M_LOWER_WINDOW 32
|
||||
#define M_CONFIGURE_WINDOW 64
|
||||
#define M_FOCUS_CHANGE 128
|
||||
#define M_DESTROY_WINDOW 256
|
||||
#define M_ICONIFY 512
|
||||
#define M_DEICONIFY 1024
|
||||
#define M_WINDOW_NAME 2048
|
||||
#define M_ICON_NAME 4096
|
||||
#define M_RES_CLASS 8192
|
||||
#define M_RES_NAME 16384
|
||||
#define M_END_WINDOWLIST 32768
|
||||
#define M_ICON_LOCATION 65536
|
||||
#define M_MAP 131072
|
||||
\end{verbatim}
|
||||
|
||||
Additional packet types will be defined in the future. The third entry
|
||||
in the header tells the total length of the packet, in unsigned longs,
|
||||
including the header.
|
||||
|
||||
The body information is packet specific, as described below.
|
||||
\subsection{M\_TOGGLE\_PAGING}
|
||||
The body contains a single unsigned long, which is 0 is paging has
|
||||
been temporarily disable through use of the TogglePage built-in, or 1
|
||||
is paging is enabled. This packet is broadcast whenever the TogglePage
|
||||
built-in is invoked.
|
||||
|
||||
\subsection{M\_NEW\_DESK}
|
||||
The body of this packet consists of a single long integer, whose value
|
||||
is the number of the currently active desktop. This packet is
|
||||
transmitted whenever the desktop number is changed.
|
||||
|
||||
\subsection{M\_ADD\_WINDOW, and M\_CONFIGURE\_WINDOW}
|
||||
These packets contain 22 values. The first 3 identify the window, and
|
||||
the next twelve identify the location and size, as described in the
|
||||
table below. Configure packets will be generated when the
|
||||
viewport on the current desktop changes, or when the size or location
|
||||
of the window is changed. The flags field is an bitwise OR of the
|
||||
flags defined in fvwm.h.
|
||||
|
||||
|
||||
\begin{table}
|
||||
\begin{center}
|
||||
\begin{tabular}[h]{|l|l|} \hline
|
||||
\multicolumn{2}{|c|}{Format for Add and Configure Window Packets} \\ \hline
|
||||
Byte &Significance \\\hline
|
||||
0 & 0xffffffff - Start of packet \\
|
||||
1 & packet type \\
|
||||
2 & length of packet, including header, expressed in long integers
|
||||
\\ \hline
|
||||
3 & ID of the application's top level window \\
|
||||
4 & ID of the Fvwm frame window \\
|
||||
5 & Pointer to the Fvwm database entry \\
|
||||
6 & X location of the window's frame \\
|
||||
7 & Y location of the window's frame\\
|
||||
8 & Width of the window's frame (pixels) \\
|
||||
9 & Height of the window's frame (pixels) \\
|
||||
10 & Desktop number\\
|
||||
11 & Windows flags field\\
|
||||
12 & Window Title Height (pixels) \\
|
||||
13 & Window Border Width (pixels) \\
|
||||
14 & Window Base Width (pixels) \\
|
||||
15 & Window Base Height (pixels) \\
|
||||
16 & Window Resize Width Increment(pixels) \\
|
||||
17 & Window Resize Height Increment (pixels) \\
|
||||
18 & Window Minimum Width (pixels) \\
|
||||
19 & Window Minimum Height (pixels) \\
|
||||
20 & Window Maximum Width Increment(pixels) \\
|
||||
21 & Window Maximum Height Increment (pixels) \\
|
||||
22 & Icon Label Window ID, or 0\\
|
||||
23 & Icon Pixmap Window ID, or 0\\
|
||||
24 & Window Gravity\\ \hline
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
\end{table}
|
||||
|
||||
|
||||
\subsection{M\_NEW\_PAGE}
|
||||
These packets contain 3 integers. The first two are the x and y
|
||||
coordinates of the upper left corner of the current viewport on the
|
||||
virtual desktop. The third value is the number of the current desktop.
|
||||
|
||||
\subsection{M\_LOWER\_WINDOW, M\_RAISE\_WINDOW, and M\_DESTROY}
|
||||
These packets contain 3 values, all of the same size as an unsigned
|
||||
long. The first value is the ID of the affected application's top level
|
||||
window, the next is the ID of the Fvwm frame window, and the final
|
||||
value is the pointer to Fvwm's internal database entry for that
|
||||
window. Although the pointer itself is of no use to a module, it can
|
||||
be used as a reference number when referring to the window.
|
||||
|
||||
\begin{table}
|
||||
\begin{center}
|
||||
\begin{tabular}[h]{|l|l|} \hline
|
||||
\multicolumn{2}{|c|}{Format for Lower, Raise, and Focus Change Packets} \\ \hline
|
||||
Byte &Significance \\\hline
|
||||
0 & 0xffffffff - Start of packet \\
|
||||
1 & packet type \\
|
||||
2 & length of packet, including header, expressed in long integers
|
||||
\\ \hline
|
||||
3 & ID of the application's top level window \\
|
||||
4 & ID of the Fvwm frame window \\
|
||||
5 & Pointer to the Fvwm database entry \\ \hline
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
\end{table}
|
||||
|
||||
|
||||
\subsection{M\_FOCUS\_CHANGE}
|
||||
These packets contain 3 values, all of the same size as an unsigned
|
||||
long. The first value is the ID of the affected application's (the
|
||||
application which now has the input focus) top level
|
||||
window, the next is the ID of the Fvwm frame window, and the final
|
||||
value is the pointer to Fvwm's internal database entry for that
|
||||
window. Although the pointer itself is of no use to a module, it can
|
||||
be used as a reference number when referring to the window. In the
|
||||
event that the window which now has the focus is not a window which
|
||||
fvwm recognizes, only the ID of the affected application's top level
|
||||
window is passed. Zeros are passed for the other values.
|
||||
|
||||
\subsection{M\_ICONIFY and M\_ICON\_LOCATION}
|
||||
These packets contain 7 values. The first 3 are the usual identifiers,
|
||||
and the next four describe the location and size of the icon window,
|
||||
as described in the table. Note that M\_ICONIFY packets will be sent
|
||||
whenever a window is first iconified, or when the icon window is changed
|
||||
via the XA\_WM\_HINTS in a property notify event. An M\_ICON\_LOCATION
|
||||
packet will be sent when the icon is moved.
|
||||
In addition, if a window which has transients is
|
||||
iconified, then an M\_ICONIFY packet is sent for each transient
|
||||
window, with the x, y, width, and height fields set to 0. This packet
|
||||
will be sent even if the transients were already iconified. Note that
|
||||
no icons are actually generated for the transients in this case.
|
||||
|
||||
|
||||
\begin{table}
|
||||
\begin{center}
|
||||
\begin{tabular}[h]{|l|l|} \hline
|
||||
\multicolumn{2}{|c|}{Format for Iconify and Icon Location Packets} \\ \hline
|
||||
Byte &Significance \\\hline
|
||||
0 & 0xffffffff - Start of packet \\
|
||||
1 & packet type \\
|
||||
2 & length of packet, including header, expressed in long integers
|
||||
\\ \hline
|
||||
3 & ID of the application's top level window \\
|
||||
4 & ID of the Fvwm frame window \\
|
||||
5 & Pointer to the Fvwm database entry \\
|
||||
6 & X location of the icon's frame \\
|
||||
7 & Y location of the icon's frame\\
|
||||
8 & Width of the icon's frame \\
|
||||
9 & Height of the icon's frame \\ \hline
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
\end{table}
|
||||
|
||||
\subsection{M\_DEICONIFY}
|
||||
These packets contain 3 values, which are the usual window
|
||||
identifiers. The packet is sent when a window is de-iconified.
|
||||
|
||||
\subsection{M\_MAP}
|
||||
These packets contain 3 values, which are the usual window
|
||||
identifiers. The packets are sent when a window is mapped, if it is
|
||||
not being deiconified. This is useful to determine when a window is
|
||||
finally mapped, after being added.
|
||||
|
||||
\subsection{M\_WINDOW\_NAME, M\_ICON\_NAME, M\_RES\_CLASS, M\_RES\_NAME}
|
||||
These packets contain 3 values, which are the usual window
|
||||
identifiers, followed by a variable length character string. The
|
||||
packet size field in the header is expressed in units of unsigned
|
||||
longs, and the packet is zero-padded until it is the size of an
|
||||
unsigned long. The RES\_CLASS and RES\_NAME fields are fields in the
|
||||
XClass structure for the window. Icon and Window name packets will
|
||||
will be sent upon window creation or whenever the name is changed. The
|
||||
RES\_CLASS and RES\_NAME packets are sent on window creation. All
|
||||
packets are sent in response to a Send\_WindowList request from a module.
|
||||
|
||||
\subsection{M\_END\_WINDOWLIST}
|
||||
These packets contain no values. This packet is sent to mark the end
|
||||
of transmission in response to a Send\_WindowList request. A module
|
||||
which request Send\_WindowList, and processes all packets received
|
||||
between the request and the M\_END\_WINDOWLIST will have a snapshot of
|
||||
the status of the desktop.
|
||||
|
||||
\end{document}
|
||||
|
||||
|
||||
|
11
fvwm.README
Normal file
11
fvwm.README
Normal file
@ -0,0 +1,11 @@
|
||||
Fvwm is a just another window manager for X11, which provides a simple virtual
|
||||
desktop, a 3-D look for windows decorations, and shaped, color icons.
|
||||
It can be configured to use far less memory than twm, or to give a very
|
||||
good emulation of mwm. A nice button-bar can be used to provide convenient
|
||||
access to frequently used functions or programs.
|
||||
|
||||
Fvwm has three pieces
|
||||
fvwm-1.23-core.tar.gz - the actual window manager
|
||||
fvwm-1.23-icons.tar.gz - some icons that go nicely with fvwm
|
||||
fvwm-1.23-modules.tar.gz - add on desktop accessories
|
||||
|
43
fvwm/Imakefile
Normal file
43
fvwm/Imakefile
Normal file
@ -0,0 +1,43 @@
|
||||
/* Imakefile for fvwm 1.18c */
|
||||
/* Thu Aug 5 11:21:36 MET DST 1993, mj@dfv.rwth-aachen.de */
|
||||
|
||||
/* setup is done entirely in configuration.h now! */
|
||||
/* You should need to do much in here, excpt maybe add libraries */
|
||||
|
||||
/* I need to get the #define XPM from configuration.h if its in there, */
|
||||
/* so that I can tell if I should include -lXpm */
|
||||
#include <../configure.h>
|
||||
|
||||
COMPILER
|
||||
|
||||
#ifdef XPM
|
||||
XPMLIB = XPMLIBRARY
|
||||
#endif
|
||||
|
||||
DEPLIBS = $(DEPXLIB) ../libs/libfvwmlib.a
|
||||
|
||||
#ifdef AlphaArchitecture
|
||||
LOCAL_LIBRARIES = $(XPMLIB) $(XLIB) -ldnet_stub -L../libs -lfvwmlib
|
||||
#else
|
||||
#ifdef HPArchitecture
|
||||
LOCAL_LIBRARIES = $(XPMLIB) $(XLIB) -lV3 -L../libs -lfvwmlib
|
||||
#else
|
||||
LOCAL_LIBRARIES = $(XPMLIB) $(XLIB) -lfvwmlib -L../libs
|
||||
#endif /* HPArchitecture */
|
||||
#endif /* AlphaArchitecture */
|
||||
|
||||
FVWM_BIN_DIR
|
||||
|
||||
LINTLIBS = $(LINTXLIB)
|
||||
|
||||
SRCS = fvwm.c configure.c events.c borders.c menus.c functions.c resize.c\
|
||||
add_window.c pager.c move.c icons.c windows.c module.c placement.c\
|
||||
decorations.c colormaps.c misc.c style.c
|
||||
|
||||
OBJS = fvwm.o configure.o events.o borders.o menus.o functions.o resize.o\
|
||||
add_window.o pager.o move.o icons.o windows.o module.o placement.o \
|
||||
decorations.o colormaps.o misc.o style.o
|
||||
|
||||
ComplexProgramTarget(fvwm)
|
||||
InstallNamedNonExec(../sample.fvwmrc/system.fvwmrc,system.fvwmrc,FVWMDIR)
|
||||
|
933
fvwm/add_window.c
Normal file
933
fvwm/add_window.c
Normal file
@ -0,0 +1,933 @@
|
||||
/****************************************************************************
|
||||
* THIS module is based on Twm, but has been siginificantly modified
|
||||
* by Rob Nation
|
||||
****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/
|
||||
/** Salt Lake City, Utah **/
|
||||
/** Portions Copyright 1989 by the Massachusetts Institute of Technology **/
|
||||
/** Cambridge, Massachusetts **/
|
||||
/** **/
|
||||
/** All Rights Reserved **/
|
||||
/** **/
|
||||
/** Permission to use, copy, modify, and distribute this software and **/
|
||||
/** its documentation for any purpose and without fee is hereby **/
|
||||
/** granted, provided that the above copyright notice appear in all **/
|
||||
/** copies and that both that copyright notice and this permis- **/
|
||||
/** sion notice appear in supporting documentation, and that the **/
|
||||
/** names of Evans & Sutherland and M.I.T. not be used in advertising **/
|
||||
/** in publicity pertaining to distribution of the software without **/
|
||||
/** specific, written prior permission. **/
|
||||
/** **/
|
||||
/** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/
|
||||
/** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/
|
||||
/** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/
|
||||
/** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/
|
||||
/** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
|
||||
/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
|
||||
/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
|
||||
/** OR PERFORMANCE OF THIS SOFTWARE. **/
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* Add a new window, put the titlbar and other stuff around
|
||||
* the window
|
||||
*
|
||||
**********************************************************************/
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "fvwm.h"
|
||||
#include <X11/Xatom.h>
|
||||
#include "misc.h"
|
||||
#include "screen.h"
|
||||
#ifdef SHAPE
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <X11/Xresource.h>
|
||||
#endif /* SHAPE */
|
||||
#include "module.h"
|
||||
|
||||
char NoName[] = "Untitled"; /* name if no name is specified */
|
||||
|
||||
/* Used to parse command line of clients for specific desk requests. */
|
||||
/* Todo: check for multiple desks. */
|
||||
static XrmDatabase db;
|
||||
static XrmOptionDescRec table [] = {
|
||||
/* Want to accept "-workspace N" or -xrm "fvwm*desk:N" as options
|
||||
* to specify the desktop. I have to include dummy options that
|
||||
* are meaningless since Xrm seems to allow -w to match -workspace
|
||||
* if there would be no ambiguity. */
|
||||
{"-workspacf", "*junk", XrmoptionSepArg, (caddr_t) NULL},
|
||||
{"-workspace", "*desk", XrmoptionSepArg, (caddr_t) NULL},
|
||||
{"-xrn", NULL, XrmoptionResArg, (caddr_t) NULL},
|
||||
{"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL},
|
||||
};
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* AddWindow - add a new window to the fvwm list
|
||||
*
|
||||
* Returned Value:
|
||||
* (FvwmWindow *) - pointer to the FvwmWindow structure
|
||||
*
|
||||
* Inputs:
|
||||
* w - the window id of the window to add
|
||||
* iconm - flag to tell if this is an icon manager window
|
||||
*
|
||||
***********************************************************************/
|
||||
FvwmWindow *AddWindow(Window w)
|
||||
{
|
||||
FvwmWindow *tmp_win; /* new fvwm window structure */
|
||||
unsigned long valuemask; /* mask for create windows */
|
||||
XSetWindowAttributes attributes; /* attributes for create windows */
|
||||
Atom actual_type;
|
||||
int actual_format,i,width,height;
|
||||
unsigned long nitems, bytesafter;
|
||||
int a,b;
|
||||
char *value;
|
||||
unsigned long tflag;
|
||||
int Desk, border_width, resize_width;
|
||||
extern Bool NeedToResizeToo;
|
||||
extern FvwmWindow *colormap_win;
|
||||
char *forecolor = NULL, *backcolor = NULL;
|
||||
int client_argc;
|
||||
char **client_argv = NULL, *str_type;
|
||||
Bool status;
|
||||
XrmValue rm_value;
|
||||
unsigned long buttons;
|
||||
XTextProperty text_prop;
|
||||
|
||||
NeedToResizeToo = False;
|
||||
/* allocate space for the fvwm window */
|
||||
tmp_win = (FvwmWindow *)calloc(1, sizeof(FvwmWindow));
|
||||
if (tmp_win == (FvwmWindow *)0)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
tmp_win->flags = 0;
|
||||
tmp_win->w = w;
|
||||
|
||||
tmp_win->cmap_windows = (Window *)NULL;
|
||||
|
||||
if (XGetGeometry(dpy, tmp_win->w, &JunkRoot, &JunkX, &JunkY,
|
||||
&JunkWidth, &JunkHeight, &JunkBW, &JunkDepth) == 0)
|
||||
{
|
||||
free((char *)tmp_win);
|
||||
return(NULL);
|
||||
}
|
||||
if ( XGetWMName(dpy, tmp_win->w, &text_prop) != 0 )
|
||||
tmp_win->name = (char *)text_prop.value ;
|
||||
else
|
||||
tmp_win->name = NoName;
|
||||
|
||||
tmp_win->class = NoClass;
|
||||
tmp_win->focus_sequence = 0;
|
||||
XGetClassHint(dpy, tmp_win->w, &tmp_win->class);
|
||||
if (tmp_win->class.res_name == NULL)
|
||||
tmp_win->class.res_name = NoName;
|
||||
if (tmp_win->class.res_class == NULL)
|
||||
tmp_win->class.res_class = NoName;
|
||||
|
||||
FetchWmProtocols (tmp_win);
|
||||
FetchWmColormapWindows (tmp_win);
|
||||
if(!(XGetWindowAttributes(dpy,tmp_win->w,&(tmp_win->attr))))
|
||||
tmp_win->attr.colormap = Scr.FvwmRoot.attr.colormap;
|
||||
|
||||
tmp_win->wmhints = XGetWMHints(dpy, tmp_win->w);
|
||||
|
||||
if(XGetTransientForHint(dpy, tmp_win->w, &tmp_win->transientfor))
|
||||
tmp_win->flags |= TRANSIENT;
|
||||
else
|
||||
tmp_win->flags &= ~TRANSIENT;
|
||||
|
||||
tmp_win->old_bw = tmp_win->attr.border_width;
|
||||
|
||||
#ifdef SHAPE
|
||||
{
|
||||
int xws, yws, xbs, ybs;
|
||||
unsigned wws, hws, wbs, hbs;
|
||||
int boundingShaped, clipShaped;
|
||||
|
||||
XShapeSelectInput (dpy, tmp_win->w, ShapeNotifyMask);
|
||||
XShapeQueryExtents (dpy, tmp_win->w,
|
||||
&boundingShaped, &xws, &yws, &wws, &hws,
|
||||
&clipShaped, &xbs, &ybs, &wbs, &hbs);
|
||||
tmp_win->wShaped = boundingShaped;
|
||||
}
|
||||
#endif /* SHAPE */
|
||||
|
||||
|
||||
/* if the window is in the NoTitle list, or is a transient,
|
||||
* dont decorate it.
|
||||
* If its a transient, and DecorateTransients was specified,
|
||||
* decorate anyway
|
||||
*/
|
||||
/* Assume that we'll decorate */
|
||||
tmp_win->flags |= BORDER;
|
||||
tmp_win->flags |= TITLE;
|
||||
tmp_win->title_height = Scr.TitleHeight + tmp_win->bw;
|
||||
|
||||
tflag = LookInList(Scr.TheList,tmp_win->name,&tmp_win->class, &value, &Desk,
|
||||
&border_width, &resize_width,
|
||||
&forecolor,&backcolor,&tmp_win->buttons);
|
||||
|
||||
GetMwmHints(tmp_win);
|
||||
|
||||
SelectDecor(tmp_win,tflag,border_width,resize_width);
|
||||
|
||||
if(tflag & START_ICONIC_FLAG)
|
||||
tmp_win->flags |= STARTICONIC;
|
||||
if (tflag & STAYSONTOP_FLAG)
|
||||
tmp_win->flags |= ONTOP;
|
||||
if (tflag&STICKY_FLAG)
|
||||
tmp_win->flags |= STICKY;
|
||||
if(tflag & LISTSKIP_FLAG)
|
||||
tmp_win->flags |= WINDOWLISTSKIP;
|
||||
if(tflag & CIRCULATESKIP_FLAG)
|
||||
tmp_win->flags |= CIRCULATESKIP;
|
||||
|
||||
if(tflag & SUPPRESSICON_FLAG)
|
||||
tmp_win->flags |= SUPPRESSICON;
|
||||
if(tflag & NOICON_TITLE_FLAG)
|
||||
tmp_win->flags |= NOICON_TITLE;
|
||||
if(Scr.flags & SuppressIcons)
|
||||
tmp_win->flags |= SUPPRESSICON;
|
||||
|
||||
/* find a suitable icon pixmap */
|
||||
if(tflag & ICON_FLAG)
|
||||
{
|
||||
/* an icon was specified */
|
||||
tmp_win->icon_bitmap_file = value;
|
||||
}
|
||||
else if((tmp_win->wmhints)
|
||||
&&(tmp_win->wmhints->flags & (IconWindowHint|IconPixmapHint)))
|
||||
{
|
||||
/* window has its own icon */
|
||||
tmp_win->icon_bitmap_file = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* use default icon */
|
||||
tmp_win->icon_bitmap_file = Scr.DefaultIcon;
|
||||
}
|
||||
|
||||
GetWindowSizeHints (tmp_win);
|
||||
|
||||
|
||||
/* Tentative size estimate */
|
||||
tmp_win->frame_width = tmp_win->attr.width+2*tmp_win->boundary_width;
|
||||
tmp_win->frame_height = tmp_win->attr.height + tmp_win->title_height+
|
||||
2*tmp_win->boundary_width;
|
||||
|
||||
ConstrainSize(tmp_win, &tmp_win->frame_width, &tmp_win->frame_height);
|
||||
|
||||
/* Find out if the client requested a specific desk on the command line. */
|
||||
if (XGetCommand (dpy, tmp_win->w, &client_argv, &client_argc)) {
|
||||
XrmParseCommand (&db, table, 4, "fvwm", &client_argc, client_argv);
|
||||
status = XrmGetResource (db, "fvwm.desk", "Fvwm.Desk", &str_type, &rm_value);
|
||||
if ((status == True) && (rm_value.size != 0)) {
|
||||
Desk = atoi(rm_value.addr);
|
||||
tmp_win->flags |= STAYSONDESK_FLAG;
|
||||
tflag |= STAYSONDESK_FLAG;
|
||||
}
|
||||
XrmDestroyDatabase (db);
|
||||
db = NULL;
|
||||
}
|
||||
|
||||
if(!PlaceWindow(tmp_win, tflag, Desk))
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* Make sure the client window still exists. We don't want to leave an
|
||||
* orphan frame window if it doesn't. Since we now have the server
|
||||
* grabbed, the window can't disappear later without having been
|
||||
* reparented, so we'll get a DestroyNotify for it. We won't have
|
||||
* gotten one for anything up to here, however.
|
||||
*/
|
||||
XGrabServer(dpy);
|
||||
if(XGetGeometry(dpy, w, &JunkRoot, &JunkX, &JunkY,
|
||||
&JunkWidth, &JunkHeight,
|
||||
&JunkBW, &JunkDepth) == 0)
|
||||
{
|
||||
free((char *)tmp_win);
|
||||
XUngrabServer(dpy);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
XSetWindowBorderWidth (dpy, tmp_win->w,0);
|
||||
XGetWindowProperty (dpy, tmp_win->w, XA_WM_ICON_NAME, 0L, 200L, False,
|
||||
XA_STRING, &actual_type, &actual_format, &nitems,
|
||||
&bytesafter,(unsigned char **)&tmp_win->icon_name);
|
||||
if(tmp_win->icon_name==(char *)NULL)
|
||||
tmp_win->icon_name = tmp_win->name;
|
||||
|
||||
tmp_win->flags &= ~ICONIFIED;
|
||||
tmp_win->flags &= ~ICON_UNMAPPED;
|
||||
tmp_win->flags &= ~MAXIMIZED;
|
||||
|
||||
|
||||
tmp_win->TextPixel = Scr.StdColors.fore;
|
||||
tmp_win->ReliefPixel = Scr.StdRelief.fore;
|
||||
tmp_win->ShadowPixel = Scr.StdRelief.back;
|
||||
tmp_win->BackPixel = Scr.StdColors.back;
|
||||
|
||||
if(tmp_win->flags & STICKY)
|
||||
{
|
||||
tmp_win->BackPixel = Scr.StickyColors.back;
|
||||
tmp_win->ShadowPixel = Scr.StickyRelief.back;
|
||||
tmp_win->ReliefPixel = Scr.StickyRelief.fore;
|
||||
tmp_win->TextPixel = Scr.StickyColors.fore;
|
||||
}
|
||||
if(forecolor != NULL)
|
||||
{
|
||||
XColor color;
|
||||
|
||||
if((XParseColor (dpy, Scr.FvwmRoot.attr.colormap, forecolor, &color))
|
||||
&&(XAllocColor (dpy, Scr.FvwmRoot.attr.colormap, &color)))
|
||||
{
|
||||
tmp_win->TextPixel = color.pixel;
|
||||
}
|
||||
}
|
||||
if(backcolor != NULL)
|
||||
{
|
||||
XColor color;
|
||||
|
||||
if((XParseColor (dpy, Scr.FvwmRoot.attr.colormap,backcolor, &color))
|
||||
&&(XAllocColor (dpy, Scr.FvwmRoot.attr.colormap, &color)))
|
||||
|
||||
{
|
||||
tmp_win->BackPixel = color.pixel;
|
||||
}
|
||||
tmp_win->ShadowPixel = GetShadow(tmp_win->BackPixel);
|
||||
tmp_win->ReliefPixel = GetHilite(tmp_win->BackPixel);
|
||||
}
|
||||
|
||||
|
||||
/* add the window into the fvwm list */
|
||||
tmp_win->next = Scr.FvwmRoot.next;
|
||||
if (Scr.FvwmRoot.next != NULL)
|
||||
Scr.FvwmRoot.next->prev = tmp_win;
|
||||
tmp_win->prev = &Scr.FvwmRoot;
|
||||
Scr.FvwmRoot.next = tmp_win;
|
||||
|
||||
/* create windows */
|
||||
tmp_win->frame_x = tmp_win->attr.x + tmp_win->old_bw - tmp_win->bw;
|
||||
tmp_win->frame_y = tmp_win->attr.y + tmp_win->old_bw - tmp_win->bw;
|
||||
|
||||
tmp_win->frame_width = tmp_win->attr.width+2*tmp_win->boundary_width;
|
||||
tmp_win->frame_height = tmp_win->attr.height + tmp_win->title_height+
|
||||
2*tmp_win->boundary_width;
|
||||
|
||||
|
||||
valuemask = CWBorderPixel | CWCursor | CWEventMask;
|
||||
if(Scr.d_depth < 2)
|
||||
{
|
||||
attributes.background_pixmap = Scr.light_gray_pixmap ;
|
||||
if(tmp_win->flags & STICKY)
|
||||
attributes.background_pixmap = Scr.sticky_gray_pixmap;
|
||||
valuemask |= CWBackPixmap;
|
||||
}
|
||||
else
|
||||
{
|
||||
attributes.background_pixel = tmp_win->BackPixel;
|
||||
valuemask |= CWBackPixel;
|
||||
}
|
||||
|
||||
attributes.border_pixel = tmp_win->ShadowPixel;
|
||||
|
||||
attributes.cursor = Scr.FvwmCursors[DEFAULT];
|
||||
attributes.event_mask = (SubstructureRedirectMask | ButtonPressMask |
|
||||
ButtonReleaseMask |EnterWindowMask |
|
||||
LeaveWindowMask |ExposureMask);
|
||||
if(Scr.flags & SaveUnders)
|
||||
{
|
||||
valuemask |= CWSaveUnder;
|
||||
attributes.save_under = TRUE;
|
||||
}
|
||||
/* What the heck, we'll always reparent everything from now on! */
|
||||
tmp_win->frame =
|
||||
XCreateWindow (dpy, Scr.Root, tmp_win->frame_x,tmp_win->frame_y,
|
||||
tmp_win->frame_width, tmp_win->frame_height,
|
||||
tmp_win->bw,CopyFromParent, InputOutput,
|
||||
CopyFromParent, valuemask, &attributes);
|
||||
|
||||
attributes.save_under = FALSE;
|
||||
|
||||
/* Thats not all, we'll double-reparent the window ! */
|
||||
attributes.cursor = Scr.FvwmCursors[DEFAULT];
|
||||
tmp_win->Parent =
|
||||
XCreateWindow (dpy, tmp_win->frame,
|
||||
tmp_win->boundary_width,
|
||||
tmp_win->boundary_width+tmp_win->title_height,
|
||||
(tmp_win->frame_width - 2*tmp_win->boundary_width),
|
||||
(tmp_win->frame_height - 2*tmp_win->boundary_width -
|
||||
tmp_win->title_height),tmp_win->bw, CopyFromParent,
|
||||
InputOutput,CopyFromParent, valuemask,&attributes);
|
||||
|
||||
if(Scr.flags & BackingStore)
|
||||
{
|
||||
valuemask |= CWBackingStore;
|
||||
attributes.backing_store = WhenMapped;
|
||||
}
|
||||
|
||||
#ifndef NO_PAGER
|
||||
if(Scr.Pager_w)
|
||||
{
|
||||
/* Create the pager_view window even if we're sticky, in case the
|
||||
* user unsticks the window */
|
||||
attributes.event_mask = ExposureMask;
|
||||
tmp_win->pager_view= XCreateWindow (dpy, Scr.Pager_w, -10, -10, 2, 2, 1,
|
||||
CopyFromParent, InputOutput,
|
||||
CopyFromParent, valuemask,
|
||||
&attributes);
|
||||
XMapRaised(dpy,tmp_win->pager_view);
|
||||
}
|
||||
#endif
|
||||
|
||||
attributes.event_mask = (ButtonPressMask|ButtonReleaseMask|ExposureMask|
|
||||
EnterWindowMask|LeaveWindowMask);
|
||||
tmp_win->title_x = tmp_win->title_y = 0;
|
||||
tmp_win->title_w = 0;
|
||||
tmp_win->title_width = tmp_win->frame_width - 2*tmp_win->corner_width
|
||||
- 3 + tmp_win->bw;
|
||||
if(tmp_win->title_width < 1)
|
||||
tmp_win->title_width = 1;
|
||||
if(tmp_win->flags & BORDER)
|
||||
{
|
||||
/* Just dump the windows any old place and left SetupFrame take
|
||||
* care of the mess */
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
attributes.cursor = Scr.FvwmCursors[TOP_LEFT+i];
|
||||
tmp_win->corners[i] =
|
||||
XCreateWindow (dpy, tmp_win->frame, 0,0,
|
||||
tmp_win->corner_width, tmp_win->corner_width,
|
||||
0, CopyFromParent,InputOutput,
|
||||
CopyFromParent, valuemask,&attributes);
|
||||
}
|
||||
}
|
||||
|
||||
if (tmp_win->flags & TITLE)
|
||||
{
|
||||
tmp_win->title_x = tmp_win->boundary_width +tmp_win->title_height+1;
|
||||
tmp_win->title_y = tmp_win->boundary_width;
|
||||
attributes.cursor = Scr.FvwmCursors[TITLE_CURSOR];
|
||||
tmp_win->title_w =
|
||||
XCreateWindow (dpy, tmp_win->frame, tmp_win->title_x, tmp_win->title_y,
|
||||
tmp_win->title_width, tmp_win->title_height,0,
|
||||
CopyFromParent, InputOutput, CopyFromParent,
|
||||
valuemask,&attributes);
|
||||
attributes.cursor = Scr.FvwmCursors[SYS];
|
||||
for(i=4;i>=0;i--)
|
||||
{
|
||||
if((i<Scr.nr_left_buttons)&&(tmp_win->left_w[i] > 0))
|
||||
{
|
||||
tmp_win->left_w[i] =
|
||||
XCreateWindow (dpy, tmp_win->frame, tmp_win->title_height*i, 0,
|
||||
tmp_win->title_height, tmp_win->title_height, 0,
|
||||
CopyFromParent, InputOutput,
|
||||
CopyFromParent, valuemask, &attributes);
|
||||
}
|
||||
else
|
||||
tmp_win->left_w[i] = None;
|
||||
|
||||
if((i<Scr.nr_right_buttons)&&(tmp_win->right_w[i] >0))
|
||||
{
|
||||
tmp_win->right_w[i] =
|
||||
XCreateWindow (dpy, tmp_win->frame,
|
||||
tmp_win->title_width-
|
||||
tmp_win->title_height*(i+1),
|
||||
0, tmp_win->title_height,
|
||||
tmp_win->title_height,
|
||||
0, CopyFromParent, InputOutput,
|
||||
CopyFromParent, valuemask, &attributes);
|
||||
}
|
||||
else
|
||||
tmp_win->right_w[i] = None;
|
||||
}
|
||||
}
|
||||
|
||||
if(tmp_win->flags & BORDER)
|
||||
{
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
attributes.cursor = Scr.FvwmCursors[TOP+i];
|
||||
tmp_win->sides[i] =
|
||||
XCreateWindow (dpy, tmp_win->frame, 0, 0, tmp_win->boundary_width,
|
||||
tmp_win->boundary_width, 0, CopyFromParent,
|
||||
InputOutput, CopyFromParent,valuemask,
|
||||
&attributes);
|
||||
}
|
||||
}
|
||||
|
||||
XMapSubwindows (dpy, tmp_win->frame);
|
||||
XRaiseWindow(dpy,tmp_win->Parent);
|
||||
XReparentWindow(dpy, tmp_win->w, tmp_win->Parent,0,0);
|
||||
|
||||
valuemask = (CWEventMask | CWDontPropagate);
|
||||
attributes.event_mask = (StructureNotifyMask | PropertyChangeMask |
|
||||
VisibilityChangeMask | EnterWindowMask |
|
||||
LeaveWindowMask |
|
||||
ColormapChangeMask | FocusChangeMask);
|
||||
|
||||
#ifndef NO_PAGER
|
||||
if(tmp_win->w == Scr.Pager_w)
|
||||
{
|
||||
Scr.FvwmPager = tmp_win;
|
||||
attributes.event_mask |=ButtonPressMask|ButtonReleaseMask|ExposureMask
|
||||
|ButtonMotionMask;
|
||||
attributes.do_not_propagate_mask = ButtonPressMask;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
attributes.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask;
|
||||
if(Scr.flags & AppsBackingStore)
|
||||
{
|
||||
valuemask |= CWBackingStore;
|
||||
attributes.backing_store = WhenMapped;
|
||||
}
|
||||
XChangeWindowAttributes (dpy, tmp_win->w, valuemask, &attributes);
|
||||
if ( XGetWMName(dpy, tmp_win->w, &text_prop) != 0 )
|
||||
tmp_win->name = (char *)text_prop.value ;
|
||||
else
|
||||
tmp_win->name = NoName;
|
||||
|
||||
#ifndef NO_PAGER
|
||||
if(tmp_win->w != Scr.Pager_w)
|
||||
#endif
|
||||
XAddToSaveSet(dpy, tmp_win->w);
|
||||
|
||||
/*
|
||||
* Reparenting generates an UnmapNotify event, followed by a MapNotify.
|
||||
* Set the map state to FALSE to prevent a transition back to
|
||||
* WithdrawnState in HandleUnmapNotify. Map state gets set correctly
|
||||
* again in HandleMapNotify.
|
||||
*/
|
||||
tmp_win->flags &= ~MAPPED;
|
||||
width = tmp_win->frame_width;
|
||||
tmp_win->frame_width = 0;
|
||||
height = tmp_win->frame_height;
|
||||
tmp_win->frame_height = 0;
|
||||
SetupFrame (tmp_win, tmp_win->frame_x, tmp_win->frame_y,width,height, True);
|
||||
|
||||
/* wait until the window is iconified and the icon window is mapped
|
||||
* before creating the icon window
|
||||
*/
|
||||
tmp_win->icon_w = None;
|
||||
GrabButtons(tmp_win);
|
||||
GrabKeys(tmp_win);
|
||||
|
||||
XSaveContext(dpy, tmp_win->w, FvwmContext, (caddr_t) tmp_win);
|
||||
XSaveContext(dpy, tmp_win->frame, FvwmContext, (caddr_t) tmp_win);
|
||||
XSaveContext(dpy, tmp_win->Parent, FvwmContext, (caddr_t) tmp_win);
|
||||
if (tmp_win->flags & TITLE)
|
||||
{
|
||||
XSaveContext(dpy, tmp_win->title_w, FvwmContext, (caddr_t) tmp_win);
|
||||
for(i=0;i<Scr.nr_left_buttons;i++)
|
||||
XSaveContext(dpy, tmp_win->left_w[i], FvwmContext, (caddr_t) tmp_win);
|
||||
for(i=0;i<Scr.nr_right_buttons;i++)
|
||||
if(tmp_win->right_w[i] != None)
|
||||
XSaveContext(dpy, tmp_win->right_w[i], FvwmContext,
|
||||
(caddr_t) tmp_win);
|
||||
}
|
||||
if (tmp_win->flags & BORDER)
|
||||
{
|
||||
for(i=0;i<4;i++)
|
||||
{
|
||||
XSaveContext(dpy, tmp_win->sides[i], FvwmContext, (caddr_t) tmp_win);
|
||||
XSaveContext(dpy,tmp_win->corners[i],FvwmContext, (caddr_t) tmp_win);
|
||||
}
|
||||
}
|
||||
RaiseWindow(tmp_win);
|
||||
KeepOnTop();
|
||||
XUngrabServer(dpy);
|
||||
|
||||
XGetGeometry(dpy, tmp_win->w, &JunkRoot, &JunkX, &JunkY,
|
||||
&JunkWidth, &JunkHeight, &JunkBW, &JunkDepth);
|
||||
XTranslateCoordinates(dpy,tmp_win->frame,Scr.Root,JunkX,JunkY,
|
||||
&a,&b,&JunkChild);
|
||||
tmp_win->xdiff -= a;
|
||||
tmp_win->ydiff -= b;
|
||||
if(Scr.flags & ClickToFocus)
|
||||
{
|
||||
/* need to grab all buttons for window that we are about to
|
||||
* unhighlight */
|
||||
for(i=0;i<3;i++)
|
||||
if(Scr.buttons2grab & (1<<i))
|
||||
{
|
||||
XGrabButton(dpy,(i+1),0,tmp_win->frame,True,
|
||||
ButtonPressMask, GrabModeSync,GrabModeAsync,None,
|
||||
Scr.FvwmCursors[SYS]);
|
||||
XGrabButton(dpy,(i+1),LockMask,tmp_win->frame,True,
|
||||
ButtonPressMask, GrabModeSync,GrabModeAsync,None,
|
||||
Scr.FvwmCursors[SYS]);
|
||||
}
|
||||
}
|
||||
BroadcastConfig(M_ADD_WINDOW,tmp_win);
|
||||
|
||||
BroadcastName(M_WINDOW_NAME,tmp_win->w,tmp_win->frame,
|
||||
(unsigned long)tmp_win,tmp_win->name);
|
||||
BroadcastName(M_ICON_NAME,tmp_win->w,tmp_win->frame,
|
||||
(unsigned long)tmp_win,tmp_win->icon_name);
|
||||
BroadcastName(M_RES_CLASS,tmp_win->w,tmp_win->frame,
|
||||
(unsigned long)tmp_win,tmp_win->class.res_class);
|
||||
BroadcastName(M_RES_NAME,tmp_win->w,tmp_win->frame,
|
||||
(unsigned long)tmp_win,tmp_win->class.res_name);
|
||||
|
||||
FetchWmProtocols (tmp_win);
|
||||
FetchWmColormapWindows (tmp_win);
|
||||
if(!(XGetWindowAttributes(dpy,tmp_win->w,&(tmp_win->attr))))
|
||||
tmp_win->attr.colormap = Scr.FvwmRoot.attr.colormap;
|
||||
if(NeedToResizeToo)
|
||||
{
|
||||
XWarpPointer(dpy, Scr.Root, Scr.Root, 0, 0, Scr.MyDisplayWidth,
|
||||
Scr.MyDisplayHeight,
|
||||
tmp_win->frame_x + (tmp_win->frame_width>>1),
|
||||
tmp_win->frame_y + (tmp_win->frame_height>>1));
|
||||
resize_window(tmp_win->w,tmp_win,0,0,0,0);
|
||||
}
|
||||
InstallWindowColormaps(colormap_win);
|
||||
return (tmp_win);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* GrabButtons - grab needed buttons for the window
|
||||
*
|
||||
* Inputs:
|
||||
* tmp_win - the fvwm window structure to use
|
||||
*
|
||||
***********************************************************************/
|
||||
void GrabButtons(FvwmWindow *tmp_win)
|
||||
{
|
||||
MouseButton *MouseEntry;
|
||||
|
||||
MouseEntry = Scr.MouseButtonRoot;
|
||||
while(MouseEntry != (MouseButton *)0)
|
||||
{
|
||||
if((MouseEntry->func != (int)0)&&(MouseEntry->Context & C_WINDOW))
|
||||
{
|
||||
if(MouseEntry->Button >0)
|
||||
{
|
||||
XGrabButton(dpy, MouseEntry->Button, MouseEntry->Modifier,
|
||||
tmp_win->w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
if(MouseEntry->Modifier != AnyModifier)
|
||||
{
|
||||
XGrabButton(dpy, MouseEntry->Button,
|
||||
(MouseEntry->Modifier | LockMask),
|
||||
tmp_win->w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
XGrabButton(dpy, 1, MouseEntry->Modifier,
|
||||
tmp_win->w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
XGrabButton(dpy, 2, MouseEntry->Modifier,
|
||||
tmp_win->w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
XGrabButton(dpy, 3, MouseEntry->Modifier,
|
||||
tmp_win->w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
if(MouseEntry->Modifier != AnyModifier)
|
||||
{
|
||||
XGrabButton(dpy, 1,
|
||||
(MouseEntry->Modifier | LockMask),
|
||||
tmp_win->w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
XGrabButton(dpy, 2,
|
||||
(MouseEntry->Modifier | LockMask),
|
||||
tmp_win->w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
XGrabButton(dpy, 3,
|
||||
(MouseEntry->Modifier | LockMask),
|
||||
tmp_win->w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
}
|
||||
}
|
||||
}
|
||||
MouseEntry = MouseEntry->NextButton;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* GrabKeys - grab needed keys for the window
|
||||
*
|
||||
* Inputs:
|
||||
* tmp_win - the fvwm window structure to use
|
||||
*
|
||||
***********************************************************************/
|
||||
void GrabKeys(FvwmWindow *tmp_win)
|
||||
{
|
||||
FuncKey *tmp;
|
||||
for (tmp = Scr.FuncKeyRoot.next; tmp != NULL; tmp = tmp->next)
|
||||
{
|
||||
if(tmp->cont & (C_WINDOW|C_TITLE|C_RALL|C_LALL|C_SIDEBAR))
|
||||
{
|
||||
XGrabKey(dpy, tmp->keycode, tmp->mods, tmp_win->frame, True,
|
||||
GrabModeAsync, GrabModeAsync);
|
||||
if(tmp->mods != AnyModifier)
|
||||
{
|
||||
XGrabKey(dpy, tmp->keycode, tmp->mods|LockMask,
|
||||
tmp_win->frame, True,
|
||||
GrabModeAsync, GrabModeAsync);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* FetchWMProtocols - finds out which protocols the window supports
|
||||
*
|
||||
* Inputs:
|
||||
* tmp - the fvwm window structure to use
|
||||
*
|
||||
***********************************************************************/
|
||||
void FetchWmProtocols (FvwmWindow *tmp)
|
||||
{
|
||||
unsigned long flags = 0L;
|
||||
Atom *protocols = NULL, *ap;
|
||||
int i, n;
|
||||
Atom atype;
|
||||
int aformat;
|
||||
unsigned long bytes_remain,nitems;
|
||||
|
||||
if(tmp == NULL) return;
|
||||
/* First, try the Xlib function to read the protocols.
|
||||
* This is what Twm uses. */
|
||||
if (XGetWMProtocols (dpy, tmp->w, &protocols, &n))
|
||||
{
|
||||
for (i = 0, ap = protocols; i < n; i++, ap++)
|
||||
{
|
||||
if (*ap == (Atom)_XA_WM_TAKE_FOCUS) flags |= DoesWmTakeFocus;
|
||||
if (*ap == (Atom)_XA_WM_DELETE_WINDOW) flags |= DoesWmDeleteWindow;
|
||||
}
|
||||
if (protocols) XFree ((char *) protocols);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Next, read it the hard way. mosaic from Coreldraw needs to
|
||||
* be read in this way. */
|
||||
if ((XGetWindowProperty(dpy, tmp->w, _XA_WM_PROTOCOLS, 0L, 10L, False,
|
||||
_XA_WM_PROTOCOLS, &atype, &aformat, &nitems,
|
||||
&bytes_remain,
|
||||
(unsigned char **)&protocols))==Success)
|
||||
{
|
||||
for (i = 0, ap = protocols; i < nitems; i++, ap++)
|
||||
{
|
||||
if (*ap == (Atom)_XA_WM_TAKE_FOCUS) flags |= DoesWmTakeFocus;
|
||||
if (*ap == (Atom)_XA_WM_DELETE_WINDOW) flags |= DoesWmDeleteWindow;
|
||||
}
|
||||
if (protocols) XFree ((char *) protocols);
|
||||
}
|
||||
}
|
||||
tmp->flags |= flags;
|
||||
return;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* GetWindowSizeHints - gets application supplied size info
|
||||
*
|
||||
* Inputs:
|
||||
* tmp - the fvwm window structure to use
|
||||
*
|
||||
***********************************************************************/
|
||||
void GetWindowSizeHints(FvwmWindow *tmp)
|
||||
{
|
||||
long supplied = 0;
|
||||
|
||||
if (!XGetWMNormalHints (dpy, tmp->w, &tmp->hints, &supplied))
|
||||
tmp->hints.flags = 0;
|
||||
|
||||
/* Beat up our copy of the hints, so that all important field are
|
||||
* filled in! */
|
||||
if (tmp->hints.flags & PResizeInc)
|
||||
{
|
||||
if (tmp->hints.width_inc == 0) tmp->hints.width_inc = 1;
|
||||
if (tmp->hints.height_inc == 0) tmp->hints.height_inc = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp->hints.width_inc = 1;
|
||||
tmp->hints.height_inc = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* ICCCM says that PMinSize is the default if no PBaseSize is given,
|
||||
* and vice-versa.
|
||||
*/
|
||||
|
||||
if(!(tmp->hints.flags & PBaseSize))
|
||||
{
|
||||
if(tmp->hints.flags & PMinSize)
|
||||
{
|
||||
tmp->hints.base_width = tmp->hints.min_width;
|
||||
tmp->hints.base_height = tmp->hints.min_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp->hints.base_width = 0;
|
||||
tmp->hints.base_height = 0;
|
||||
}
|
||||
}
|
||||
if(!(tmp->hints.flags & PMinSize))
|
||||
{
|
||||
tmp->hints.min_width = tmp->hints.base_width;
|
||||
tmp->hints.min_height = tmp->hints.base_height;
|
||||
}
|
||||
if(!(tmp->hints.flags & PMaxSize))
|
||||
{
|
||||
tmp->hints.max_width = MAX_WINDOW_WIDTH;
|
||||
tmp->hints.max_height = MAX_WINDOW_HEIGHT;
|
||||
}
|
||||
if(tmp->hints.max_width < tmp->hints.min_width)
|
||||
tmp->hints.max_width = MAX_WINDOW_WIDTH;
|
||||
if(tmp->hints.max_height < tmp->hints.min_height)
|
||||
tmp->hints.max_height = MAX_WINDOW_HEIGHT;
|
||||
|
||||
/* Zero width/height windows are bad news! */
|
||||
if(tmp->hints.min_height <= 0)
|
||||
tmp->hints.min_height = 1;
|
||||
if(tmp->hints.min_width <= 0)
|
||||
tmp->hints.min_width = 1;
|
||||
|
||||
if(!(tmp->hints.flags & PWinGravity))
|
||||
{
|
||||
tmp->hints.win_gravity = NorthWestGravity;
|
||||
tmp->hints.flags |= PWinGravity;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* LookInList - look through a list for a window name, or class
|
||||
*
|
||||
* Returned Value:
|
||||
* the ptr field of the list structure or NULL if the name
|
||||
* or class was not found in the list
|
||||
*
|
||||
* Inputs:
|
||||
* list - a pointer to the head of a list
|
||||
* name - a pointer to the name to look for
|
||||
* class - a pointer to the class to look for
|
||||
*
|
||||
***********************************************************************/
|
||||
unsigned long LookInList(name_list *list, char *name, XClassHint *class,
|
||||
char **value, int *Desk, int *border_width,
|
||||
int *resize_width, char **forecolor, char **backcolor,
|
||||
unsigned long * buttons)
|
||||
{
|
||||
name_list *nptr;
|
||||
unsigned long retval = 0;
|
||||
|
||||
*value = NULL;
|
||||
*forecolor = NULL;
|
||||
*backcolor = NULL;
|
||||
*Desk = 0;
|
||||
*buttons = 0;
|
||||
/* look for the name first */
|
||||
for (nptr = list; nptr != NULL; nptr = nptr->next)
|
||||
{
|
||||
if (class)
|
||||
{
|
||||
/* first look for the res_class (lowest priority) */
|
||||
if (matchWildcards(nptr->name,class->res_class) == TRUE)
|
||||
{
|
||||
if(nptr->value != NULL)*value = nptr->value;
|
||||
if(nptr->off_flags & STAYSONDESK_FLAG)
|
||||
*Desk = nptr->Desk;
|
||||
if(nptr->off_flags & BW_FLAG)
|
||||
*border_width = nptr->border_width;
|
||||
if(nptr->off_flags & FORE_COLOR_FLAG)
|
||||
*forecolor = nptr->ForeColor;
|
||||
if(nptr->off_flags & BACK_COLOR_FLAG)
|
||||
*backcolor = nptr->BackColor;
|
||||
if(nptr->off_flags & NOBW_FLAG)
|
||||
*resize_width = nptr->resize_width;
|
||||
retval |= nptr->off_flags;
|
||||
retval &= ~(nptr->on_flags);
|
||||
*buttons |= nptr->off_buttons;
|
||||
*buttons &= ~(nptr->on_buttons);
|
||||
}
|
||||
|
||||
/* look for the res_name next */
|
||||
if (matchWildcards(nptr->name,class->res_name) == TRUE)
|
||||
{
|
||||
if(nptr->value != NULL)*value = nptr->value;
|
||||
if(nptr->off_flags & STAYSONDESK_FLAG)
|
||||
*Desk = nptr->Desk;
|
||||
if(nptr->off_flags & FORE_COLOR_FLAG)
|
||||
*forecolor = nptr->ForeColor;
|
||||
if(nptr->off_flags & BACK_COLOR_FLAG)
|
||||
*backcolor = nptr->BackColor;
|
||||
if(nptr->off_flags & BW_FLAG)
|
||||
*border_width = nptr->border_width;
|
||||
if(nptr->off_flags & NOBW_FLAG)
|
||||
*resize_width = nptr->resize_width;
|
||||
retval |= nptr->off_flags;
|
||||
retval &= ~(nptr->on_flags);
|
||||
*buttons |= nptr->off_buttons;
|
||||
*buttons &= ~(nptr->on_buttons);
|
||||
}
|
||||
}
|
||||
/* finally, look for name matches */
|
||||
if (matchWildcards(nptr->name,name) == TRUE)
|
||||
{
|
||||
if(nptr->value != NULL)*value = nptr->value;
|
||||
if(nptr->off_flags & STAYSONDESK_FLAG)
|
||||
*Desk = nptr->Desk;
|
||||
if(nptr->off_flags & FORE_COLOR_FLAG)
|
||||
*forecolor = nptr->ForeColor;
|
||||
if(nptr->off_flags & BACK_COLOR_FLAG)
|
||||
*backcolor = nptr->BackColor;
|
||||
if(nptr->off_flags & BW_FLAG)
|
||||
*border_width = nptr->border_width;
|
||||
if(nptr->off_flags & NOBW_FLAG)
|
||||
*resize_width = nptr->resize_width;
|
||||
retval |= nptr->off_flags;
|
||||
retval &= ~(nptr->on_flags);
|
||||
*buttons |= nptr->off_buttons;
|
||||
*buttons &= ~(nptr->on_buttons);
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
18
fvwm/alpha_header.h
Normal file
18
fvwm/alpha_header.h
Normal file
@ -0,0 +1,18 @@
|
||||
/**************************************************************************/
|
||||
/* If I do ALL this, I can compile OK with -Wall -Wstrict-prototypes on the
|
||||
* alpha's */
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
||||
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
||||
|
||||
/* string manipulation */
|
||||
#ifdef __GNUC__
|
||||
extern size_t strlen(char *);
|
||||
#endif
|
||||
|
||||
extern int bzero(char *, int);
|
||||
extern int gethostname (char *, int);
|
||||
/**************************************************************************/
|
||||
|
1287
fvwm/borders.c
Normal file
1287
fvwm/borders.c
Normal file
File diff suppressed because it is too large
Load Diff
243
fvwm/colormaps.c
Normal file
243
fvwm/colormaps.c
Normal file
@ -0,0 +1,243 @@
|
||||
/****************************************************************************
|
||||
* This module is all new
|
||||
* by Rob Nation
|
||||
*
|
||||
* This code handles colormaps for fvwm.
|
||||
*
|
||||
* Copyright 1994 Robert Nation. No restrictions are placed on this code,
|
||||
* as long as the copyright notice is preserved . No guarantees or
|
||||
* warrantees of any sort whatsoever are given or implied or anything.
|
||||
****************************************************************************/
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include "fvwm.h"
|
||||
#include <X11/Xatom.h>
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
#include "module.h"
|
||||
|
||||
FvwmWindow *colormap_win;
|
||||
Colormap last_cmap = None;
|
||||
extern FvwmWindow *Tmp_win;
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* HandleColormapNotify - colormap notify event handler
|
||||
*
|
||||
* This procedure handles both a client changing its own colormap, and
|
||||
* a client explicitly installing its colormap itself (only the window
|
||||
* manager should do that, so we must set it correctly).
|
||||
*
|
||||
***********************************************************************/
|
||||
void HandleColormapNotify(void)
|
||||
{
|
||||
XColormapEvent *cevent = (XColormapEvent *)&Event;
|
||||
Bool ReInstall = False;
|
||||
|
||||
|
||||
if(!Tmp_win)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(cevent->new)
|
||||
{
|
||||
XGetWindowAttributes(dpy,Tmp_win->w,&(Tmp_win->attr));
|
||||
if((Tmp_win == colormap_win)&&(Tmp_win->number_cmap_windows == 0))
|
||||
last_cmap = Tmp_win->attr.colormap;
|
||||
ReInstall = True;
|
||||
}
|
||||
else if((cevent->state == ColormapUninstalled)&&
|
||||
(last_cmap == cevent->colormap))
|
||||
{
|
||||
/* Some window installed its colormap, change it back */
|
||||
ReInstall = True;
|
||||
}
|
||||
|
||||
while(XCheckTypedEvent(dpy,ColormapNotify,&Event))
|
||||
{
|
||||
if (XFindContext (dpy, cevent->window,
|
||||
FvwmContext, (caddr_t *) &Tmp_win) == XCNOENT)
|
||||
Tmp_win = NULL;
|
||||
if((Tmp_win)&&(cevent->new))
|
||||
{
|
||||
XGetWindowAttributes(dpy,Tmp_win->w,&(Tmp_win->attr));
|
||||
if((Tmp_win == colormap_win)&&(Tmp_win->number_cmap_windows == 0))
|
||||
last_cmap = Tmp_win->attr.colormap;
|
||||
ReInstall = True;
|
||||
}
|
||||
else if((Tmp_win)&&
|
||||
(cevent->state == ColormapUninstalled)&&
|
||||
(last_cmap == cevent->colormap))
|
||||
{
|
||||
/* Some window installed its colormap, change it back */
|
||||
ReInstall = True;
|
||||
}
|
||||
else if((Tmp_win)&&
|
||||
(cevent->state == ColormapInstalled)&&
|
||||
(last_cmap == cevent->colormap))
|
||||
{
|
||||
/* The last color map installed was the correct one. Don't
|
||||
* change anything */
|
||||
ReInstall = False;
|
||||
}
|
||||
}
|
||||
|
||||
if(ReInstall)
|
||||
{
|
||||
XInstallColormap(dpy,last_cmap);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* Re-Install the active colormap
|
||||
*
|
||||
*************************************************************************/
|
||||
void ReInstallActiveColormap(void)
|
||||
{
|
||||
InstallWindowColormaps(colormap_win);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* InstallWindowColormaps - install the colormaps for one fvwm window
|
||||
*
|
||||
* Inputs:
|
||||
* type - type of event that caused the installation
|
||||
* tmp - for a subset of event types, the address of the
|
||||
* window structure, whose colormaps are to be installed.
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
void InstallWindowColormaps (FvwmWindow *tmp)
|
||||
{
|
||||
int i;
|
||||
XWindowAttributes attributes;
|
||||
Window w;
|
||||
Bool ThisWinInstalled = False;
|
||||
|
||||
|
||||
/* If no window, then install root colormap */
|
||||
if(!tmp)
|
||||
tmp = &Scr.FvwmRoot;
|
||||
|
||||
colormap_win = tmp;
|
||||
/* Save the colormap to be loaded for when force loading of
|
||||
* root colormap(s) ends.
|
||||
*/
|
||||
Scr.pushed_window = tmp;
|
||||
/* Don't load any new colormap if root colormap(s) has been
|
||||
* force loaded.
|
||||
*/
|
||||
if (Scr.root_pushes)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(tmp->number_cmap_windows > 0)
|
||||
{
|
||||
for(i=tmp->number_cmap_windows -1; i>=0;i--)
|
||||
{
|
||||
w = tmp->cmap_windows[i];
|
||||
if(w == tmp->w)
|
||||
ThisWinInstalled = True;
|
||||
XGetWindowAttributes(dpy,w,&attributes);
|
||||
|
||||
if(last_cmap != attributes.colormap)
|
||||
{
|
||||
last_cmap = attributes.colormap;
|
||||
XInstallColormap(dpy,attributes.colormap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!ThisWinInstalled)
|
||||
{
|
||||
if(last_cmap != tmp->attr.colormap)
|
||||
{
|
||||
last_cmap = tmp->attr.colormap;
|
||||
XInstallColormap(dpy,tmp->attr.colormap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedures:
|
||||
* <Uni/I>nstallRootColormap - Force (un)loads root colormap(s)
|
||||
*
|
||||
* These matching routines provide a mechanism to insure that
|
||||
* the root colormap(s) is installed during operations like
|
||||
* rubber banding or menu display that require colors from
|
||||
* that colormap. Calls may be nested arbitrarily deeply,
|
||||
* as long as there is one UninstallRootColormap call per
|
||||
* InstallRootColormap call.
|
||||
*
|
||||
* The final UninstallRootColormap will cause the colormap list
|
||||
* which would otherwise have be loaded to be loaded, unless
|
||||
* Enter or Leave Notify events are queued, indicating some
|
||||
* other colormap list would potentially be loaded anyway.
|
||||
***********************************************************************/
|
||||
void InstallRootColormap()
|
||||
{
|
||||
FvwmWindow *tmp;
|
||||
if (Scr.root_pushes == 0)
|
||||
{
|
||||
tmp = Scr.pushed_window;
|
||||
InstallWindowColormaps(&Scr.FvwmRoot);
|
||||
Scr.pushed_window = tmp;
|
||||
}
|
||||
Scr.root_pushes++;
|
||||
return;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Unstacks one layer of root colormap pushing
|
||||
* If we peel off the last layer, re-install th e application colormap
|
||||
*
|
||||
***************************************************************************/
|
||||
void UninstallRootColormap()
|
||||
{
|
||||
if (Scr.root_pushes)
|
||||
Scr.root_pushes--;
|
||||
|
||||
if (!Scr.root_pushes)
|
||||
{
|
||||
InstallWindowColormaps(Scr.pushed_window);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Gets the WM_COLORMAP_WINDOWS property from the window
|
||||
* This property typically doesn't exist, but a few applications
|
||||
* use it. These seem to occur mostly on SGI machines.
|
||||
*
|
||||
****************************************************************************/
|
||||
void FetchWmColormapWindows (FvwmWindow *tmp)
|
||||
{
|
||||
if(tmp->cmap_windows != (Window *)NULL)
|
||||
XFree((void *)tmp->cmap_windows);
|
||||
|
||||
if(!XGetWMColormapWindows (dpy, tmp->w, &(tmp->cmap_windows),
|
||||
&(tmp->number_cmap_windows)))
|
||||
{
|
||||
tmp->number_cmap_windows = 0;
|
||||
tmp->cmap_windows = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
2140
fvwm/configure.c
Normal file
2140
fvwm/configure.c
Normal file
File diff suppressed because it is too large
Load Diff
444
fvwm/decorations.c
Normal file
444
fvwm/decorations.c
Normal file
@ -0,0 +1,444 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* This is all original code by Robert Nation
|
||||
* which reads motif mwm window manager
|
||||
* hints from a window, and makes necessary adjustments for fvwm.
|
||||
*
|
||||
* Definitions of the hint structure and the constants are courtesy of
|
||||
* mitnits@bgumail.bgu.ac.il (Roman Mitnitski ), who sent this note,
|
||||
* after conferring with a friend at the OSF:
|
||||
* Hi, Rob.
|
||||
*
|
||||
*I'm happy to announce, that you can use motif public
|
||||
*headers in any way you can... I just got the letter from
|
||||
*my friend, it says literally:
|
||||
*
|
||||
*> Hi.
|
||||
*>
|
||||
*> Yes, you can use motif public header files, in particular
|
||||
*> because there is NO limitation on inclusion of this files
|
||||
*> in your programms....Also, no one can put copyright to the NUMBERS
|
||||
*> (I mean binary flags for decorations) or DATA STRUCTURES
|
||||
*> (I mean little structure used by motif to pass description
|
||||
*> of the decorations to the mwm). Call it another name, if you are
|
||||
*> THAT MUCH concerned.
|
||||
*>
|
||||
*> You can even use the little piece of code I've passed to you -
|
||||
*> we are talking about 10M distribution against two pages of code.
|
||||
*> Don't be silly.
|
||||
*>
|
||||
*> Best wishes.
|
||||
*> Eli.
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "fvwm.h"
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include "misc.h"
|
||||
#include "screen.h"
|
||||
#include "parse.h"
|
||||
#include "menus.h"
|
||||
|
||||
extern Atom _XA_MwmAtom;
|
||||
|
||||
/* Motif window hints */
|
||||
typedef struct
|
||||
{
|
||||
CARD32 flags;
|
||||
CARD32 functions;
|
||||
CARD32 decorations;
|
||||
INT32 inputMode;
|
||||
} PropMotifWmHints;
|
||||
|
||||
typedef PropMotifWmHints PropMwmHints;
|
||||
|
||||
PropMwmHints prop;
|
||||
|
||||
/* Motif window hints */
|
||||
#define MWM_HINTS_FUNCTIONS (1L << 0)
|
||||
#define MWM_HINTS_DECORATIONS (1L << 1)
|
||||
|
||||
/* bit definitions for MwmHints.functions */
|
||||
#define MWM_FUNC_ALL (1L << 0)
|
||||
#define MWM_FUNC_RESIZE (1L << 1)
|
||||
#define MWM_FUNC_MOVE (1L << 2)
|
||||
#define MWM_FUNC_MINIMIZE (1L << 3)
|
||||
#define MWM_FUNC_MAXIMIZE (1L << 4)
|
||||
#define MWM_FUNC_CLOSE (1L << 5)
|
||||
|
||||
/* bit definitions for MwmHints.decorations */
|
||||
#define MWM_DECOR_ALL (1L << 0)
|
||||
#define MWM_DECOR_BORDER (1L << 1)
|
||||
#define MWM_DECOR_RESIZEH (1L << 2)
|
||||
#define MWM_DECOR_TITLE (1L << 3)
|
||||
#define MWM_DECOR_MENU (1L << 4)
|
||||
#define MWM_DECOR_MINIMIZE (1L << 5)
|
||||
#define MWM_DECOR_MAXIMIZE (1L << 6)
|
||||
|
||||
#define PROP_MOTIF_WM_HINTS_ELEMENTS 4
|
||||
#define PROP_MWM_HINTS_ELEMENTS PROP_MOTIF_WM_HINTS_ELEMENTS
|
||||
|
||||
extern FvwmWindow *Tmp_win;
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Reads the property MOTIF_WM_HINTS
|
||||
*
|
||||
*****************************************************************************/
|
||||
void GetMwmHints(FvwmWindow *t)
|
||||
{
|
||||
int actual_format;
|
||||
Atom actual_type;
|
||||
unsigned long nitems, bytesafter;
|
||||
|
||||
if((Scr.flags & (MWMDecorHints|MWMFunctionHints))&&
|
||||
(XGetWindowProperty (dpy, t->w, _XA_MwmAtom, 0L, 20L, False,
|
||||
_XA_MwmAtom, &actual_type, &actual_format, &nitems,
|
||||
&bytesafter,(unsigned char **)&t->mwm_hints)==Success))
|
||||
{
|
||||
if(nitems >= PROP_MOTIF_WM_HINTS_ELEMENTS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
t->mwm_hints = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Interprets the property MOTIF_WM_HINTS, sets decoration and functions
|
||||
* accordingly
|
||||
*
|
||||
*****************************************************************************/
|
||||
void SelectDecor(FvwmWindow *t, unsigned long tflags, int border_width,
|
||||
int resize_width)
|
||||
{
|
||||
int decor,i;
|
||||
PropMwmHints *prop;
|
||||
|
||||
if(!(tflags & BW_FLAG))
|
||||
border_width = Scr.NoBoundaryWidth;
|
||||
|
||||
if(!(tflags & NOBW_FLAG))
|
||||
resize_width = Scr.BoundaryWidth;
|
||||
|
||||
for(i=0;i<5;i++)
|
||||
{
|
||||
t->left_w[i] = 1;
|
||||
t->right_w[i] = 1;
|
||||
}
|
||||
|
||||
decor = MWM_DECOR_ALL;
|
||||
t->functions = MWM_FUNC_ALL;
|
||||
if(t->mwm_hints)
|
||||
{
|
||||
prop = (PropMwmHints *)t->mwm_hints;
|
||||
if(Scr.flags & MWMDecorHints)
|
||||
if(prop->flags & MWM_HINTS_DECORATIONS)
|
||||
decor = prop->decorations;
|
||||
if(Scr.flags & MWMFunctionHints)
|
||||
if(prop->flags & MWM_HINTS_FUNCTIONS)
|
||||
t->functions = prop->functions;
|
||||
}
|
||||
|
||||
/* functions affect the decorations! if the user says
|
||||
* no iconify function, then the iconify button doesn't show
|
||||
* up. */
|
||||
if(t->functions & MWM_FUNC_ALL)
|
||||
{
|
||||
/* If we get ALL + some other things, that means to use
|
||||
* ALL except the other things... */
|
||||
t->functions &= ~MWM_FUNC_ALL;
|
||||
t->functions = (MWM_FUNC_RESIZE | MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE |
|
||||
MWM_FUNC_MAXIMIZE | MWM_FUNC_CLOSE) & (~(t->functions));
|
||||
}
|
||||
if((Scr.flags & MWMFunctionHints) && (t->flags & TRANSIENT))
|
||||
{
|
||||
t->functions &= ~(MWM_FUNC_MAXIMIZE|MWM_FUNC_MINIMIZE);
|
||||
}
|
||||
|
||||
if(decor & MWM_DECOR_ALL)
|
||||
{
|
||||
/* If we get ALL + some other things, that means to use
|
||||
* ALL except the other things... */
|
||||
decor &= ~MWM_DECOR_ALL;
|
||||
decor = (MWM_DECOR_BORDER | MWM_DECOR_RESIZEH | MWM_DECOR_TITLE |
|
||||
MWM_DECOR_MENU | MWM_DECOR_MINIMIZE | MWM_DECOR_MAXIMIZE)
|
||||
& (~decor);
|
||||
}
|
||||
|
||||
/* Now I have the un-altered decor and functions, but with the
|
||||
* ALL attribute cleared and interpreted. I need to modify the
|
||||
* decorations that are affected by the functions */
|
||||
if(!(t->functions & MWM_FUNC_RESIZE))
|
||||
decor &= ~MWM_DECOR_RESIZEH;
|
||||
/* MWM_FUNC_MOVE has no impact on decorations. */
|
||||
if(!(t->functions & MWM_FUNC_MINIMIZE))
|
||||
decor &= ~MWM_DECOR_MINIMIZE;
|
||||
if(!(t->functions & MWM_FUNC_MAXIMIZE))
|
||||
decor &= ~MWM_DECOR_MAXIMIZE;
|
||||
/* MWM_FUNC_CLOSE has no impact on decorations. */
|
||||
|
||||
/* This rule is implicit, but its easier to deal with if
|
||||
* I take care of it now */
|
||||
if(decor & (MWM_DECOR_MENU| MWM_DECOR_MINIMIZE | MWM_DECOR_MAXIMIZE))
|
||||
decor |= MWM_DECOR_TITLE;
|
||||
|
||||
/* Selected the mwm-decor field, now trim down, based on
|
||||
* .fvwmrc entries */
|
||||
if ((tflags & NOTITLE_FLAG)||
|
||||
((!(Scr.flags & DecorateTransients)) && (t->flags & TRANSIENT)))
|
||||
decor &= ~MWM_DECOR_TITLE;
|
||||
|
||||
if ((tflags & NOBORDER_FLAG)||
|
||||
((!(Scr.flags&DecorateTransients)) && (t->flags & TRANSIENT)))
|
||||
decor &= ~MWM_DECOR_RESIZEH;
|
||||
|
||||
if((Scr.flags & MWMDecorHints) && (t->flags & TRANSIENT))
|
||||
{
|
||||
decor &= ~(MWM_DECOR_MAXIMIZE|MWM_DECOR_MINIMIZE);
|
||||
}
|
||||
|
||||
#ifdef SHAPE
|
||||
if(t->wShaped)
|
||||
decor &= ~(BORDER|MWM_DECOR_RESIZEH);
|
||||
#endif
|
||||
/* Assume no decorations, and build up */
|
||||
t->flags &= ~(BORDER|TITLE);
|
||||
t->boundary_width = 0;
|
||||
t->corner_width = 0;
|
||||
t->title_height = 0;
|
||||
|
||||
if(decor & MWM_DECOR_BORDER)
|
||||
{
|
||||
/* A narrow border is displayed (5 pixels - 2 relief, 1 top,
|
||||
* (2 shadow) */
|
||||
t->boundary_width = border_width;
|
||||
}
|
||||
if(decor & MWM_DECOR_TITLE)
|
||||
{
|
||||
/* A title barm with no buttons in it
|
||||
* window gets a 1 pixel wide black border. */
|
||||
t->flags |= TITLE;
|
||||
t->title_height = Scr.TitleHeight;
|
||||
}
|
||||
if(decor & MWM_DECOR_RESIZEH)
|
||||
{
|
||||
/* A wide border, with corner tiles is desplayed
|
||||
* (10 pixels - 2 relief, 2 shadow) */
|
||||
t->flags |= BORDER;
|
||||
t->boundary_width = resize_width;
|
||||
t->corner_width = Scr.TitleHeight + t->boundary_width;
|
||||
}
|
||||
if(!(decor & MWM_DECOR_MENU))
|
||||
{
|
||||
/* title-bar menu button omitted
|
||||
* window gets 1 pixel wide black border */
|
||||
t->left_w[0] = None;
|
||||
}
|
||||
if(!(decor & MWM_DECOR_MINIMIZE))
|
||||
{
|
||||
/* title-bar + iconify button, no menu button.
|
||||
* window gets 1 pixel wide black border */
|
||||
t->right_w[1] = None;
|
||||
}
|
||||
if(!(decor & MWM_DECOR_MAXIMIZE))
|
||||
{
|
||||
/* title-bar + maximize button, no menu button, no iconify.
|
||||
* window has 1 pixel wide black border */
|
||||
t->right_w[0] = None;
|
||||
}
|
||||
if (t->buttons & BUTTON1) t->left_w[0]=None;
|
||||
if (t->buttons & BUTTON3) t->left_w[1]=None;
|
||||
if (t->buttons & BUTTON5) t->left_w[2]=None;
|
||||
if (t->buttons & BUTTON7) t->left_w[3]=None;
|
||||
if (t->buttons & BUTTON9) t->left_w[4]=None;
|
||||
|
||||
if (t->buttons & BUTTON2) t->right_w[0]=None;
|
||||
if (t->buttons & BUTTON4) t->right_w[1]=None;
|
||||
if (t->buttons & BUTTON6) t->right_w[2]=None;
|
||||
if (t->buttons & BUTTON8) t->right_w[3]=None;
|
||||
if (t->buttons & BUTTON10)t->right_w[4]=None;
|
||||
|
||||
t->nr_left_buttons = Scr.nr_left_buttons;
|
||||
t->nr_right_buttons = Scr.nr_right_buttons;
|
||||
|
||||
for(i=0;i<Scr.nr_left_buttons;i++)
|
||||
if(t->left_w[i] == None)
|
||||
t->nr_left_buttons--;
|
||||
|
||||
for(i=0;i<Scr.nr_right_buttons;i++)
|
||||
if(t->right_w[i] == None)
|
||||
t->nr_right_buttons--;
|
||||
|
||||
if(Scr.flags & MWMBorders)
|
||||
t->bw = 0;
|
||||
else if(t->boundary_width <= 0)
|
||||
{
|
||||
t->boundary_width = 0;
|
||||
t->bw = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
t->bw = BW;
|
||||
t->boundary_width = t->boundary_width - 1;
|
||||
}
|
||||
if(t->title_height > 0)
|
||||
t->title_height += t->bw;
|
||||
if(t->boundary_width == 0)
|
||||
t->flags &= ~BORDER;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Checks the function described in menuItem mi, and sees if it
|
||||
* is an allowed function for window Tmp_Win,
|
||||
* according to the motif way of life.
|
||||
*
|
||||
* This routine is used to determine whether or not to grey out menu items.
|
||||
*
|
||||
****************************************************************************/
|
||||
int check_allowed_function(MenuItem *mi)
|
||||
{
|
||||
/* Complex functions are a little tricky... ignore them for now */
|
||||
|
||||
if ((Tmp_win)&&
|
||||
(!(Tmp_win->flags & DoesWmDeleteWindow))&&(mi->func == F_DELETE))
|
||||
return 0;
|
||||
|
||||
/* Move is a funny hint. Keeps it out of the menu, but you're still allowed
|
||||
* to move. */
|
||||
if((mi->func == F_MOVE)&&(Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_MOVE)))
|
||||
return 0;
|
||||
|
||||
if((mi->func == F_RESIZE)&&(Tmp_win)&&
|
||||
(!(Tmp_win->functions & MWM_FUNC_RESIZE)))
|
||||
return 0;
|
||||
|
||||
if((mi->func == F_ICONIFY)&&(Tmp_win)&&
|
||||
(!(Tmp_win->flags & ICONIFIED))&&
|
||||
(!(Tmp_win->functions & MWM_FUNC_MINIMIZE)))
|
||||
return 0;
|
||||
|
||||
if((mi->func == F_MAXIMIZE)&&(Tmp_win)&&
|
||||
(!(Tmp_win->functions & MWM_FUNC_MAXIMIZE)))
|
||||
return 0;
|
||||
|
||||
if((mi->func == F_DELETE)&&(Tmp_win)&&
|
||||
(!(Tmp_win->functions & MWM_FUNC_CLOSE)))
|
||||
return 0;
|
||||
|
||||
if((mi->func == F_CLOSE)&&(Tmp_win)&&
|
||||
(!(Tmp_win->functions & MWM_FUNC_CLOSE)))
|
||||
return 0;
|
||||
|
||||
if((mi->func == F_DESTROY)&&(Tmp_win)&&
|
||||
(!(Tmp_win->functions & MWM_FUNC_CLOSE)))
|
||||
return 0;
|
||||
|
||||
if(mi->func == F_FUNCTION)
|
||||
{
|
||||
/* Hard part! What to do now? */
|
||||
/* Hate to do it, but for lack of a better idea,
|
||||
* check based on the menu entry name */
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_MOVE))&&
|
||||
(mystrncasecmp(mi->item,MOVE_STRING,strlen(MOVE_STRING))==0))
|
||||
return 0;
|
||||
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_RESIZE))&&
|
||||
(mystrncasecmp(mi->item,RESIZE_STRING1,strlen(RESIZE_STRING1))==0))
|
||||
return 0;
|
||||
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_RESIZE))&&
|
||||
(mystrncasecmp(mi->item,RESIZE_STRING2,strlen(RESIZE_STRING2))==0))
|
||||
return 0;
|
||||
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_MINIMIZE))&&
|
||||
(!(Tmp_win->flags & ICONIFIED))&&
|
||||
(mystrncasecmp(mi->item,MINIMIZE_STRING,strlen(MINIMIZE_STRING))==0))
|
||||
return 0;
|
||||
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_MINIMIZE))&&
|
||||
(mystrncasecmp(mi->item,MINIMIZE_STRING2,strlen(MINIMIZE_STRING2))==0))
|
||||
return 0;
|
||||
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_MAXIMIZE))&&
|
||||
(mystrncasecmp(mi->item,MAXIMIZE_STRING,strlen(MAXIMIZE_STRING))==0))
|
||||
return 0;
|
||||
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_CLOSE))&&
|
||||
(mystrncasecmp(mi->item,CLOSE_STRING1,strlen(CLOSE_STRING1))==0))
|
||||
return 0;
|
||||
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_CLOSE))&&
|
||||
(mystrncasecmp(mi->item,CLOSE_STRING2,strlen(CLOSE_STRING2))==0))
|
||||
return 0;
|
||||
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_CLOSE))&&
|
||||
(mystrncasecmp(mi->item,CLOSE_STRING3,strlen(CLOSE_STRING3))==0))
|
||||
return 0;
|
||||
|
||||
if((Tmp_win)&&(!(Tmp_win->functions & MWM_FUNC_CLOSE))&&
|
||||
(mystrncasecmp(mi->item,CLOSE_STRING4,strlen(CLOSE_STRING4))==0))
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Checks the function "function", and sees if it
|
||||
* is an allowed function for window t, according to the motif way of life.
|
||||
* This routine is used to decide if we should refuse to perform a function.
|
||||
*
|
||||
****************************************************************************/
|
||||
int check_allowed_function2(int function, FvwmWindow *t)
|
||||
{
|
||||
|
||||
if(Scr.flags & MWMHintOverride)
|
||||
return 1;
|
||||
|
||||
|
||||
if ((t)&&(!(t->flags & DoesWmDeleteWindow))&&(function == F_DELETE))
|
||||
return 0;
|
||||
|
||||
if((function == F_RESIZE)&&(t)&&
|
||||
(!(t->functions & MWM_FUNC_RESIZE)))
|
||||
return 0;
|
||||
|
||||
if((function == F_ICONIFY)&&(t)&&
|
||||
(!(t->flags & ICONIFIED))&&
|
||||
(!(t->functions & MWM_FUNC_MINIMIZE)))
|
||||
return 0;
|
||||
|
||||
if((function == F_MAXIMIZE)&&(t)&&
|
||||
(!(t->functions & MWM_FUNC_MAXIMIZE)))
|
||||
return 0;
|
||||
|
||||
if((function == F_DELETE)&&(t)&&
|
||||
(!(t->functions & MWM_FUNC_CLOSE)))
|
||||
return 0;
|
||||
|
||||
if((function == F_DESTROY)&&(t)&&
|
||||
(!(t->functions & MWM_FUNC_CLOSE)))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
1460
fvwm/events.c
Normal file
1460
fvwm/events.c
Normal file
File diff suppressed because it is too large
Load Diff
1711
fvwm/functions.c
Normal file
1711
fvwm/functions.c
Normal file
File diff suppressed because it is too large
Load Diff
1179
fvwm/fvwm.c
Normal file
1179
fvwm/fvwm.c
Normal file
File diff suppressed because it is too large
Load Diff
288
fvwm/fvwm.h
Normal file
288
fvwm/fvwm.h
Normal file
@ -0,0 +1,288 @@
|
||||
/****************************************************************************
|
||||
* This module is based on Twm, but has been siginificantly modified
|
||||
* by Rob Nation
|
||||
****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/
|
||||
/** Salt Lake City, Utah **/
|
||||
/** Portions Copyright 1989 by the Massachusetts Institute of Technology **/
|
||||
/** Cambridge, Massachusetts **/
|
||||
/** **/
|
||||
/** All Rights Reserved **/
|
||||
/** **/
|
||||
/** Permission to use, copy, modify, and distribute this software and **/
|
||||
/** its documentation for any purpose and without fee is hereby **/
|
||||
/** granted, provided that the above copyright notice appear in all **/
|
||||
/** copies and that both that copyright notice and this permis- **/
|
||||
/** sion notice appear in supporting documentation, and that the **/
|
||||
/** names of Evans & Sutherland and M.I.T. not be used in advertising **/
|
||||
/** in publicity pertaining to distribution of the software without **/
|
||||
/** specific, written prior permission. **/
|
||||
/** **/
|
||||
/** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/
|
||||
/** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/
|
||||
/** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/
|
||||
/** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/
|
||||
/** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
|
||||
/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
|
||||
/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
|
||||
/** OR PERFORMANCE OF THIS SOFTWARE. **/
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* fvwm include file
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef _FVWM_
|
||||
#define _FVWM_
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/cursorfont.h>
|
||||
|
||||
#ifndef WithdrawnState
|
||||
#define WithdrawnState 0
|
||||
#endif
|
||||
|
||||
/* use PanFrames! this replaces the 3 pixel margin with PanFrame windows
|
||||
it should not be an option, once it works right. HEDU 2/2/94 */
|
||||
#define PAN_FRAME_THICKNESS 2 /* or just 1 ? */
|
||||
|
||||
/* the maximum number of mouse buttons fvwm knows about */
|
||||
/* don't think that upping this to 5 will make everything
|
||||
* hunky-dory with 5 button mouses */
|
||||
#define MAX_BUTTONS 3
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
#ifdef SIGNALRETURNSINT
|
||||
#define SIGNAL_T int
|
||||
#define SIGNAL_RETURN return 0
|
||||
#else
|
||||
#define SIGNAL_T void
|
||||
#define SIGNAL_RETURN return
|
||||
#endif
|
||||
|
||||
#define BW 1 /* border width */
|
||||
#define BOUNDARY_WIDTH 7 /* border width */
|
||||
#define CORNER_WIDTH 16 /* border width */
|
||||
|
||||
# define HEIGHT_EXTRA 4 /* Extra height for texts in popus */
|
||||
# define HEIGHT_EXTRA_TITLE 4 /* Extra height for underlining title */
|
||||
# define HEIGHT_SEPARATOR 4 /* Height of separator lines */
|
||||
|
||||
#define SCROLL_REGION 2 /* region around screen edge that */
|
||||
/* triggers scrolling */
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#define NULLSTR ((char *) NULL)
|
||||
|
||||
/* contexts for button presses */
|
||||
#define C_NO_CONTEXT 0
|
||||
#define C_WINDOW 1
|
||||
#define C_TITLE 2
|
||||
#define C_ICON 4
|
||||
#define C_ROOT 8
|
||||
#define C_FRAME 16
|
||||
#define C_SIDEBAR 32
|
||||
#define C_L1 64
|
||||
#define C_L2 128
|
||||
#define C_L3 256
|
||||
#define C_L4 512
|
||||
#define C_L5 1024
|
||||
#define C_R1 2048
|
||||
#define C_R2 4096
|
||||
#define C_R3 8192
|
||||
#define C_R4 16384
|
||||
#define C_R5 32768
|
||||
#define C_RALL (C_R1|C_R2|C_R3|C_R4|C_R5)
|
||||
#define C_LALL (C_L1|C_L2|C_L3|C_L4|C_L5)
|
||||
#define C_ALL (C_WINDOW|C_TITLE|C_ICON|C_ROOT|C_FRAME|C_SIDEBAR|\
|
||||
C_L1|C_L2|C_L3|C_L4|C_L5|C_R1|C_R2|C_R3|C_R4|C_R5)
|
||||
|
||||
typedef struct MyFont
|
||||
{
|
||||
char *name; /* name of the font */
|
||||
XFontStruct *font; /* font structure */
|
||||
int height; /* height of the font */
|
||||
int y; /* Y coordinate to draw characters */
|
||||
} MyFont;
|
||||
|
||||
typedef struct ColorPair
|
||||
{
|
||||
Pixel fore;
|
||||
Pixel back;
|
||||
} ColorPair;
|
||||
|
||||
|
||||
/* for each window that is on the display, one of these structures
|
||||
* is allocated and linked into a list
|
||||
*/
|
||||
typedef struct FvwmWindow
|
||||
{
|
||||
struct FvwmWindow *next; /* next fvwm window */
|
||||
struct FvwmWindow *prev; /* prev fvwm window */
|
||||
Window w; /* the child window */
|
||||
int old_bw; /* border width before reparenting */
|
||||
Window frame; /* the frame window */
|
||||
Window Parent; /* Ugly Ugly Ugly - it looks like you
|
||||
* HAVE to reparent the app window into
|
||||
* a window whose size = app window,
|
||||
* or else you can't keep xv and matlab
|
||||
* happy at the same time! */
|
||||
Window title_w; /* the title bar window */
|
||||
Window sides[4];
|
||||
Window corners[4]; /* Corner pieces */
|
||||
int nr_left_buttons;
|
||||
int nr_right_buttons;
|
||||
Window left_w[5];
|
||||
Window right_w[5];
|
||||
Window icon_w; /* the icon window */
|
||||
Window icon_pixmap_w; /* the icon window */
|
||||
#ifndef NO_PAGER
|
||||
Window pager_view;
|
||||
#endif
|
||||
#ifdef SHAPE
|
||||
int wShaped; /* is this a shaped window */
|
||||
#endif
|
||||
int frame_x; /* x position of frame */
|
||||
int frame_y; /* y position of frame */
|
||||
int frame_width; /* width of frame */
|
||||
int frame_height; /* height of frame */
|
||||
int boundary_width;
|
||||
int corner_width;
|
||||
int bw;
|
||||
int title_x;
|
||||
int title_y;
|
||||
int title_height; /* height of the title bar */
|
||||
int title_width; /* width of the title bar */
|
||||
int icon_x_loc; /* icon window x coordinate */
|
||||
int icon_xl_loc; /* icon label window x coordinate */
|
||||
int icon_y_loc; /* icon window y coordiante */
|
||||
int icon_w_width; /* width of the icon window */
|
||||
int icon_w_height; /* height of the icon window */
|
||||
int icon_t_width; /* width of the icon title window */
|
||||
int icon_p_width; /* width of the icon pixmap window */
|
||||
int icon_p_height; /* height of the icon pixmap window */
|
||||
Pixmap iconPixmap; /* pixmap for the icon */
|
||||
int iconDepth; /* Drawable depth for the icon */
|
||||
Pixmap icon_maskPixmap; /* pixmap for the icon mask */
|
||||
char *name; /* name of the window */
|
||||
char *icon_name; /* name of the icon */
|
||||
XWindowAttributes attr; /* the child window attributes */
|
||||
XSizeHints hints; /* normal hints */
|
||||
XWMHints *wmhints; /* WM hints */
|
||||
XClassHint class;
|
||||
int Desk; /* Tells which desktop this window is on */
|
||||
int FocusDesk; /* Where (if at all) was it focussed */
|
||||
int DeIconifyDesk; /* Desk to deiconify to, for StubbornIcons */
|
||||
Window transientfor;
|
||||
|
||||
unsigned long flags;
|
||||
char *icon_bitmap_file;
|
||||
|
||||
int orig_x; /* unmaximized x coordinate */
|
||||
int orig_y; /* unmaximized y coordinate */
|
||||
int orig_wd; /* unmaximized window width */
|
||||
int orig_ht; /* unmaximized window height */
|
||||
|
||||
int xdiff,ydiff; /* used to restore window position on exit*/
|
||||
int *mwm_hints;
|
||||
int functions;
|
||||
Window *cmap_windows; /* Colormap windows property */
|
||||
int number_cmap_windows; /* Should generally be 0 */
|
||||
int focus_sequence;
|
||||
Pixel ReliefPixel;
|
||||
Pixel ShadowPixel;
|
||||
Pixel TextPixel;
|
||||
Pixel BackPixel;
|
||||
unsigned long buttons;
|
||||
|
||||
} FvwmWindow;
|
||||
|
||||
/***************************************************************************
|
||||
* window flags definitions
|
||||
***************************************************************************/
|
||||
#define STICKY 1 /* Does window stick to glass? */
|
||||
#define ONTOP 2 /* does window stay on top */
|
||||
#define BORDER 4 /* Is this decorated with border*/
|
||||
#define TITLE 8 /* Is this decorated with title */
|
||||
#define MAPPED 16 /* is it mapped? */
|
||||
#define ICONIFIED 32 /* is it an icon now? */
|
||||
#define TRANSIENT 64 /* is it a transient window? */
|
||||
#define RAISED 128 /* if its a sticky window, does it need to be raised*/
|
||||
#define VISIBLE 256 /* is the window fully visible */
|
||||
#define ICON_OURS 512 /* is the icon window supplied by the app? */
|
||||
#define XPM_FLAG 1024 /* is the icon window an xpm? */
|
||||
#define PIXMAP_OURS 2048 /* is the icon pixmap ours to free? */
|
||||
#define SHAPED_ICON 4096 /* is the icon shaped? */
|
||||
#define MAXIMIZED 8192 /* is the window maximized? */
|
||||
#define DoesWmTakeFocus 16384
|
||||
#define DoesWmDeleteWindow 32768
|
||||
/* has the icon been moved by the user? */
|
||||
#define ICON_MOVED 65536
|
||||
/* was the icon unmapped, even though the window is still iconified
|
||||
* (Transients) */
|
||||
#define ICON_UNMAPPED 131072
|
||||
#define WINDOWLISTSKIP 262144
|
||||
#define SUPPRESSICON 524288
|
||||
#define CIRCULATESKIP 1048576
|
||||
#define STARTICONIC 2097152
|
||||
/* Sent an XMapWindow, but didn't receive a MapNotify yet.*/
|
||||
#define MAP_PENDING 4194304
|
||||
#define NOICON_TITLE 8388608
|
||||
|
||||
/* flags to suppress/enable title bar buttons */
|
||||
#define BUTTON1 1
|
||||
#define BUTTON2 2
|
||||
#define BUTTON3 4
|
||||
#define BUTTON4 8
|
||||
#define BUTTON5 16
|
||||
#define BUTTON6 32
|
||||
#define BUTTON7 64
|
||||
#define BUTTON8 128
|
||||
#define BUTTON9 256
|
||||
#define BUTTON10 512
|
||||
|
||||
#include <stdlib.h>
|
||||
extern void Reborder(void);
|
||||
extern void SigDone(int);
|
||||
extern void Restart(int nonsense);
|
||||
extern void Done(int, char *);
|
||||
|
||||
extern Display *dpy;
|
||||
|
||||
extern XClassHint NoClass;
|
||||
|
||||
extern XContext FvwmContext;
|
||||
|
||||
extern Window JunkRoot, JunkChild;
|
||||
extern int JunkX, JunkY;
|
||||
extern unsigned int JunkWidth, JunkHeight, JunkBW, JunkDepth, JunkMask;
|
||||
|
||||
#ifdef PAN_FRAMES
|
||||
extern void checkPanFrames();
|
||||
extern void raisePanFrames();
|
||||
#endif
|
||||
|
||||
extern Atom _XA_MIT_PRIORITY_COLORS;
|
||||
extern Atom _XA_WM_CHANGE_STATE;
|
||||
extern Atom _XA_WM_STATE;
|
||||
extern Atom _XA_WM_COLORMAP_WINDOWS;
|
||||
extern Atom _XA_WM_PROTOCOLS;
|
||||
extern Atom _XA_WM_TAKE_FOCUS;
|
||||
extern Atom _XA_WM_SAVE_YOURSELF;
|
||||
extern Atom _XA_WM_DELETE_WINDOW;
|
||||
extern Atom _XA_WM_DESKTOP;
|
||||
extern Atom _XA_FVWM_STICKS_TO_GLASS;
|
||||
extern Atom _XA_FVWM_CLIENT;
|
||||
|
||||
#endif /* _FVWM_ */
|
||||
|
||||
|
||||
|
1701
fvwm/fvwm.man
Normal file
1701
fvwm/fvwm.man
Normal file
File diff suppressed because it is too large
Load Diff
917
fvwm/icons.c
Normal file
917
fvwm/icons.c
Normal file
@ -0,0 +1,917 @@
|
||||
/****************************************************************************
|
||||
* This module is mostly all new
|
||||
* by Rob Nation
|
||||
* A little of it is borrowed from ctwm.
|
||||
* Copyright 1993 Robert Nation. No restrictions are placed on this code,
|
||||
* as long as the copyright notice is preserved
|
||||
****************************************************************************/
|
||||
/***********************************************************************
|
||||
*
|
||||
* fvwm icon code
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef NeXT
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#include <X11/Intrinsic.h>
|
||||
#ifdef XPM
|
||||
#include <X11/xpm.h>
|
||||
#endif /* XPM */
|
||||
#include "fvwm.h"
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
#include "module.h"
|
||||
|
||||
#ifdef SHAPE
|
||||
#include <X11/extensions/shape.h>
|
||||
#endif /* SHAPE */
|
||||
|
||||
|
||||
void GrabIconButtons(FvwmWindow *, Window);
|
||||
void GrabIconKeys(FvwmWindow *, Window);
|
||||
MyFont *IconFont;
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Creates an icon window as needed
|
||||
*
|
||||
****************************************************************************/
|
||||
void CreateIconWindow(FvwmWindow *tmp_win, int def_x, int def_y)
|
||||
{
|
||||
int final_x, final_y;
|
||||
unsigned long valuemask; /* mask for create windows */
|
||||
XSetWindowAttributes attributes; /* attributes for create windows */
|
||||
|
||||
tmp_win->flags |= ICON_OURS;
|
||||
tmp_win->flags &= ~XPM_FLAG;
|
||||
tmp_win->flags &= ~PIXMAP_OURS;
|
||||
tmp_win->flags &= ~SHAPED_ICON;
|
||||
tmp_win->icon_pixmap_w = None;
|
||||
tmp_win->iconPixmap = None;
|
||||
tmp_win->iconDepth = 0;
|
||||
|
||||
if(tmp_win->flags & SUPPRESSICON)
|
||||
return;
|
||||
|
||||
/* First, see if it was specified in the .fvwmrc */
|
||||
tmp_win->icon_p_height = 0;
|
||||
tmp_win->icon_p_width = 0;
|
||||
|
||||
/* First, check for a monochrome bitmap */
|
||||
if(tmp_win->icon_bitmap_file != NULL)
|
||||
GetBitmapFile(tmp_win);
|
||||
|
||||
/* Next, check for a color pixmap */
|
||||
if((tmp_win->icon_bitmap_file != NULL)&&
|
||||
(tmp_win->icon_p_height == 0)&&(tmp_win->icon_p_width == 0))
|
||||
GetXPMFile(tmp_win);
|
||||
|
||||
/* Next, See if the app supplies its own icon window */
|
||||
if((tmp_win->icon_p_height == 0)&&(tmp_win->icon_p_width == 0)&&
|
||||
(tmp_win->wmhints) && (tmp_win->wmhints->flags & IconWindowHint))
|
||||
GetIconWindow(tmp_win);
|
||||
|
||||
/* Finally, try to get icon bitmap from the application */
|
||||
if((tmp_win->icon_p_height == 0)&&(tmp_win->icon_p_width == 0)&&
|
||||
(tmp_win->wmhints)&&(tmp_win->wmhints->flags & IconPixmapHint))
|
||||
GetIconBitmap(tmp_win);
|
||||
|
||||
/* figure out the icon window size */
|
||||
if (!(tmp_win->flags & NOICON_TITLE)||(tmp_win->icon_p_height == 0))
|
||||
{
|
||||
tmp_win->icon_t_width = XTextWidth(IconFont->font,tmp_win->icon_name,
|
||||
strlen(tmp_win->icon_name));
|
||||
tmp_win->icon_w_height = ICON_HEIGHT;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp_win->icon_t_width = 0;
|
||||
tmp_win->icon_w_height = 0;
|
||||
}
|
||||
if((tmp_win->flags & ICON_OURS)&&(tmp_win->icon_p_height >0))
|
||||
{
|
||||
tmp_win->icon_p_width += 4;
|
||||
tmp_win->icon_p_height +=4;
|
||||
}
|
||||
|
||||
if(tmp_win->icon_p_width == 0)
|
||||
tmp_win->icon_p_width = tmp_win->icon_t_width+6;
|
||||
tmp_win->icon_w_width = tmp_win->icon_p_width;
|
||||
|
||||
final_x = def_x;
|
||||
final_y = def_y;
|
||||
if(final_x <0)
|
||||
final_x = 0;
|
||||
if(final_y <0)
|
||||
final_y = 0;
|
||||
|
||||
if(final_x + tmp_win->icon_w_width >=Scr.MyDisplayWidth)
|
||||
final_x = Scr.MyDisplayWidth - tmp_win->icon_w_width-1;
|
||||
if(final_y + tmp_win->icon_w_height >=Scr.MyDisplayHeight)
|
||||
final_y = Scr.MyDisplayHeight - tmp_win->icon_w_height-1;
|
||||
|
||||
tmp_win->icon_x_loc = final_x;
|
||||
tmp_win->icon_xl_loc = final_x;
|
||||
tmp_win->icon_y_loc = final_y;
|
||||
|
||||
/* clip to fit on screen */
|
||||
attributes.background_pixel = Scr.StdColors.back;
|
||||
valuemask = CWBorderPixel | CWCursor | CWEventMask | CWBackPixel;
|
||||
attributes.border_pixel = Scr.StdColors.fore;
|
||||
attributes.cursor = Scr.FvwmCursors[DEFAULT];
|
||||
attributes.event_mask = (ButtonPressMask | ButtonReleaseMask |
|
||||
VisibilityChangeMask |
|
||||
ExposureMask | KeyPressMask|EnterWindowMask |
|
||||
FocusChangeMask );
|
||||
if (!(tmp_win->flags & NOICON_TITLE)||(tmp_win->icon_p_height == 0))
|
||||
tmp_win->icon_w =
|
||||
XCreateWindow(dpy, Scr.Root, final_x, final_y+tmp_win->icon_p_height,
|
||||
tmp_win->icon_w_width, tmp_win->icon_w_height,0,
|
||||
CopyFromParent,
|
||||
CopyFromParent,CopyFromParent,valuemask,&attributes);
|
||||
|
||||
if((tmp_win->flags & ICON_OURS)&&(tmp_win->icon_p_width>0)&&
|
||||
(tmp_win->icon_p_height>0))
|
||||
{
|
||||
tmp_win->icon_pixmap_w =
|
||||
XCreateWindow(dpy, Scr.Root, final_x, final_y, tmp_win->icon_p_width,
|
||||
tmp_win->icon_p_height, 0, CopyFromParent,
|
||||
CopyFromParent,CopyFromParent,valuemask,&attributes);
|
||||
}
|
||||
else
|
||||
{
|
||||
attributes.event_mask = (ButtonPressMask | ButtonReleaseMask |
|
||||
VisibilityChangeMask |
|
||||
KeyPressMask|EnterWindowMask |
|
||||
FocusChangeMask | LeaveWindowMask );
|
||||
|
||||
valuemask = CWEventMask;
|
||||
XChangeWindowAttributes(dpy,tmp_win->icon_pixmap_w,
|
||||
valuemask,&attributes);
|
||||
}
|
||||
|
||||
|
||||
#ifdef XPM
|
||||
#ifdef SHAPE
|
||||
if (tmp_win->flags & SHAPED_ICON)
|
||||
{
|
||||
XShapeCombineMask(dpy, tmp_win->icon_pixmap_w, ShapeBounding,2, 2,
|
||||
tmp_win->icon_maskPixmap, ShapeSet);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(tmp_win->icon_w != None)
|
||||
{
|
||||
XSaveContext(dpy, tmp_win->icon_w, FvwmContext, (caddr_t)tmp_win);
|
||||
XDefineCursor(dpy, tmp_win->icon_w, Scr.FvwmCursors[DEFAULT]);
|
||||
GrabIconButtons(tmp_win,tmp_win->icon_w);
|
||||
GrabIconKeys(tmp_win,tmp_win->icon_w);
|
||||
}
|
||||
if(tmp_win->icon_pixmap_w != None)
|
||||
{
|
||||
XSaveContext(dpy, tmp_win->icon_pixmap_w, FvwmContext, (caddr_t)tmp_win);
|
||||
XDefineCursor(dpy, tmp_win->icon_pixmap_w, Scr.FvwmCursors[DEFAULT]);
|
||||
GrabIconButtons(tmp_win,tmp_win->icon_pixmap_w);
|
||||
GrabIconKeys(tmp_win,tmp_win->icon_pixmap_w);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Draws the icon window
|
||||
*
|
||||
****************************************************************************/
|
||||
void DrawIconWindow(FvwmWindow *Tmp_win)
|
||||
{
|
||||
GC Shadow, Relief;
|
||||
Pixel TextColor,BackColor;
|
||||
int x ;
|
||||
|
||||
if(Tmp_win->flags & SUPPRESSICON)
|
||||
return;
|
||||
|
||||
if(Tmp_win->icon_w != None)
|
||||
flush_expose (Tmp_win->icon_w);
|
||||
if(Tmp_win->icon_pixmap_w != None)
|
||||
flush_expose (Tmp_win->icon_pixmap_w);
|
||||
|
||||
if(Scr.Hilite == Tmp_win)
|
||||
{
|
||||
if(Scr.d_depth < 2)
|
||||
Relief = Scr.HiShadowGC;
|
||||
else
|
||||
Relief = Scr.HiReliefGC;
|
||||
Shadow = Scr.HiShadowGC;
|
||||
/* resize the icon name window */
|
||||
if(Tmp_win->icon_w != None)
|
||||
{
|
||||
Tmp_win->icon_w_width = Tmp_win->icon_t_width+6;
|
||||
if(Tmp_win->icon_w_width < Tmp_win->icon_p_width)
|
||||
Tmp_win->icon_w_width = Tmp_win->icon_p_width;
|
||||
Tmp_win->icon_xl_loc = Tmp_win->icon_x_loc -
|
||||
(Tmp_win->icon_w_width - Tmp_win->icon_p_width)/2;
|
||||
}
|
||||
TextColor = Scr.HiColors.fore;
|
||||
BackColor = Scr.HiColors.back;
|
||||
}
|
||||
else
|
||||
{
|
||||
if((Tmp_win->flags & STICKY)&&(Scr.d_depth < 2))
|
||||
{
|
||||
Relief = Scr.StickyShadowGC;
|
||||
Shadow = Scr.StickyShadowGC;
|
||||
}
|
||||
else if(Scr.d_depth < 2)
|
||||
{
|
||||
Relief = Scr.StdShadowGC;
|
||||
Shadow = Scr.StdShadowGC;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Tmp_win->BackPixel != Scr.StdColors.back)
|
||||
{
|
||||
Globalgcv.foreground = Tmp_win->ReliefPixel;
|
||||
Globalgcm = GCForeground;
|
||||
XChangeGC(dpy,Scr.ScratchGC1,Globalgcm,&Globalgcv);
|
||||
Relief = Scr.ScratchGC1;
|
||||
|
||||
Globalgcv.foreground = Tmp_win->ShadowPixel;
|
||||
XChangeGC(dpy,Scr.ScratchGC2,Globalgcm,&Globalgcv);
|
||||
Shadow = Scr.ScratchGC2;
|
||||
}
|
||||
else
|
||||
{
|
||||
Relief = Scr.StdReliefGC;
|
||||
Shadow = Scr.StdShadowGC;
|
||||
}
|
||||
}
|
||||
/* resize the icon name window */
|
||||
if(Tmp_win->icon_w != None)
|
||||
{
|
||||
Tmp_win->icon_w_width = Tmp_win->icon_p_width;
|
||||
Tmp_win->icon_xl_loc = Tmp_win->icon_x_loc;
|
||||
}
|
||||
TextColor = Tmp_win->TextPixel;
|
||||
BackColor = Tmp_win->BackPixel;
|
||||
|
||||
}
|
||||
if((Tmp_win->flags & ICON_OURS)&&(Tmp_win->icon_pixmap_w != None))
|
||||
XSetWindowBackground(dpy,Tmp_win->icon_pixmap_w,
|
||||
BackColor);
|
||||
if(Tmp_win->icon_w != None)
|
||||
XSetWindowBackground(dpy,Tmp_win->icon_w,BackColor);
|
||||
|
||||
/* write the icon label */
|
||||
NewFontAndColor(IconFont->font->fid,TextColor,BackColor);
|
||||
|
||||
if(Tmp_win->icon_pixmap_w != None)
|
||||
XMoveWindow(dpy,Tmp_win->icon_pixmap_w,Tmp_win->icon_x_loc,
|
||||
Tmp_win->icon_y_loc);
|
||||
if(Tmp_win->icon_w != None)
|
||||
{
|
||||
XMoveResizeWindow(dpy, Tmp_win->icon_w, Tmp_win->icon_xl_loc,
|
||||
Tmp_win->icon_y_loc+Tmp_win->icon_p_height,
|
||||
Tmp_win->icon_w_width,ICON_HEIGHT);
|
||||
|
||||
XClearWindow(dpy,Tmp_win->icon_w);
|
||||
}
|
||||
|
||||
if((Tmp_win->iconPixmap != None)&&(!(Tmp_win->flags & SHAPED_ICON)))
|
||||
RelieveWindow(Tmp_win,Tmp_win->icon_pixmap_w,0,0,
|
||||
Tmp_win->icon_p_width, Tmp_win->icon_p_height,
|
||||
Relief,Shadow, FULL_HILITE);
|
||||
|
||||
/* need to locate the icon pixmap */
|
||||
if(Tmp_win->iconPixmap != None)
|
||||
{
|
||||
if(Tmp_win->iconDepth == Scr.d_depth)
|
||||
{
|
||||
XCopyArea(dpy,Tmp_win->iconPixmap,Tmp_win->icon_pixmap_w,Scr.FontGC,
|
||||
0,0,Tmp_win->icon_p_width-4, Tmp_win->icon_p_height-4,2,2);
|
||||
}
|
||||
else
|
||||
XCopyPlane(dpy,Tmp_win->iconPixmap,Tmp_win->icon_pixmap_w,Scr.FontGC,0,
|
||||
0,Tmp_win->icon_p_width-4, Tmp_win->icon_p_height-4,2,2,1);
|
||||
}
|
||||
|
||||
if(Tmp_win->icon_w != None)
|
||||
{
|
||||
/* text position */
|
||||
x = (Tmp_win->icon_w_width - Tmp_win->icon_t_width)/2;
|
||||
if(x<3)x=3;
|
||||
|
||||
XDrawString (dpy, Tmp_win->icon_w, Scr.FontGC, x,
|
||||
Tmp_win->icon_w_height-IconFont->height+IconFont->y-3,
|
||||
Tmp_win->icon_name, strlen(Tmp_win->icon_name));
|
||||
RelieveWindow(Tmp_win,Tmp_win->icon_w,0,0,Tmp_win->icon_w_width,
|
||||
ICON_HEIGHT,Relief,Shadow, FULL_HILITE);
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* RedoIconName - procedure to re-position the icon window and name
|
||||
*
|
||||
************************************************************************/
|
||||
void RedoIconName(FvwmWindow *Tmp_win)
|
||||
{
|
||||
#ifndef NO_PAGER
|
||||
if(Scr.PagerFont.height > 0)
|
||||
{
|
||||
XClearWindow(dpy,Tmp_win->pager_view);
|
||||
RedrawPager();
|
||||
}
|
||||
#endif
|
||||
|
||||
if(Tmp_win->flags & SUPPRESSICON)
|
||||
return;
|
||||
|
||||
if (Tmp_win->icon_w == (int)NULL)
|
||||
return;
|
||||
|
||||
Tmp_win->icon_t_width = XTextWidth(IconFont->font,Tmp_win->icon_name,
|
||||
strlen(Tmp_win->icon_name));
|
||||
/* clear the icon window, and trigger a re-draw via an expose event */
|
||||
if (Tmp_win->flags & ICONIFIED)
|
||||
XClearArea(dpy, Tmp_win->icon_w, 0, 0, 0, 0, True);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* AutoPlace - Find a home for an icon
|
||||
*
|
||||
************************************************************************/
|
||||
void AutoPlace(FvwmWindow *t)
|
||||
{
|
||||
int test_x=0, test_y=0,tw,th,tx,ty,i,temp_h,temp_w;
|
||||
int base_x, base_y;
|
||||
int width,height;
|
||||
FvwmWindow *test_window;
|
||||
Bool loc_ok;
|
||||
int real_x=10, real_y=10;
|
||||
|
||||
/* New! Put icon in same page as the center of the window */
|
||||
/* Not a good idea for StickyIcons */
|
||||
if((Scr.flags & StickyIcons)||(t->flags & STICKY))
|
||||
{
|
||||
base_x = 0;
|
||||
base_y = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
base_x=((t->frame_x+Scr.Vx+(t->frame_width>>1))/Scr.MyDisplayWidth)*
|
||||
Scr.MyDisplayWidth - Scr.Vx;
|
||||
base_y=((t->frame_y+Scr.Vy+(t->frame_height>>1))/Scr.MyDisplayHeight)*
|
||||
Scr.MyDisplayHeight - Scr.Vy;
|
||||
}
|
||||
if(t->flags & ICON_MOVED)
|
||||
{
|
||||
/* just make sure the icon is on this screen */
|
||||
t->icon_x_loc = t->icon_x_loc % Scr.MyDisplayWidth + base_x;
|
||||
t->icon_y_loc = t->icon_y_loc % Scr.MyDisplayHeight + base_y;
|
||||
if(t->icon_x_loc < 0)
|
||||
t->icon_x_loc += Scr.MyDisplayWidth;
|
||||
if(t->icon_y_loc < 0)
|
||||
t->icon_y_loc += Scr.MyDisplayHeight;
|
||||
}
|
||||
else if (t->wmhints && t->wmhints->flags & IconPositionHint)
|
||||
{
|
||||
t->icon_x_loc = t->wmhints->icon_x;
|
||||
t->icon_y_loc = t->wmhints->icon_y;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = t->icon_p_width;
|
||||
height = t->icon_w_height + t->icon_p_height;
|
||||
loc_ok = False;
|
||||
|
||||
/* check all boxes in order */
|
||||
i=0;
|
||||
while((i<Scr.NumBoxes)&&(!loc_ok))
|
||||
{
|
||||
/* In each IconBox, start at the upper left, travel right, then
|
||||
* down */
|
||||
test_y = Scr.IconBoxes[i][1]+base_y;
|
||||
|
||||
temp_h = height;
|
||||
temp_w = width;
|
||||
|
||||
/* OK second try at this.
|
||||
* If the window is taller than the icon box, ignore the icon height
|
||||
* when figuring where to put it. Same goes for the width */
|
||||
/* This should permit reasonably graceful handling of big icons. */
|
||||
if(width >= (Scr.IconBoxes[i][2] - Scr.IconBoxes[i][0]))
|
||||
temp_w = 0;
|
||||
if(height >= (Scr.IconBoxes[i][3] - Scr.IconBoxes[i][1]))
|
||||
temp_h = 0;
|
||||
|
||||
while(((test_y + temp_h) < (Scr.IconBoxes[i][3]+base_y))&&(!loc_ok))
|
||||
{
|
||||
|
||||
test_x = Scr.IconBoxes[i][0]+base_x;
|
||||
while(((test_x + temp_w) < (Scr.IconBoxes[i][2]+base_x))&&
|
||||
(!loc_ok))
|
||||
{
|
||||
real_x = test_x;
|
||||
real_y = test_y;
|
||||
|
||||
if(test_x + width > (Scr.MyDisplayWidth-2+base_x))
|
||||
real_x = Scr.MyDisplayWidth - width -2 + base_x;
|
||||
if(test_y + height > (Scr.MyDisplayHeight-2+base_y))
|
||||
real_y = Scr.MyDisplayHeight - height -2+base_y;
|
||||
if(test_x <base_x)
|
||||
real_x = base_x;
|
||||
if(test_y < base_y)
|
||||
real_y = base_y;
|
||||
loc_ok = True;
|
||||
test_window = Scr.FvwmRoot.next;
|
||||
while((test_window != (FvwmWindow *)0)&&(loc_ok == True))
|
||||
{
|
||||
if(test_window->Desk == t->Desk)
|
||||
{
|
||||
if((test_window->flags&ICONIFIED)&&
|
||||
(test_window->icon_w||test_window->icon_pixmap_w)&&
|
||||
(test_window != t))
|
||||
{
|
||||
tw=test_window->icon_p_width;
|
||||
th=test_window->icon_p_height+
|
||||
test_window->icon_w_height;
|
||||
tx = test_window->icon_x_loc;
|
||||
ty = test_window->icon_y_loc;
|
||||
|
||||
if((tx<(real_x+width+3))&&((tx+tw+3) > real_x)&&
|
||||
(ty<(real_y+height+3))&&((ty+th + 3)>real_y))
|
||||
{
|
||||
loc_ok = False;
|
||||
}
|
||||
}
|
||||
if(Scr.flags & StubbornIconPlacement)
|
||||
{
|
||||
if(!(test_window->flags&ICONIFIED)&&
|
||||
(test_window!=t))
|
||||
{
|
||||
tw=test_window->frame_width;
|
||||
th=test_window->frame_height;
|
||||
tx = test_window->frame_x;
|
||||
ty = test_window->frame_y;
|
||||
|
||||
if((tx < (real_x+width+3))&&
|
||||
((tx+tw+3)>real_x)&&
|
||||
(ty < (real_y+height+3))&&
|
||||
((ty+th+3)>real_y))
|
||||
{
|
||||
loc_ok = False;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
test_window = test_window->next;
|
||||
}
|
||||
test_x +=3;
|
||||
}
|
||||
test_y +=3;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if(loc_ok == False)
|
||||
return;
|
||||
t->icon_x_loc = real_x;
|
||||
t->icon_y_loc = real_y;
|
||||
}
|
||||
|
||||
if(t->icon_pixmap_w)
|
||||
XMoveWindow(dpy,t->icon_pixmap_w,t->icon_x_loc, t->icon_y_loc);
|
||||
|
||||
t->icon_w_width = t->icon_p_width;
|
||||
t->icon_xl_loc = t->icon_x_loc;
|
||||
|
||||
if (t->icon_w != None)
|
||||
XMoveResizeWindow(dpy, t->icon_w, t->icon_xl_loc,
|
||||
t->icon_y_loc+t->icon_p_height,
|
||||
t->icon_w_width,ICON_HEIGHT);
|
||||
Broadcast(M_ICON_LOCATION,7,t->w,t->frame,
|
||||
(unsigned long)t,
|
||||
t->icon_x_loc,t->icon_y_loc,
|
||||
t->icon_w_width, t->icon_w_height+ t->icon_p_height);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* GrabIconButtons - grab needed buttons for the icon window
|
||||
*
|
||||
* Inputs:
|
||||
* tmp_win - the fvwm window structure to use
|
||||
*
|
||||
***********************************************************************/
|
||||
void GrabIconButtons(FvwmWindow *tmp_win, Window w)
|
||||
{
|
||||
MouseButton *MouseEntry;
|
||||
|
||||
MouseEntry = Scr.MouseButtonRoot;
|
||||
while(MouseEntry != (MouseButton *)0)
|
||||
{
|
||||
if((MouseEntry->func != (int)0)&&(MouseEntry->Context & C_ICON))
|
||||
{
|
||||
if(MouseEntry->Button >0)
|
||||
XGrabButton(dpy, MouseEntry->Button, MouseEntry->Modifier, w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
else
|
||||
{
|
||||
XGrabButton(dpy, 1, MouseEntry->Modifier, w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
XGrabButton(dpy, 2, MouseEntry->Modifier, w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
XGrabButton(dpy, 3, MouseEntry->Modifier, w,
|
||||
True, ButtonPressMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None,
|
||||
Scr.FvwmCursors[DEFAULT]);
|
||||
}
|
||||
}
|
||||
|
||||
MouseEntry = MouseEntry->NextButton;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* GrabIconKeys - grab needed keys for the icon window
|
||||
*
|
||||
* Inputs:
|
||||
* tmp_win - the fvwm window structure to use
|
||||
*
|
||||
***********************************************************************/
|
||||
void GrabIconKeys(FvwmWindow *tmp_win,Window w)
|
||||
{
|
||||
FuncKey *tmp;
|
||||
for (tmp = Scr.FuncKeyRoot.next; tmp != NULL; tmp = tmp->next)
|
||||
{
|
||||
if (tmp->cont & C_ICON)
|
||||
XGrabKey(dpy, tmp->keycode, tmp->mods, w, True,
|
||||
GrabModeAsync, GrabModeAsync);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Looks for a monochrome icon bitmap file
|
||||
*
|
||||
****************************************************************************/
|
||||
void GetBitmapFile(FvwmWindow *tmp_win)
|
||||
{
|
||||
char *path = NULL;
|
||||
int HotX,HotY;
|
||||
extern char *IconPath;
|
||||
|
||||
path = findIconFile(tmp_win->icon_bitmap_file, IconPath,R_OK);
|
||||
|
||||
if(path == NULL)return;
|
||||
if(XReadBitmapFile (dpy, Scr.Root,path,
|
||||
(unsigned int *)&tmp_win->icon_p_width,
|
||||
(unsigned int *)&tmp_win->icon_p_height,
|
||||
&tmp_win->iconPixmap,
|
||||
&HotX, &HotY) != BitmapSuccess)
|
||||
{
|
||||
tmp_win->icon_p_width = 0;
|
||||
tmp_win->icon_p_height = 0;
|
||||
}
|
||||
|
||||
free(path);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Looks for a color XPM icon file
|
||||
*
|
||||
****************************************************************************/
|
||||
void GetXPMFile(FvwmWindow *tmp_win)
|
||||
{
|
||||
#ifdef XPM
|
||||
XWindowAttributes root_attr;
|
||||
XpmAttributes xpm_attributes;
|
||||
extern char *PixmapPath;
|
||||
char *path = NULL;
|
||||
|
||||
path = findIconFile(tmp_win->icon_bitmap_file, PixmapPath,R_OK);
|
||||
if(path == NULL)return;
|
||||
|
||||
XGetWindowAttributes(dpy,Scr.Root,&root_attr);
|
||||
xpm_attributes.colormap = root_attr.colormap;
|
||||
xpm_attributes.closeness = 40000; /* Allow for "similar" colors */
|
||||
xpm_attributes.valuemask = XpmSize | XpmReturnPixels | XpmColormap | XpmCloseness;
|
||||
|
||||
if(XpmReadFileToPixmap(dpy, Scr.Root, path,
|
||||
&tmp_win->iconPixmap,
|
||||
&tmp_win->icon_maskPixmap,
|
||||
&xpm_attributes) == XpmSuccess)
|
||||
{
|
||||
tmp_win->icon_p_width = xpm_attributes.width;
|
||||
tmp_win->icon_p_height = xpm_attributes.height;
|
||||
tmp_win->flags |= XPM_FLAG;
|
||||
tmp_win->flags |= PIXMAP_OURS;
|
||||
tmp_win->iconDepth = Scr.d_depth;
|
||||
#ifdef SHAPE
|
||||
if (tmp_win->icon_maskPixmap)
|
||||
tmp_win->flags |= SHAPED_ICON;
|
||||
#endif
|
||||
}
|
||||
free(path);
|
||||
#endif /* XPM */
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Looks for an application supplied icon window
|
||||
*
|
||||
****************************************************************************/
|
||||
void GetIconWindow(FvwmWindow *tmp_win)
|
||||
{
|
||||
/* We are guaranteed that wmhints is non-null when calling this
|
||||
* routine */
|
||||
if(XGetGeometry(dpy, tmp_win->wmhints->icon_window, &JunkRoot,
|
||||
&JunkX, &JunkY,(unsigned int *)&tmp_win->icon_p_width,
|
||||
(unsigned int *)&tmp_win->icon_p_height,
|
||||
&JunkBW, &JunkDepth)==0)
|
||||
{
|
||||
fprintf(stderr,"Help! Bad Icon Window!\n");
|
||||
}
|
||||
tmp_win->icon_p_width += JunkBW<<1;
|
||||
tmp_win->icon_p_height += JunkBW<<1;
|
||||
/*
|
||||
* Now make the new window the icon window for this window,
|
||||
* and set it up to work as such (select for key presses
|
||||
* and button presses/releases, set up the contexts for it,
|
||||
* and define the cursor for it).
|
||||
*/
|
||||
tmp_win->icon_pixmap_w = tmp_win->wmhints->icon_window;
|
||||
#ifdef SHAPE
|
||||
if (tmp_win->wmhints->flags & IconMaskHint)
|
||||
{
|
||||
tmp_win->flags |= SHAPED_ICON;
|
||||
tmp_win->icon_maskPixmap = tmp_win->wmhints->icon_mask;
|
||||
}
|
||||
#endif
|
||||
/* Make sure that the window is a child of the root window ! */
|
||||
/* Olwais screws this up, maybe others do too! */
|
||||
XReparentWindow(dpy, tmp_win->icon_pixmap_w, Scr.Root, 0,0);
|
||||
tmp_win->flags &= ~ICON_OURS;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Looks for an application supplied bitmap or pixmap
|
||||
*
|
||||
****************************************************************************/
|
||||
void GetIconBitmap(FvwmWindow *tmp_win)
|
||||
{
|
||||
/* We are guaranteed that wmhints is non-null when calling this
|
||||
* routine */
|
||||
XGetGeometry(dpy, tmp_win->wmhints->icon_pixmap, &JunkRoot, &JunkX, &JunkY,
|
||||
(unsigned int *)&tmp_win->icon_p_width,
|
||||
(unsigned int *)&tmp_win->icon_p_height, &JunkBW, &JunkDepth);
|
||||
tmp_win->iconPixmap = tmp_win->wmhints->icon_pixmap;
|
||||
tmp_win->iconDepth = JunkDepth;
|
||||
#ifdef SHAPE
|
||||
if (tmp_win->wmhints->flags & IconMaskHint)
|
||||
{
|
||||
tmp_win->flags |= SHAPED_ICON;
|
||||
tmp_win->icon_maskPixmap = tmp_win->wmhints->icon_mask;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* DeIconify a window
|
||||
*
|
||||
***********************************************************************/
|
||||
void DeIconify(FvwmWindow *tmp_win)
|
||||
{
|
||||
FvwmWindow *t,*tmp;
|
||||
int new_x,new_y,w2,h2;
|
||||
|
||||
/* now de-iconify transients */
|
||||
for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
|
||||
{
|
||||
if ((t == tmp_win)||
|
||||
((t->flags & TRANSIENT) &&(t->transientfor == tmp_win->w)))
|
||||
{
|
||||
t->flags |= MAPPED;
|
||||
if(Scr.Hilite == t)
|
||||
SetBorder (t, False,True,True,None);
|
||||
/* make sure that the window is on this screen */
|
||||
if((t->frame_x < 0)||(t->frame_y<0)||
|
||||
(t->frame_x >= Scr.MyDisplayWidth)||
|
||||
(t->frame_y >= Scr.MyDisplayHeight))
|
||||
|
||||
{
|
||||
/* try to put at least half the window
|
||||
* in the current screen, if the current desktop
|
||||
* is the windows desktop */
|
||||
if(Scr.flags & StubbornIcons)
|
||||
t->Desk = t->DeIconifyDesk;
|
||||
else
|
||||
t->Desk = Scr.CurrentDesk;
|
||||
|
||||
if(t->Desk == Scr.CurrentDesk)
|
||||
{
|
||||
new_x = t->frame_x;
|
||||
new_y = t->frame_y;
|
||||
w2 = (t->frame_width>>1);
|
||||
h2 = (t->frame_height>>1);
|
||||
if(!(Scr.flags & StubbornIcons))
|
||||
{
|
||||
if (( new_x < -w2) || (new_x > (Scr.MyDisplayWidth-w2 )))
|
||||
{
|
||||
new_x = new_x % Scr.MyDisplayWidth;
|
||||
if ( new_x < -w2 )
|
||||
new_x += Scr.MyDisplayWidth;
|
||||
}
|
||||
if ((new_y < -h2) || (new_y > (Scr.MyDisplayHeight-h2 )))
|
||||
{
|
||||
new_y = new_y % Scr.MyDisplayHeight;
|
||||
if ( new_y < -h2 )
|
||||
new_y += Scr.MyDisplayHeight;
|
||||
}
|
||||
}
|
||||
SetupFrame(t,new_x,new_y,
|
||||
t->frame_width,t->frame_height,False);
|
||||
}
|
||||
}
|
||||
XMapWindow(dpy, t->w);
|
||||
if(t->Desk == Scr.CurrentDesk)
|
||||
{
|
||||
XMapWindow(dpy, t->frame);
|
||||
t->flags |= MAP_PENDING;
|
||||
}
|
||||
XMapWindow(dpy, t->Parent);
|
||||
SetMapStateProp(t, NormalState);
|
||||
t->flags &= ~ICONIFIED;
|
||||
t->flags &= ~ICON_UNMAPPED;
|
||||
/* Need to make sure the border is colored correctly,
|
||||
* in case it was stuck or unstuck while iconified. */
|
||||
tmp = Scr.Hilite;
|
||||
Scr.Hilite = t;
|
||||
SetBorder(t,False,True,True,None);
|
||||
Scr.Hilite = tmp;
|
||||
XRaiseWindow(dpy,t->w);
|
||||
if (t->icon_w)
|
||||
XUnmapWindow(dpy, t->icon_w);
|
||||
if (t->icon_pixmap_w)
|
||||
XUnmapWindow(dpy, t->icon_pixmap_w);
|
||||
Broadcast(M_DEICONIFY,3,t->w,t->frame,(unsigned long)t,0,0,0,0);
|
||||
}
|
||||
}
|
||||
RaiseWindow(tmp_win);
|
||||
|
||||
if((Scr.flags & StubbornIcons)||(Scr.flags & ClickToFocus))
|
||||
FocusOn(tmp_win,1);
|
||||
|
||||
KeepOnTop();
|
||||
|
||||
MoveResizePagerView(tmp_win);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Iconifies the selected window
|
||||
*
|
||||
****************************************************************************/
|
||||
void Iconify(FvwmWindow *tmp_win, int def_x, int def_y)
|
||||
{
|
||||
FvwmWindow *t;
|
||||
XWindowAttributes winattrs;
|
||||
unsigned long eventMask;
|
||||
|
||||
XGetWindowAttributes(dpy, tmp_win->w, &winattrs);
|
||||
eventMask = winattrs.your_event_mask;
|
||||
|
||||
if((tmp_win)&&(tmp_win == Scr.Hilite)&&
|
||||
(Scr.flags & ClickToFocus)&&(tmp_win->next))
|
||||
{
|
||||
SetFocus(tmp_win->next->w,tmp_win->next);
|
||||
ClearCirculatedFlag();
|
||||
}
|
||||
|
||||
|
||||
/* iconify transients first */
|
||||
for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
|
||||
{
|
||||
if ((t==tmp_win)||
|
||||
((t->flags & TRANSIENT) && (t->transientfor == tmp_win->w)))
|
||||
{
|
||||
/*
|
||||
* Prevent the receipt of an UnmapNotify, since that would
|
||||
* cause a transition to the Withdrawn state.
|
||||
*/
|
||||
t->flags &= ~MAPPED;
|
||||
XSelectInput(dpy, t->w, eventMask & ~StructureNotifyMask);
|
||||
XUnmapWindow(dpy, t->w);
|
||||
XSelectInput(dpy, t->w, eventMask);
|
||||
XUnmapWindow(dpy, t->frame);
|
||||
t->DeIconifyDesk = t->Desk;
|
||||
if (t->icon_w)
|
||||
XUnmapWindow(dpy, t->icon_w);
|
||||
if (t->icon_pixmap_w)
|
||||
XUnmapWindow(dpy, t->icon_pixmap_w);
|
||||
|
||||
SetMapStateProp(t, IconicState);
|
||||
SetBorder (t, False,False,False,None);
|
||||
if(t != tmp_win)
|
||||
{
|
||||
t->flags |= ICONIFIED|ICON_UNMAPPED;
|
||||
|
||||
Broadcast(M_ICONIFY,7,t->w,t->frame,
|
||||
(unsigned long)t,
|
||||
-10000, -10000,
|
||||
t->icon_w_width,
|
||||
t->icon_w_height+t->icon_p_height);
|
||||
BroadcastConfig(M_CONFIGURE_WINDOW,t);
|
||||
}
|
||||
if(t!= tmp_win)
|
||||
MoveResizePagerView(t);
|
||||
}
|
||||
}
|
||||
if (tmp_win->icon_w == None)
|
||||
if(tmp_win->flags & ICON_MOVED)
|
||||
CreateIconWindow(tmp_win,tmp_win->icon_x_loc,tmp_win->icon_y_loc);
|
||||
else
|
||||
CreateIconWindow(tmp_win, def_x, def_y);
|
||||
|
||||
AutoPlace(tmp_win);
|
||||
tmp_win->flags |= ICONIFIED;
|
||||
tmp_win->flags &= ~ICON_UNMAPPED;
|
||||
Broadcast(M_ICONIFY,7,tmp_win->w,tmp_win->frame,
|
||||
(unsigned long)tmp_win,
|
||||
tmp_win->icon_x_loc,tmp_win->icon_y_loc,
|
||||
tmp_win->icon_w_width,
|
||||
tmp_win->icon_w_height+tmp_win->icon_p_height);
|
||||
BroadcastConfig(M_CONFIGURE_WINDOW,tmp_win);
|
||||
|
||||
LowerWindow(tmp_win);
|
||||
if(tmp_win->Desk == Scr.CurrentDesk)
|
||||
{
|
||||
if (tmp_win->icon_w != None)
|
||||
XMapWindow(dpy, tmp_win->icon_w);
|
||||
|
||||
if(tmp_win->icon_pixmap_w != None)
|
||||
XMapWindow(dpy, tmp_win->icon_pixmap_w);
|
||||
KeepOnTop();
|
||||
MoveResizePagerView(tmp_win);
|
||||
}
|
||||
if((Scr.flags & ClickToFocus)||(Scr.flags & SloppyFocus))
|
||||
{
|
||||
if ((tmp_win)&&(tmp_win == Scr.Focus))
|
||||
{
|
||||
if(Scr.PreviousFocus == Scr.Focus)
|
||||
Scr.PreviousFocus = NULL;
|
||||
if((Scr.flags & ClickToFocus)&&(tmp_win->next))
|
||||
SetFocus(tmp_win->next->w, tmp_win->next);
|
||||
else
|
||||
{
|
||||
SetFocus(Scr.NoFocusWin, NULL);
|
||||
}
|
||||
ClearCirculatedFlag();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
783
fvwm/menus.c
Normal file
783
fvwm/menus.c
Normal file
@ -0,0 +1,783 @@
|
||||
/****************************************************************************
|
||||
* This module is based on Twm, but has been siginificantly modified
|
||||
* by Rob Nation
|
||||
****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/
|
||||
/** Salt Lake City, Utah **/
|
||||
/** Portions Copyright 1989 by the Massachusetts Institute of Technology **/
|
||||
/** Cambridge, Massachusetts **/
|
||||
/** **/
|
||||
/** All Rights Reserved **/
|
||||
/** **/
|
||||
/** Permission to use, copy, modify, and distribute this software and **/
|
||||
/** its documentation for any purpose and without fee is hereby **/
|
||||
/** granted, provided that the above copyright notice appear in all **/
|
||||
/** copies and that both that copyright notice and this permis- **/
|
||||
/** sion notice appear in supporting documentation, and that the **/
|
||||
/** names of Evans & Sutherland and M.I.T. not be used in advertising **/
|
||||
/** in publicity pertaining to distribution of the software without **/
|
||||
/** specific, written prior permission. **/
|
||||
/** **/
|
||||
/** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/
|
||||
/** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/
|
||||
/** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/
|
||||
/** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/
|
||||
/** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
|
||||
/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
|
||||
/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
|
||||
/** OR PERFORMANCE OF THIS SOFTWARE. **/
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* fvwm menu code
|
||||
*
|
||||
***********************************************************************/
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "fvwm.h"
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
|
||||
int menu_on=0;
|
||||
|
||||
MenuRoot *ActiveMenu = NULL; /* the active menu */
|
||||
MenuItem *ActiveItem = NULL; /* the active menu item */
|
||||
|
||||
int menuFromFrameOrWindowOrTitlebar = FALSE;
|
||||
|
||||
extern int Context,Button;
|
||||
extern FvwmWindow *ButtonWindow, *Tmp_win;
|
||||
extern XEvent Event;
|
||||
int Stashed_X, Stashed_Y,MenuY=0;
|
||||
|
||||
void DrawTrianglePattern(Window,GC,GC,GC,int,int,int,int);
|
||||
void DrawSeparator(Window, GC,GC,int, int,int,int,int);
|
||||
void DrawUnderline(Window w, GC gc, int x, int y, char *txt, int off);
|
||||
int UpdateMenu(void);
|
||||
|
||||
extern XContext MenuContext;
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Initiates a menu pop-up
|
||||
*
|
||||
***************************************************************************/
|
||||
int do_menu (MenuRoot *menu)
|
||||
{
|
||||
int prevStashedX=0,prevStashedY=0;
|
||||
MenuRoot *PrevActiveMenu=0;
|
||||
MenuItem *PrevActiveItem=0;
|
||||
int retval=MENU_NOP;
|
||||
int x,y;
|
||||
|
||||
/* this condition could get ugly */
|
||||
if(menu->in_use)
|
||||
return MENU_ERROR;
|
||||
|
||||
/* In case we wind up with a move from a menu which is
|
||||
* from a window border, we'll return to here to start
|
||||
* the move */
|
||||
XQueryPointer( dpy, Scr.Root, &JunkRoot, &JunkChild,
|
||||
&x, &y, &JunkX, &JunkY, &JunkMask);
|
||||
|
||||
if(menu_on)
|
||||
{
|
||||
prevStashedX = Stashed_X;
|
||||
prevStashedY = Stashed_Y;
|
||||
|
||||
PrevActiveMenu = ActiveMenu;
|
||||
PrevActiveItem = ActiveItem;
|
||||
if(ActiveMenu)
|
||||
if(Scr.flags & MWMMenus)
|
||||
x = Stashed_X+ (ActiveMenu->width >> 1) + (menu->width >> 1) - 3;
|
||||
if(ActiveItem)
|
||||
y = ActiveItem->y_offset + MenuY + (Scr.EntryHeight >>1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!GrabEm(MENU))
|
||||
{
|
||||
XBell(dpy,Scr.screen);
|
||||
return MENU_DONE;
|
||||
}
|
||||
if(Scr.flags & MWMMenus)
|
||||
x += (menu->width >> 1) - 3;
|
||||
}
|
||||
if (PopUpMenu (menu, x, y))
|
||||
{
|
||||
retval = UpdateMenu();
|
||||
}
|
||||
else
|
||||
XBell (dpy, Scr.screen);
|
||||
|
||||
ActiveMenu = PrevActiveMenu;
|
||||
ActiveItem = PrevActiveItem;
|
||||
if((ActiveItem)&&(menu_on))
|
||||
ActiveItem->state = 1;
|
||||
Stashed_X = prevStashedX;
|
||||
Stashed_Y = prevStashedY;
|
||||
|
||||
|
||||
if(!menu_on)
|
||||
{
|
||||
UngrabEm();
|
||||
WaitForButtonsUp();
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* RelieveRectangle - add relief lines to a rectangular window
|
||||
*
|
||||
***********************************************************************/
|
||||
void RelieveRectangle(Window win,int x,int y,int w, int h,GC Hilite,GC Shadow)
|
||||
{
|
||||
XDrawLine(dpy, win, Hilite, x, y, w+x-1, y);
|
||||
XDrawLine(dpy, win, Hilite, x, y, x, h+y-1);
|
||||
|
||||
XDrawLine(dpy, win, Shadow, x, h+y-1, w+x-1, h+y-1);
|
||||
XDrawLine(dpy, win, Shadow, w+x-1, y, w+x-1, h+y-1);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* RelieveHalfRectangle - add relief lines to the sides only of a
|
||||
* rectangular window
|
||||
*
|
||||
***********************************************************************/
|
||||
void RelieveHalfRectangle(Window win,int x,int y,int w,int h,
|
||||
GC Hilite,GC Shadow)
|
||||
{
|
||||
XDrawLine(dpy, win, Hilite, x, y-1, x, h+y);
|
||||
XDrawLine(dpy, win, Hilite, x+1, y, x+1, h+y-1);
|
||||
|
||||
XDrawLine(dpy, win, Shadow, w+x-1, y-1, w+x-1, h+y);
|
||||
XDrawLine(dpy, win, Shadow, w+x-2, y, w+x-2, h+y-1);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* PaintEntry - draws a single entry in a poped up menu
|
||||
*
|
||||
***********************************************************************/
|
||||
void PaintEntry(MenuRoot *mr, MenuItem *mi)
|
||||
{
|
||||
int y_offset,text_y,d, y_height;
|
||||
GC ShadowGC, ReliefGC, currentGC;
|
||||
|
||||
y_offset = mi->y_offset;
|
||||
y_height = mi->y_height;
|
||||
text_y = y_offset + Scr.StdFont.y;
|
||||
|
||||
ShadowGC = Scr.MenuShadowGC;
|
||||
if(Scr.d_depth<2)
|
||||
ReliefGC = Scr.MenuShadowGC;
|
||||
else
|
||||
ReliefGC = Scr.MenuReliefGC;
|
||||
|
||||
|
||||
if(Scr.flags & MWMMenus)
|
||||
{
|
||||
if((!mi->prev)||(!mi->prev->state))
|
||||
XClearArea(dpy, mr->w, 0,y_offset-1,mr->width,y_height+2,0);
|
||||
else
|
||||
XClearArea(dpy, mr->w, 0,y_offset+1,mr->width,y_height-1,0);
|
||||
if ((mi->state)&&(mi->func != F_TITLE)&&(mi->func != F_NOP)&&*mi->item)
|
||||
{
|
||||
RelieveRectangle(mr->w, 3, y_offset, mr->width-5, mi->y_height,
|
||||
ReliefGC,ShadowGC);
|
||||
RelieveRectangle(mr->w, 2, y_offset-1, mr->width-3, mi->y_height+2,
|
||||
ReliefGC,ShadowGC);
|
||||
}
|
||||
RelieveHalfRectangle(mr->w, 0, y_offset-1, mr->width,
|
||||
y_height+2, ReliefGC, ShadowGC);
|
||||
}
|
||||
else
|
||||
{
|
||||
XClearArea(dpy, mr->w, 0,y_offset,mr->width,y_height,0);
|
||||
if ((mi->state)&&(mi->func != F_TITLE)&&(mi->func != F_NOP)&&*mi->item)
|
||||
RelieveRectangle(mr->w, 2, y_offset, mr->width-4, mi->y_height,
|
||||
ReliefGC,ShadowGC);
|
||||
RelieveHalfRectangle(mr->w, 0, y_offset, mr->width,
|
||||
y_height, ReliefGC, ShadowGC);
|
||||
}
|
||||
if(mi->func == F_TITLE)
|
||||
{
|
||||
if(Scr.flags & MWMMenus)
|
||||
{
|
||||
text_y += HEIGHT_EXTRA>>1;
|
||||
XDrawLine(dpy, mr->w, ShadowGC, 2, y_offset+y_height-2,
|
||||
mr->width-3, y_offset+y_height-2);
|
||||
XDrawLine(dpy, mr->w, ShadowGC, 2, y_offset+y_height-4,
|
||||
mr->width-3, y_offset+y_height-4);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mi->next != NULL)
|
||||
{
|
||||
DrawSeparator(mr->w,ShadowGC,ReliefGC,5, y_offset+y_height-3,
|
||||
mr->width-6, y_offset+y_height-3,1);
|
||||
}
|
||||
if(mi != mr->first)
|
||||
{
|
||||
text_y += HEIGHT_EXTRA_TITLE>>1;
|
||||
DrawSeparator(mr->w,ShadowGC,ReliefGC,5, y_offset+1,
|
||||
mr->width-6, y_offset+1,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
text_y += HEIGHT_EXTRA>>1;
|
||||
if(mi->func == F_NOP && *mi->item==0)
|
||||
{
|
||||
if(Scr.flags & MWMMenus)
|
||||
DrawSeparator(mr->w,ShadowGC,ReliefGC,2,y_offset-1+HEIGHT_SEPARATOR/2,
|
||||
mr->width-3,y_offset-1+HEIGHT_SEPARATOR/2,0);
|
||||
else
|
||||
DrawSeparator(mr->w,ShadowGC,ReliefGC,5,y_offset-1+HEIGHT_SEPARATOR/2,
|
||||
mr->width-6,y_offset-1+HEIGHT_SEPARATOR/2,1);
|
||||
}
|
||||
if(mi->next == NULL)
|
||||
DrawSeparator(mr->w,ShadowGC,ShadowGC,1,mr->height-2,
|
||||
mr->width-2, mr->height-2,1);
|
||||
if(mi == mr->first)
|
||||
DrawSeparator(mr->w,ReliefGC,ReliefGC,0,0, mr->width-1,0,-1);
|
||||
|
||||
if(check_allowed_function(mi))
|
||||
currentGC = Scr.MenuGC;
|
||||
else
|
||||
/* should be a shaded out word, no just re-colored. */
|
||||
currentGC = Scr.MenuStippleGC;
|
||||
|
||||
if(*mi->item)
|
||||
XDrawString(dpy, mr->w, currentGC,mi->x,text_y, mi->item, mi->strlen);
|
||||
if(mi->strlen2>0)
|
||||
XDrawString(dpy, mr->w, currentGC,mi->x2,text_y, mi->item2,mi->strlen2);
|
||||
|
||||
/* pete@tecc.co.uk: If the item has a hot key, underline it */
|
||||
if (mi->hotkey > 0)
|
||||
DrawUnderline(mr->w, currentGC,mi->x,text_y,mi->item,mi->hotkey - 1);
|
||||
if (mi->hotkey < 0)
|
||||
DrawUnderline(mr->w, currentGC,mi->x2,text_y,mi->item2, -1 - mi->hotkey);
|
||||
|
||||
d=(Scr.EntryHeight-7)/2;
|
||||
if(mi->func == F_POPUP)
|
||||
if(mi->state)
|
||||
DrawTrianglePattern(mr->w, ShadowGC, ReliefGC, ShadowGC,mr->width-d-8,
|
||||
y_offset+d-1, mr->width-d-1, y_offset+d+7);
|
||||
else
|
||||
DrawTrianglePattern(mr->w, ReliefGC, ShadowGC, ReliefGC,mr->width-d-8,
|
||||
y_offset+d-1, mr->width-d-1, y_offset+d+7);
|
||||
return;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Procedure:
|
||||
* DrawUnderline() - Underline a character in a string (pete@tecc.co.uk)
|
||||
*
|
||||
* Calculate the pixel offsets to the start of the character position we
|
||||
* want to underline and to the next character in the string. Shrink by
|
||||
* one pixel from each end and the draw a line that long two pixels below
|
||||
* the character...
|
||||
*
|
||||
****************************************************************************/
|
||||
void DrawUnderline(Window w, GC gc, int x, int y, char *txt, int posn)
|
||||
{
|
||||
int off1 = XTextWidth(Scr.StdFont.font, txt, posn);
|
||||
int off2 = XTextWidth(Scr.StdFont.font, txt, posn + 1) - 1;
|
||||
|
||||
XDrawLine(dpy, w, gc, x + off1, y + 2, x + off2, y + 2);
|
||||
}
|
||||
/****************************************************************************
|
||||
*
|
||||
* Draws two horizontal lines to form a separator
|
||||
*
|
||||
****************************************************************************/
|
||||
void DrawSeparator(Window w, GC TopGC, GC BottomGC,int x1,int y1,int x2,int y2,
|
||||
int extra_off)
|
||||
{
|
||||
XDrawLine(dpy, w, TopGC , x1, y1, x2, y2);
|
||||
XDrawLine(dpy, w, BottomGC, x1-extra_off, y1+1,x2+extra_off,y2+1);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Draws a little Triangle pattern within a window
|
||||
*
|
||||
****************************************************************************/
|
||||
void DrawTrianglePattern(Window w,GC GC1,GC GC2,GC GC3,int l,int u,int r,int b)
|
||||
{
|
||||
int m;
|
||||
|
||||
m = (u + b)/2;
|
||||
|
||||
XDrawLine(dpy,w,GC1,l,u,l,b);
|
||||
|
||||
XDrawLine(dpy,w,GC2,l,b,r,m);
|
||||
XDrawLine(dpy,w,GC3,r,m,l,u);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* PaintMenu - draws the entire menu
|
||||
*
|
||||
***********************************************************************/
|
||||
void PaintMenu(MenuRoot *mr, XEvent *e)
|
||||
{
|
||||
MenuItem *mi;
|
||||
|
||||
for (mi = mr->first; mi != NULL; mi = mi->next)
|
||||
{
|
||||
/* be smart about handling the expose, redraw only the entries
|
||||
* that we need to
|
||||
*/
|
||||
if (e->xexpose.y < (mi->y_offset + mi->y_height) &&
|
||||
(e->xexpose.y + e->xexpose.height) > mi->y_offset)
|
||||
{
|
||||
PaintEntry(mr, mi);
|
||||
}
|
||||
}
|
||||
XSync(dpy, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
MenuRoot *PrevMenu = NULL;
|
||||
MenuItem *PrevItem = NULL;
|
||||
int PrevY=0;
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* Updates menu display to reflect the highlighted item
|
||||
*
|
||||
***********************************************************************/
|
||||
int FindEntry(void)
|
||||
{
|
||||
MenuItem *mi;
|
||||
MenuRoot *actual_mr;
|
||||
int retval = MENU_NOP;
|
||||
MenuRoot *PrevPrevMenu;
|
||||
MenuItem *PrevPrevItem;
|
||||
int PrevPrevY;
|
||||
int x, y, ChildY;
|
||||
Window Child;
|
||||
|
||||
XQueryPointer( dpy, Scr.Root, &JunkRoot, &Child,
|
||||
&JunkX,&ChildY, &x, &y, &JunkMask);
|
||||
XQueryPointer( dpy, ActiveMenu->w, &JunkRoot, &JunkChild,
|
||||
&JunkX, &ChildY, &x, &y, &JunkMask);
|
||||
|
||||
/* look for the entry that the mouse is in */
|
||||
for(mi=ActiveMenu->first; mi; mi=mi->next)
|
||||
if(y>=mi->y_offset && y<mi->y_offset+mi->y_height)
|
||||
break;
|
||||
if(x<0 || x>ActiveMenu->width)
|
||||
mi = NULL;
|
||||
|
||||
|
||||
/* if we weren't on the active entry, let's turn the old active one off */
|
||||
if ((ActiveItem)&&(mi!=ActiveItem))
|
||||
{
|
||||
ActiveItem->state = 0;
|
||||
PaintEntry(ActiveMenu, ActiveItem);
|
||||
}
|
||||
/* if we weren't on the active item, change the active item and turn it on */
|
||||
if ((mi!=ActiveItem)&&(mi != NULL))
|
||||
{
|
||||
mi->state = 1;
|
||||
PaintEntry(ActiveMenu, mi);
|
||||
}
|
||||
ActiveItem = mi;
|
||||
|
||||
if(ActiveItem)
|
||||
{
|
||||
/* create a new sub-menu */
|
||||
if((ActiveItem->func == F_POPUP)&&
|
||||
((Scr.flags & MWMMenus)||(x>(3*ActiveMenu->width>>2))))
|
||||
{
|
||||
PrevPrevMenu = PrevMenu;
|
||||
PrevPrevItem = PrevItem;
|
||||
PrevPrevY = PrevY;
|
||||
PrevY = MenuY;
|
||||
PrevMenu = ActiveMenu;
|
||||
PrevItem = ActiveItem;
|
||||
retval = do_menu(ActiveItem->menu);
|
||||
/* Unfortunately, this is needed (why?) for multi-screen operation */
|
||||
flush_expose(ActiveMenu->w);
|
||||
for (mi = ActiveMenu->first; mi != NULL; mi = mi->next)
|
||||
{
|
||||
PaintEntry(ActiveMenu, mi);
|
||||
}
|
||||
XSync(dpy, 0);
|
||||
MenuY = PrevY;
|
||||
PrevMenu = PrevPrevMenu;
|
||||
PrevItem = PrevPrevItem;
|
||||
PrevY = PrevPrevY;
|
||||
}
|
||||
}
|
||||
/* end a sub-menu */
|
||||
if (XFindContext (dpy, Child,MenuContext,(caddr_t *)&actual_mr)==XCNOENT)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
if(actual_mr != ActiveMenu)
|
||||
{
|
||||
if(actual_mr == PrevMenu)
|
||||
{
|
||||
if((PrevItem->y_offset + PrevY > ChildY)||
|
||||
((PrevItem->y_offset+PrevItem->y_height + PrevY) < ChildY))
|
||||
{
|
||||
return SUBMENU_DONE;
|
||||
}
|
||||
}
|
||||
else
|
||||
return SUBMENU_DONE;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* Procedure
|
||||
* menuShortcuts() - Menu keyboard processing (pete@tecc.co.uk)
|
||||
*
|
||||
* Function called from UpdateMenu instead of Keyboard_Shortcuts()
|
||||
* when a KeyPress event is received. If the key is alphanumeric,
|
||||
* then the menu is scanned for a matching hot key. Otherwise if
|
||||
* it was the escape key then the menu processing is aborted.
|
||||
* If none of these conditions are true, then the default processing
|
||||
* routine is called.
|
||||
***********************************************************************/
|
||||
void menuShortcuts(XEvent *ev)
|
||||
{
|
||||
MenuItem *mi;
|
||||
KeySym keysym = XLookupKeysym(&ev->xkey,0);
|
||||
|
||||
/* Try to match hot keys */
|
||||
if (((keysym >= XK_a) && (keysym <= XK_z)) || /* Only consider alphabetic */
|
||||
((keysym >= XK_0) && (keysym <= XK_9))) /* ...or numeric keys */
|
||||
{
|
||||
/* Search menu for matching hotkey */
|
||||
for (mi = ActiveMenu->first; mi; mi = mi->next)
|
||||
{
|
||||
char key;
|
||||
if (mi->hotkey == 0) continue; /* Item has no hotkey */
|
||||
key = (mi->hotkey > 0) ? /* Extract hot character */
|
||||
mi->item[mi->hotkey - 1] : mi->item2[-1 - mi->hotkey];
|
||||
|
||||
/* Convert to lower case to match the keysym */
|
||||
if (isupper(key)) key = tolower(key);
|
||||
|
||||
if (keysym == key)
|
||||
{ /* Are they equal? */
|
||||
ActiveItem = mi; /* Yes: Make this the active item */
|
||||
ev->type = ButtonRelease; /* Force a menu exit */
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch(keysym) /* Other special keyboard handling */
|
||||
{
|
||||
case XK_Escape: /* Escape key pressed. Abort */
|
||||
ActiveItem = NULL; /* No selection */
|
||||
ev->type = ButtonRelease; /* Make the menu exit */
|
||||
break;
|
||||
|
||||
/* Nothing special --- Allow other shortcuts (cursor movement) */
|
||||
default:
|
||||
Keyboard_shortcuts(ev,ButtonRelease);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* Updates menu display to reflect the highlighted item
|
||||
*
|
||||
* Returns:
|
||||
* 0 on error condition
|
||||
* 1 on return from submenu to parent menu
|
||||
* 2 on button release return
|
||||
*
|
||||
***********************************************************************/
|
||||
int UpdateMenu(void)
|
||||
{
|
||||
int done,func;
|
||||
int retval;
|
||||
MenuRoot *actual_mr;
|
||||
|
||||
FindEntry();
|
||||
while (TRUE)
|
||||
{
|
||||
/* block until there is an event */
|
||||
XMaskEvent(dpy, ButtonPressMask|ButtonReleaseMask|ExposureMask |
|
||||
KeyPressMask|VisibilityChangeMask|ButtonMotionMask, &Event);
|
||||
StashEventTime(&Event);
|
||||
done = 0;
|
||||
if (Event.type == MotionNotify)
|
||||
{
|
||||
/* discard any extra motion events before a release */
|
||||
while((XCheckMaskEvent(dpy,ButtonMotionMask|ButtonReleaseMask,
|
||||
&Event))&&(Event.type != ButtonRelease));
|
||||
}
|
||||
/* Handle a limited number of key press events to allow mouseless
|
||||
* operation */
|
||||
if(Event.type == KeyPress)
|
||||
menuShortcuts(&Event);
|
||||
|
||||
switch(Event.type)
|
||||
{
|
||||
case ButtonRelease:
|
||||
/* The following lines holds the menu when the button is released */
|
||||
if ((Scr.flags & MWMMenus) && !ActiveItem && (menu_on > 1))
|
||||
{
|
||||
int x,y;
|
||||
XQueryPointer( dpy, Scr.Root, &JunkRoot, &JunkChild,
|
||||
&JunkX, &JunkY, &x, &y, &JunkMask);
|
||||
if((XFindContext(dpy, JunkChild,MenuContext,
|
||||
(caddr_t *)&actual_mr)!=XCNOENT)&&
|
||||
(actual_mr != ActiveMenu))
|
||||
{
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
PopDownMenu();
|
||||
if(ActiveItem)
|
||||
{
|
||||
func = ActiveItem->func;
|
||||
done = 1;
|
||||
if(ButtonWindow)
|
||||
{
|
||||
ExecuteFunction(func, ActiveItem->action,
|
||||
ButtonWindow->frame,
|
||||
ButtonWindow, &Event, Context,
|
||||
ActiveItem->val1,ActiveItem->val2,
|
||||
ActiveItem->val1_unit,ActiveItem->val2_unit,
|
||||
ActiveItem->menu,-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ExecuteFunction(func,ActiveItem->action,
|
||||
None,None, &Event,
|
||||
Context,ActiveItem->val1,
|
||||
ActiveItem->val2,
|
||||
ActiveItem->val1_unit,ActiveItem->val2_unit,
|
||||
ActiveItem->menu,-1);
|
||||
|
||||
}
|
||||
}
|
||||
ActiveItem = NULL;
|
||||
ActiveMenu = NULL;
|
||||
menuFromFrameOrWindowOrTitlebar = FALSE;
|
||||
return MENU_DONE;
|
||||
|
||||
case KeyPress:
|
||||
case VisibilityNotify:
|
||||
case ButtonPress:
|
||||
done=1;
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
done = 1;
|
||||
|
||||
retval = FindEntry();
|
||||
if((retval == MENU_DONE)||(retval == SUBMENU_DONE))
|
||||
{
|
||||
PopDownMenu();
|
||||
ActiveItem = NULL;
|
||||
ActiveMenu = NULL;
|
||||
menuFromFrameOrWindowOrTitlebar = FALSE;
|
||||
}
|
||||
|
||||
if(retval == MENU_DONE)
|
||||
return MENU_DONE;
|
||||
else if (retval == SUBMENU_DONE)
|
||||
return MENU_NOP;
|
||||
|
||||
break;
|
||||
|
||||
case Expose:
|
||||
/* grab our expose events, let the rest go through */
|
||||
if((XFindContext(dpy, Event.xany.window,MenuContext,
|
||||
(caddr_t *)&actual_mr)!=XCNOENT))
|
||||
{
|
||||
PaintMenu(actual_mr,&Event);
|
||||
done = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(!done)DispatchEvent();
|
||||
XFlush(dpy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* PopUpMenu - pop up a pull down menu
|
||||
*
|
||||
* Inputs:
|
||||
* menu - the root pointer of the menu to pop up
|
||||
* x, y - location of upper left of menu
|
||||
* center - whether or not to center horizontally over position
|
||||
*
|
||||
***********************************************************************/
|
||||
Bool PopUpMenu (MenuRoot *menu, int x, int y)
|
||||
{
|
||||
|
||||
if ((!menu)||(menu->w == None)||(menu->items == 0)||(menu->in_use))
|
||||
return False;
|
||||
|
||||
menu_on++;
|
||||
InstallRootColormap();
|
||||
|
||||
Stashed_X = x;
|
||||
Stashed_Y = y;
|
||||
|
||||
/* pop up the menu */
|
||||
ActiveMenu = menu;
|
||||
ActiveItem = NULL;
|
||||
|
||||
x -= (menu->width >> 1);
|
||||
y -= (Scr.EntryHeight >> 1);
|
||||
|
||||
if((Tmp_win)&&(menu_on == 1)&&(Context&C_LALL))
|
||||
{
|
||||
y = Tmp_win->frame_y+Tmp_win->boundary_width+Tmp_win->title_height+1;
|
||||
x = Tmp_win->frame_x + Tmp_win->boundary_width +
|
||||
Button*Tmp_win->title_height+1;
|
||||
}
|
||||
if((Tmp_win)&&(menu_on==1)&&(Context&C_RALL))
|
||||
{
|
||||
y = Tmp_win->frame_y+Tmp_win->boundary_width+Tmp_win->title_height+1;
|
||||
x = Tmp_win->frame_x +Tmp_win->frame_width - Tmp_win->boundary_width-
|
||||
Button*Tmp_win->title_height - menu->width+1;
|
||||
}
|
||||
if((Tmp_win)&&(menu_on==1)&&(Context&C_TITLE))
|
||||
{
|
||||
y = Tmp_win->frame_y+Tmp_win->boundary_width+Tmp_win->title_height+1;
|
||||
if(x < Tmp_win->frame_x + Tmp_win->title_x)
|
||||
x = Tmp_win->frame_x + Tmp_win->title_x;
|
||||
if((x + menu->width) >
|
||||
(Tmp_win->frame_x + Tmp_win->title_x +Tmp_win->title_width))
|
||||
x = Tmp_win->frame_x + Tmp_win->title_x +Tmp_win->title_width-
|
||||
menu->width +1;
|
||||
}
|
||||
|
||||
/* clip to screen */
|
||||
if (x + menu->width > Scr.MyDisplayWidth-2)
|
||||
x = Scr.MyDisplayWidth - menu->width-2;
|
||||
if (x < 0) x = 0;
|
||||
|
||||
if (y + menu->height > Scr.MyDisplayHeight-2)
|
||||
{
|
||||
y = Scr.MyDisplayHeight - menu->height-2;
|
||||
/* Warp pointer to middle of top line */
|
||||
/* Not with MWMMenus! */
|
||||
if((!(Scr.flags & MWMMenus))||(menu_on < 2))
|
||||
XWarpPointer(dpy, Scr.Root, Scr.Root, 0, 0, Scr.MyDisplayWidth,
|
||||
Scr.MyDisplayHeight,
|
||||
x + (menu->width>>1), (y + (Scr.EntryHeight >> 1)));
|
||||
}
|
||||
if (y < 0) y = 0;
|
||||
|
||||
MenuY = y;
|
||||
XMoveWindow(dpy, menu->w, x, y);
|
||||
XMapRaised(dpy, menu->w);
|
||||
menu->in_use = True;
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* PopDownMenu - unhighlight the current menu selection and
|
||||
* take down the menus
|
||||
*
|
||||
***********************************************************************/
|
||||
void PopDownMenu()
|
||||
{
|
||||
if (ActiveMenu == NULL)
|
||||
return;
|
||||
|
||||
menu_on--;
|
||||
if (ActiveItem)
|
||||
ActiveItem->state = 0;
|
||||
|
||||
XUnmapWindow(dpy, ActiveMenu->w);
|
||||
|
||||
UninstallRootColormap();
|
||||
XFlush(dpy);
|
||||
if (Context & (C_WINDOW | C_FRAME | C_TITLE | C_SIDEBAR))
|
||||
menuFromFrameOrWindowOrTitlebar = TRUE;
|
||||
else
|
||||
menuFromFrameOrWindowOrTitlebar = FALSE;
|
||||
ActiveMenu->in_use = FALSE;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Wait for all mouse buttons to be released
|
||||
* This can ease some confusion on the part of the user sometimes
|
||||
*
|
||||
* Discard superflous button events during this wait period.
|
||||
*
|
||||
***************************************************************************/
|
||||
void WaitForButtonsUp()
|
||||
{
|
||||
Bool AllUp = False;
|
||||
XEvent JunkEvent;
|
||||
unsigned int mask;
|
||||
|
||||
while(!AllUp)
|
||||
{
|
||||
XAllowEvents(dpy,ReplayPointer,CurrentTime);
|
||||
XQueryPointer( dpy, Scr.Root, &JunkRoot, &JunkChild,
|
||||
&JunkX, &JunkY, &JunkX, &JunkY, &mask);
|
||||
|
||||
if((mask&
|
||||
(Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask))==0)
|
||||
AllUp = True;
|
||||
}
|
||||
XSync(dpy,0);
|
||||
while(XCheckMaskEvent(dpy,
|
||||
ButtonPressMask|ButtonReleaseMask|ButtonMotionMask,
|
||||
&JunkEvent))
|
||||
{
|
||||
StashEventTime (&JunkEvent);
|
||||
XAllowEvents(dpy,ReplayPointer,CurrentTime);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
144
fvwm/menus.h
Normal file
144
fvwm/menus.h
Normal file
@ -0,0 +1,144 @@
|
||||
/****************************************************************************
|
||||
* This module is based on Twm, but has been siginificantly modified
|
||||
* by Rob Nation
|
||||
****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/
|
||||
/** Salt Lake City, Utah **/
|
||||
/** Portions Copyright 1989 by the Massachusetts Institute of Technology **/
|
||||
/** Cambridge, Massachusetts **/
|
||||
/** **/
|
||||
/** All Rights Reserved **/
|
||||
/** **/
|
||||
/** Permission to use, copy, modify, and distribute this software and **/
|
||||
/** its documentation for any purpose and without fee is hereby **/
|
||||
/** granted, provided that the above copyright notice appear in all **/
|
||||
/** copies and that both that copyright notice and this permis- **/
|
||||
/** sion notice appear in supporting documentation, and that the **/
|
||||
/** names of Evans & Sutherland and M.I.T. not be used in advertising **/
|
||||
/** in publicity pertaining to distribution of the software without **/
|
||||
/** specific, written prior permission. **/
|
||||
/** **/
|
||||
/** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/
|
||||
/** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/
|
||||
/** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/
|
||||
/** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/
|
||||
/** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
|
||||
/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
|
||||
/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
|
||||
/** OR PERFORMANCE OF THIS SOFTWARE. **/
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* $XConsortium: menus.h,v 1.24 89/12/10 17:46:26 jim Exp $
|
||||
*
|
||||
* twm menus include file
|
||||
*
|
||||
* 17-Nov-87 Thomas E. LaStrange File created
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef _MENUS_
|
||||
#define _MENUS_
|
||||
|
||||
#define MAX_FILE_SIZE 4096 /* max chars to read from file for cut */
|
||||
#define MAXPOPUPS 50
|
||||
|
||||
|
||||
typedef struct MenuItem
|
||||
{
|
||||
struct MenuItem *next; /* next menu item */
|
||||
struct MenuItem *prev; /* prev menu item */
|
||||
char *item; /* the character string displayed on left*/
|
||||
char *item2; /* the character string displayed on right*/
|
||||
char *action; /* action to be performed */
|
||||
short item_num; /* item number of this menu */
|
||||
short x; /* x coordinate for text (item) */
|
||||
short x2; /* x coordinate for text (item2) */
|
||||
short y_offset; /* y coordinate for item */
|
||||
short y_height; /* y height for item */
|
||||
short func; /* twm built in function */
|
||||
long val1; /* values needed for F_SCROLL */
|
||||
long val2;
|
||||
long val1_unit; /* units for val1, val2 */
|
||||
long val2_unit; /* pixels (unit=1) or percent of screen
|
||||
* (unit = Scr.MyDisplayWidth/Height */
|
||||
short state; /* video state, 0 = normal, 1 = reversed */
|
||||
short strlen; /* strlen(item) */
|
||||
short strlen2; /* strlen(item2) */
|
||||
short hotkey; /* Hot key offset (pete@tecc.co.uk).
|
||||
0 - No hot key
|
||||
+ve - offset to hot key char in item
|
||||
-ve - offset to hot key char in item2
|
||||
(offsets have 1 added, so +1 or -1
|
||||
refer to the *first* character)
|
||||
*/
|
||||
struct MenuRoot *menu; /* sub-menu */
|
||||
} MenuItem;
|
||||
|
||||
typedef struct MenuRoot
|
||||
{
|
||||
struct MenuItem *first; /* first item in menu */
|
||||
struct MenuItem *last; /* last item in menu */
|
||||
struct MenuRoot *next; /* next in list of root menus */
|
||||
char *name; /* name of root */
|
||||
Window w; /* the window of the menu */
|
||||
short height; /* height of the menu */
|
||||
short width; /* width of the menu for 1st col */
|
||||
short width2; /* width of the menu for 2nd col */
|
||||
short items; /* number of items in the menu */
|
||||
Bool in_use;
|
||||
} MenuRoot;
|
||||
|
||||
typedef struct MouseButton
|
||||
{
|
||||
int func; /* the function number */
|
||||
MenuRoot *menu; /* menu if func is F_POPUP */
|
||||
MenuItem *item; /* action to perform if func != F_POPUP */
|
||||
int Button;
|
||||
int Context;
|
||||
int Modifier;
|
||||
int val1;
|
||||
int val2;
|
||||
long val1_unit; /* units for val1, val2 */
|
||||
long val2_unit; /* pixels (unit=1) or percent of screen
|
||||
* (unit = Scr.MyDisplayWidth/Height */
|
||||
struct MouseButton *NextButton;
|
||||
} MouseButton;
|
||||
|
||||
typedef struct FuncKey
|
||||
{
|
||||
struct FuncKey *next; /* next in the list of function keys */
|
||||
char *name; /* key name */
|
||||
KeyCode keycode; /* X keycode */
|
||||
int cont; /* context */
|
||||
int mods; /* modifiers */
|
||||
int func; /* function to perform */
|
||||
int val1; /* values needed for F_SCROLL */
|
||||
int val2;
|
||||
long val1_unit; /* units for val1, val2 */
|
||||
long val2_unit; /* pixels (unit=1) or percent of screen */
|
||||
MenuRoot *menu; /* menu if func is F_POPUP */
|
||||
char *action; /* action string (if any) */
|
||||
} FuncKey;
|
||||
|
||||
#define MENU_ERROR -1
|
||||
#define MENU_NOP 0
|
||||
#define MENU_DONE 1
|
||||
#define SUBMENU_DONE 2
|
||||
|
||||
|
||||
/* Types of events for the FUNCTION builtin */
|
||||
#define MOTION 'm'
|
||||
#define IMMEDIATE 'i'
|
||||
#define CLICK 'c'
|
||||
#define DOUBLE_CLICK 'd'
|
||||
#define ONE_AND_A_HALF_CLICKS 'o'
|
||||
|
||||
extern MenuRoot *ActiveMenu;
|
||||
extern MenuItem *ActiveItem;
|
||||
|
||||
|
||||
#endif /* _MENUS_ */
|
445
fvwm/misc.c
Normal file
445
fvwm/misc.c
Normal file
@ -0,0 +1,445 @@
|
||||
/****************************************************************************
|
||||
* This module is based on Twm, but has been siginificantly modified
|
||||
* by Rob Nation
|
||||
****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/
|
||||
/** Salt Lake City, Utah **/
|
||||
/** Portions Copyright 1989 by the Massachusetts Institute of Technology **/
|
||||
/** Cambridge, Massachusetts **/
|
||||
/** **/
|
||||
/** All Rights Reserved **/
|
||||
/** **/
|
||||
/** Permission to use, copy, modify, and distribute this software and **/
|
||||
/** its documentation for any purpose and without fee is hereby **/
|
||||
/** granted, provided that the above copyright notice appear in all **/
|
||||
/** copies and that both that copyright notice and this permis- **/
|
||||
/** sion notice appear in supporting documentation, and that the **/
|
||||
/** names of Evans & Sutherland and M.I.T. not be used in advertising **/
|
||||
/** in publicity pertaining to distribution of the software without **/
|
||||
/** specific, written prior permission. **/
|
||||
/** **/
|
||||
/** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/
|
||||
/** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/
|
||||
/** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/
|
||||
/** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/
|
||||
/** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
|
||||
/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
|
||||
/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
|
||||
/** OR PERFORMANCE OF THIS SOFTWARE. **/
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Assorted odds and ends
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "fvwm.h"
|
||||
#include <X11/Xatom.h>
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
#include "module.h"
|
||||
|
||||
XGCValues Globalgcv;
|
||||
unsigned long Globalgcm;
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Releases dynamically allocated space used to store window/icon names
|
||||
*
|
||||
**************************************************************************/
|
||||
void free_window_names (FvwmWindow *tmp, Bool nukename, Bool nukeicon)
|
||||
{
|
||||
if (!tmp)
|
||||
return;
|
||||
|
||||
if (nukename && nukeicon)
|
||||
{
|
||||
if (tmp->name == tmp->icon_name)
|
||||
{
|
||||
if (tmp->name != NoName)
|
||||
XFree (tmp->name);
|
||||
tmp->name = NULL;
|
||||
tmp->icon_name = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tmp->name != NoName)
|
||||
XFree (tmp->name);
|
||||
tmp->name = NULL;
|
||||
if (tmp->icon_name != NoName)
|
||||
XFree (tmp->icon_name);
|
||||
tmp->icon_name = NULL;
|
||||
}
|
||||
}
|
||||
else if (nukename)
|
||||
{
|
||||
if (tmp->name != tmp->icon_name && tmp->name != NoName)
|
||||
XFree (tmp->name);
|
||||
tmp->name = NULL;
|
||||
}
|
||||
else
|
||||
{ /* if (nukeicon) */
|
||||
if (tmp->icon_name != tmp->name && tmp->icon_name != NoName)
|
||||
XFree (tmp->icon_name);
|
||||
tmp->icon_name = NULL;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Handles destruction of a window
|
||||
*
|
||||
****************************************************************************/
|
||||
void Destroy(FvwmWindow *Tmp_win)
|
||||
{
|
||||
int i;
|
||||
extern FvwmWindow *ButtonWindow;
|
||||
extern FvwmWindow *colormap_win;
|
||||
/*
|
||||
* Warning, this is also called by HandleUnmapNotify; if it ever needs to
|
||||
* look at the event, HandleUnmapNotify will have to mash the UnmapNotify
|
||||
* into a DestroyNotify.
|
||||
*/
|
||||
if(!Tmp_win)
|
||||
return;
|
||||
|
||||
XUnmapWindow(dpy, Tmp_win->frame);
|
||||
XSync(dpy,0);
|
||||
|
||||
if(Tmp_win == Scr.Hilite)
|
||||
Scr.Hilite = NULL;
|
||||
|
||||
Broadcast(M_DESTROY_WINDOW,3,Tmp_win->w,Tmp_win->frame,
|
||||
(unsigned long)Tmp_win,0,0,0,0);
|
||||
|
||||
if(Scr.PreviousFocus == Tmp_win)
|
||||
Scr.PreviousFocus = NULL;
|
||||
|
||||
if(ButtonWindow == Tmp_win)
|
||||
ButtonWindow = NULL;
|
||||
|
||||
if((Tmp_win == Scr.Focus)&&(Scr.flags & ClickToFocus))
|
||||
{
|
||||
if(Tmp_win->next)
|
||||
SetFocus(Tmp_win->next->w, Tmp_win->next);
|
||||
else
|
||||
SetFocus(Scr.NoFocusWin, NULL);
|
||||
}
|
||||
|
||||
if(Scr.Focus == Tmp_win)
|
||||
SetFocus(Scr.NoFocusWin, NULL);
|
||||
|
||||
ClearCirculatedFlag();
|
||||
|
||||
if(Tmp_win == Scr.pushed_window)
|
||||
Scr.pushed_window = NULL;
|
||||
|
||||
if(Tmp_win == colormap_win)
|
||||
colormap_win = NULL;
|
||||
|
||||
XDestroyWindow(dpy, Tmp_win->frame);
|
||||
XDeleteContext(dpy, Tmp_win->frame, FvwmContext);
|
||||
|
||||
XDestroyWindow(dpy, Tmp_win->Parent);
|
||||
|
||||
XDeleteContext(dpy, Tmp_win->Parent, FvwmContext);
|
||||
|
||||
XDeleteContext(dpy, Tmp_win->w, FvwmContext);
|
||||
|
||||
if ((Tmp_win->icon_w)&&(Tmp_win->flags & PIXMAP_OURS))
|
||||
XFreePixmap(dpy, Tmp_win->iconPixmap);
|
||||
|
||||
|
||||
#ifndef NO_PAGER
|
||||
if ((Scr.Pager_w)&& !(Tmp_win->flags & STICKY))
|
||||
XDestroyWindow(dpy, Tmp_win->pager_view);
|
||||
#endif
|
||||
|
||||
if (Tmp_win->icon_w)
|
||||
{
|
||||
XDestroyWindow(dpy, Tmp_win->icon_w);
|
||||
XDeleteContext(dpy, Tmp_win->icon_w, FvwmContext);
|
||||
}
|
||||
if((Tmp_win->flags &ICON_OURS)&&(Tmp_win->icon_pixmap_w != None))
|
||||
XDestroyWindow(dpy, Tmp_win->icon_pixmap_w);
|
||||
if(Tmp_win->icon_pixmap_w != None)
|
||||
XDeleteContext(dpy, Tmp_win->icon_pixmap_w, FvwmContext);
|
||||
|
||||
if (Tmp_win->flags & TITLE)
|
||||
{
|
||||
XDeleteContext(dpy, Tmp_win->title_w, FvwmContext);
|
||||
for(i=0;i<Scr.nr_left_buttons;i++)
|
||||
XDeleteContext(dpy, Tmp_win->left_w[i], FvwmContext);
|
||||
for(i=0;i<Scr.nr_right_buttons;i++)
|
||||
if(Tmp_win->right_w[i] != None)
|
||||
XDeleteContext(dpy, Tmp_win->right_w[i], FvwmContext);
|
||||
}
|
||||
if (Tmp_win->flags & BORDER)
|
||||
{
|
||||
for(i=0;i<4;i++)
|
||||
XDeleteContext(dpy, Tmp_win->sides[i], FvwmContext);
|
||||
for(i=0;i<4;i++)
|
||||
XDeleteContext(dpy, Tmp_win->corners[i], FvwmContext);
|
||||
}
|
||||
|
||||
Tmp_win->prev->next = Tmp_win->next;
|
||||
if (Tmp_win->next != NULL)
|
||||
Tmp_win->next->prev = Tmp_win->prev;
|
||||
free_window_names (Tmp_win, True, True);
|
||||
if (Tmp_win->wmhints)
|
||||
XFree ((char *)Tmp_win->wmhints);
|
||||
if (Tmp_win->class.res_name && Tmp_win->class.res_name != NoName)
|
||||
XFree ((char *)Tmp_win->class.res_name);
|
||||
if (Tmp_win->class.res_class && Tmp_win->class.res_class != NoName)
|
||||
XFree ((char *)Tmp_win->class.res_class);
|
||||
if(Tmp_win->mwm_hints)
|
||||
XFree((char *)Tmp_win->mwm_hints);
|
||||
|
||||
if(Tmp_win->cmap_windows != (Window *)NULL)
|
||||
XFree((void *)Tmp_win->cmap_windows);
|
||||
|
||||
free((char *)Tmp_win);
|
||||
|
||||
#ifndef NO_PAGER
|
||||
RedrawPager();
|
||||
#endif
|
||||
XSync(dpy,0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Removes expose events for a specific window from the queue
|
||||
*
|
||||
*************************************************************************/
|
||||
int flush_expose (Window w)
|
||||
{
|
||||
XEvent dummy;
|
||||
int i=0;
|
||||
|
||||
while (XCheckTypedWindowEvent (dpy, w, Expose, &dummy))i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* RestoreWithdrawnLocation
|
||||
*
|
||||
* Puts windows back where they were before fvwm took over
|
||||
*
|
||||
************************************************************************/
|
||||
void RestoreWithdrawnLocation (FvwmWindow *tmp,Bool restart)
|
||||
{
|
||||
int a,b,w2,h2;
|
||||
unsigned int bw,mask;
|
||||
XWindowChanges xwc;
|
||||
|
||||
if(!tmp)
|
||||
return;
|
||||
|
||||
if (XGetGeometry (dpy, tmp->w, &JunkRoot, &xwc.x, &xwc.y,
|
||||
&JunkWidth, &JunkHeight, &bw, &JunkDepth))
|
||||
{
|
||||
XTranslateCoordinates(dpy,tmp->frame,Scr.Root,xwc.x,xwc.y,
|
||||
&a,&b,&JunkChild);
|
||||
xwc.x = a + tmp->xdiff;
|
||||
xwc.y = b + tmp->ydiff;
|
||||
xwc.border_width = tmp->old_bw;
|
||||
mask = (CWX | CWY|CWBorderWidth);
|
||||
|
||||
/* We can not assume that the window is currently on the screen.
|
||||
* Although this is normally the case, it is not always true. The
|
||||
* most common example is when the user does something in an
|
||||
* application which will, after some amount of computational delay,
|
||||
* cause the window to be unmapped, but then switches screens before
|
||||
* this happens. The XTranslateCoordinates call above will set the
|
||||
* window coordinates to either be larger than the screen, or negative.
|
||||
* This will result in the window being placed in odd, or even
|
||||
* unviewable locations when the window is remapped. The followin code
|
||||
* forces the "relative" location to be within the bounds of the display.
|
||||
*
|
||||
* gpw -- 11/11/93
|
||||
*
|
||||
* Unfortunately, this does horrendous things during re-starts,
|
||||
* hence the "if(restart) clause (RN)
|
||||
*
|
||||
* Also, fixed so that it only does this stuff if a window is more than
|
||||
* half off the screen. (RN)
|
||||
*/
|
||||
|
||||
if(!restart)
|
||||
{
|
||||
/* Don't mess with it if its partially on the screen now */
|
||||
if((tmp->frame_x < 0)||(tmp->frame_y<0)||
|
||||
(tmp->frame_x >= Scr.MyDisplayWidth)||
|
||||
(tmp->frame_y >= Scr.MyDisplayHeight))
|
||||
{
|
||||
w2 = (tmp->frame_width>>1);
|
||||
h2 = (tmp->frame_height>>1);
|
||||
if (( xwc.x < -w2) || (xwc.x > (Scr.MyDisplayWidth-w2 )))
|
||||
{
|
||||
xwc.x = xwc.x % Scr.MyDisplayWidth;
|
||||
if ( xwc.x < -w2 )
|
||||
xwc.x += Scr.MyDisplayWidth;
|
||||
}
|
||||
if ((xwc.y < -h2) || (xwc.y > (Scr.MyDisplayHeight-h2 )))
|
||||
{
|
||||
xwc.y = xwc.y % Scr.MyDisplayHeight;
|
||||
if ( xwc.y < -h2 )
|
||||
xwc.y += Scr.MyDisplayHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
XReparentWindow (dpy, tmp->w,Scr.Root,xwc.x,xwc.y);
|
||||
|
||||
if((tmp->flags & ICONIFIED)&&(!(tmp->flags & SUPPRESSICON)))
|
||||
{
|
||||
if (tmp->icon_w)
|
||||
XUnmapWindow(dpy, tmp->icon_w);
|
||||
if (tmp->icon_pixmap_w)
|
||||
XUnmapWindow(dpy, tmp->icon_pixmap_w);
|
||||
}
|
||||
|
||||
XConfigureWindow (dpy, tmp->w, mask, &xwc);
|
||||
XSync(dpy,0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Start/Stops the auto-raise timer
|
||||
*
|
||||
****************************************************************************/
|
||||
void SetTimer(int delay)
|
||||
{
|
||||
#ifdef HAVE_SETITIMER
|
||||
struct itimerval value;
|
||||
|
||||
value.it_value.tv_usec = 1000*(delay%1000);
|
||||
value.it_value.tv_sec = delay/1000;
|
||||
value.it_interval.tv_usec = 0;
|
||||
value.it_interval.tv_sec = 0;
|
||||
setitimer(ITIMER_REAL,&value,NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* ICCCM Client Messages - Section 4.2.8 of the ICCCM dictates that all
|
||||
* client messages will have the following form:
|
||||
*
|
||||
* event type ClientMessage
|
||||
* message type _XA_WM_PROTOCOLS
|
||||
* window tmp->w
|
||||
* format 32
|
||||
* data[0] message atom
|
||||
* data[1] time stamp
|
||||
*
|
||||
****************************************************************************/
|
||||
void send_clientmessage (Window w, Atom a, Time timestamp)
|
||||
{
|
||||
XClientMessageEvent ev;
|
||||
|
||||
ev.type = ClientMessage;
|
||||
ev.window = w;
|
||||
ev.message_type = _XA_WM_PROTOCOLS;
|
||||
ev.format = 32;
|
||||
ev.data.l[0] = a;
|
||||
ev.data.l[1] = timestamp;
|
||||
XSendEvent (dpy, w, False, 0L, (XEvent *) &ev);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Records the time of the last processed event. Used in XSetInputFocus
|
||||
*
|
||||
****************************************************************************/
|
||||
Time lastTimestamp = CurrentTime; /* until Xlib does this for us */
|
||||
|
||||
Bool StashEventTime (XEvent *ev)
|
||||
{
|
||||
Time NewTimestamp = CurrentTime;
|
||||
|
||||
switch (ev->type)
|
||||
{
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
NewTimestamp = ev->xkey.time;
|
||||
break;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
NewTimestamp = ev->xbutton.time;
|
||||
break;
|
||||
case MotionNotify:
|
||||
NewTimestamp = ev->xmotion.time;
|
||||
break;
|
||||
case EnterNotify:
|
||||
case LeaveNotify:
|
||||
NewTimestamp = ev->xcrossing.time;
|
||||
break;
|
||||
case PropertyNotify:
|
||||
NewTimestamp = ev->xproperty.time;
|
||||
break;
|
||||
case SelectionClear:
|
||||
NewTimestamp = ev->xselectionclear.time;
|
||||
break;
|
||||
case SelectionRequest:
|
||||
NewTimestamp = ev->xselectionrequest.time;
|
||||
break;
|
||||
case SelectionNotify:
|
||||
NewTimestamp = ev->xselection.time;
|
||||
break;
|
||||
default:
|
||||
return False;
|
||||
}
|
||||
if(NewTimestamp > lastTimestamp)
|
||||
lastTimestamp = NewTimestamp;
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Cleare the CIRCULATED field of the window flags.
|
||||
*
|
||||
*****************************************************************************/
|
||||
void ClearCirculatedFlag()
|
||||
{
|
||||
FvwmWindow *temp;
|
||||
int i=0;
|
||||
|
||||
temp = Scr.FvwmRoot.next;
|
||||
while(temp != NULL)
|
||||
{
|
||||
temp->focus_sequence = i++;
|
||||
temp = temp->next;
|
||||
}
|
||||
}
|
331
fvwm/misc.h
Normal file
331
fvwm/misc.h
Normal file
@ -0,0 +1,331 @@
|
||||
/*****************************************************************************/
|
||||
/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/
|
||||
/** Salt Lake City, Utah **/
|
||||
/** Portions Copyright 1989 by the Massachusetts Institute of Technology **/
|
||||
/** Cambridge, Massachusetts **/
|
||||
/** **/
|
||||
/** All Rights Reserved **/
|
||||
/** **/
|
||||
/** Permission to use, copy, modify, and distribute this software and **/
|
||||
/** its documentation for any purpose and without fee is hereby **/
|
||||
/** granted, provided that the above copyright notice appear in all **/
|
||||
/** copies and that both that copyright notice and this permis- **/
|
||||
/** sion notice appear in supporting documentation, and that the **/
|
||||
/** names of Evans & Sutherland and M.I.T. not be used in advertising **/
|
||||
/** in publicity pertaining to distribution of the software without **/
|
||||
/** specific, written prior permission. **/
|
||||
/** **/
|
||||
/** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/
|
||||
/** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/
|
||||
/** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/
|
||||
/** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/
|
||||
/** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
|
||||
/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
|
||||
/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
|
||||
/** OR PERFORMANCE OF THIS SOFTWARE. **/
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
#ifndef _MISC_
|
||||
#define _MISC_
|
||||
|
||||
#include <ctype.h>
|
||||
#include "menus.h"
|
||||
#include "../libs/fvwmlib.h"
|
||||
|
||||
/************************************************************************
|
||||
* ReapChildren - wait() for all dead child processes
|
||||
************************************************************************/
|
||||
#include <sys/wait.h>
|
||||
#ifdef HAVE_WAITPID
|
||||
#define ReapChildren() while ((waitpid(-1, NULL, WNOHANG)) > 0);
|
||||
#else
|
||||
#define ReapChildren() while ((wait3(NULL, WNOHANG, NULL)) > 0);
|
||||
#endif
|
||||
|
||||
typedef struct name_list_struct
|
||||
{
|
||||
struct name_list_struct *next; /* pointer to the next name */
|
||||
char *name; /* the name of the window */
|
||||
char *value; /* icon name */
|
||||
int Desk; /* Desktop number */
|
||||
unsigned long on_flags;
|
||||
unsigned long off_flags;
|
||||
int border_width;
|
||||
int resize_width;
|
||||
char *ForeColor;
|
||||
char *BackColor;
|
||||
|
||||
unsigned long on_buttons;
|
||||
unsigned long off_buttons;
|
||||
|
||||
} name_list;
|
||||
|
||||
/* used for parsing configuration */
|
||||
struct config
|
||||
{
|
||||
char *keyword;
|
||||
#ifdef __STDC__
|
||||
void (*action)(char *, FILE *, char **, int *);
|
||||
#else
|
||||
void (*action)();
|
||||
#endif
|
||||
char **arg;
|
||||
int *arg2;
|
||||
};
|
||||
|
||||
/* values for name_list flags */
|
||||
#define STICKY_FLAG 1
|
||||
#define STAYSONTOP_FLAG 2
|
||||
#define NOBORDER_FLAG 4
|
||||
#define NOTITLE_FLAG 8
|
||||
#define ICON_FLAG 32
|
||||
#define CIRCULATESKIP_FLAG 64
|
||||
#define LISTSKIP_FLAG 128
|
||||
#define STAYSONDESK_FLAG 256
|
||||
#define SUPPRESSICON_FLAG 512
|
||||
#define BW_FLAG 1024
|
||||
#define NOBW_FLAG 2048
|
||||
#define START_ICONIC_FLAG 4096
|
||||
#define FORE_COLOR_FLAG 8192
|
||||
#define BACK_COLOR_FLAG 16384
|
||||
#define NOICON_TITLE_FLAG 32768
|
||||
|
||||
/* some fancy font handling stuff */
|
||||
#define NewFontAndColor(newfont,color,backcolor) {\
|
||||
Globalgcv.font = newfont;\
|
||||
Globalgcv.foreground = color;\
|
||||
Globalgcv.background = backcolor;\
|
||||
Globalgcm = GCFont | GCForeground | GCBackground; \
|
||||
XChangeGC(dpy,Scr.FontGC,Globalgcm,&Globalgcv); \
|
||||
}
|
||||
|
||||
#ifdef NO_ICONS
|
||||
#define ICON_HEIGHT 1
|
||||
#else
|
||||
#define ICON_HEIGHT (IconFont->height+6)
|
||||
#endif
|
||||
|
||||
extern XGCValues Globalgcv;
|
||||
extern unsigned long Globalgcm;
|
||||
extern MyFont *IconFont;
|
||||
extern Time lastTimestamp;
|
||||
extern XEvent Event;
|
||||
extern char NoName[];
|
||||
|
||||
extern unsigned long LookInList(name_list *, char *, XClassHint *,
|
||||
char **value, int *Desk, int *bw, int *nobw,
|
||||
char **forecolor, char **backcolor,
|
||||
unsigned long * buttons);
|
||||
extern void MoveOutline(Window, int,int,int,int);
|
||||
extern void DoResize(int, int, FvwmWindow *);
|
||||
extern void DisplaySize(FvwmWindow *, int, int, Bool);
|
||||
extern void DisplayPosition(FvwmWindow *, int, int,Bool);
|
||||
extern void SetupFrame(FvwmWindow *,int,int,int,int,Bool);
|
||||
extern void CreateGCs(void);
|
||||
extern void InstallWindowColormaps(FvwmWindow *);
|
||||
extern void InstallRootColormap(void);
|
||||
extern void UninstallRootColormap(void);
|
||||
extern void FetchWmProtocols(FvwmWindow *);
|
||||
extern void FetchWmColormapWindows (FvwmWindow *tmp);
|
||||
extern void PaintEntry(MenuRoot *, MenuItem *);
|
||||
extern void PaintMenu(MenuRoot *, XEvent *);
|
||||
extern void MakeMenus(const char*, char*);
|
||||
extern void InitEvents(void);
|
||||
extern void DispatchEvent(void);
|
||||
extern void HandleEvents(void);
|
||||
extern void HandleExpose(void);
|
||||
extern void HandleFocusIn(void);
|
||||
extern void HandleFocusOut(void);
|
||||
extern void HandleDestroyNotify(void);
|
||||
extern void HandleMapRequest(void);
|
||||
extern void HandleMapNotify(void);
|
||||
extern void HandleUnmapNotify(void);
|
||||
extern void HandleMotionNotify(void);
|
||||
extern void HandleButtonRelease(void);
|
||||
extern void HandleButtonPress(void);
|
||||
extern void HandleEnterNotify(void);
|
||||
extern void HandleLeaveNotify(void);
|
||||
extern void HandleConfigureRequest(void);
|
||||
extern void HandleClientMessage(void);
|
||||
extern void HandlePropertyNotify(void);
|
||||
extern void HandleKeyPress(void);
|
||||
extern void HandleVisibilityNotify(void);
|
||||
extern void HandleColormapNotify(void);
|
||||
extern void SetTitleBar(FvwmWindow *, Bool,Bool);
|
||||
extern void RestoreWithdrawnLocation(FvwmWindow *, Bool);
|
||||
extern void Destroy(FvwmWindow *);
|
||||
extern void GetGravityOffsets (FvwmWindow *, int *, int *);
|
||||
extern void MoveViewport(int newx, int newy,Bool);
|
||||
extern FvwmWindow *AddWindow(Window w);
|
||||
extern int MappedNotOverride(Window w);
|
||||
extern void GrabButtons(FvwmWindow *);
|
||||
extern void GrabKeys(FvwmWindow *);
|
||||
extern void GetWindowSizeHints(FvwmWindow *);
|
||||
extern void RedrawPager(void);
|
||||
extern void ReallyRedrawPager(void);
|
||||
extern void SwitchPages(Bool,Bool);
|
||||
extern void NextPage(void);
|
||||
extern void PrevPage(void);
|
||||
extern void moveLoop(FvwmWindow *, int, int, int,int, int *, int *,Bool,Bool);
|
||||
|
||||
extern void Keyboard_shortcuts(XEvent *, int);
|
||||
extern void RedoIconName(FvwmWindow *);
|
||||
extern void DrawIconWindow(FvwmWindow *);
|
||||
extern void CreateIconWindow(FvwmWindow *tmp_win, int def_x, int def_y);
|
||||
|
||||
|
||||
extern FVWM_INLINE void RelieveWindow(FvwmWindow *, Window,
|
||||
int, int, int, int, GC, GC, int);
|
||||
void RelieveParts(FvwmWindow *t,int i,GC hor, GC vert);
|
||||
#define NO_HILITE 0x0000
|
||||
#define TOP_HILITE 0x0001
|
||||
#define RIGHT_HILITE 0x0002
|
||||
#define BOTTOM_HILITE 0x0004
|
||||
#define LEFT_HILITE 0x0008
|
||||
#define FULL_HILITE 0x000F
|
||||
|
||||
extern void sleep_a_little(int);
|
||||
extern void PagerMoveWindow(void);
|
||||
extern void Maximize(FvwmWindow *,int,int,int, int);
|
||||
extern void RaiseWindow(FvwmWindow *t);
|
||||
extern void LowerWindow(FvwmWindow *t);
|
||||
extern Bool GrabEm(int);
|
||||
extern void UngrabEm(void);
|
||||
extern MenuRoot *NewMenuRoot(char *name);
|
||||
extern void AddToMenu(MenuRoot *, char *, char *, char *,int,
|
||||
long,long, char, char);
|
||||
extern void MakeMenu(MenuRoot *);
|
||||
extern void CaptureAllWindows(void);
|
||||
extern void SetTimer(int);
|
||||
extern int flush_expose(Window w);
|
||||
extern void ExecuteFunction(int, char *,Window, FvwmWindow *, XEvent *,
|
||||
unsigned long, long, long,int,int,
|
||||
MenuRoot *, int module);
|
||||
extern void do_windowList(int, int);
|
||||
extern void RaiseThisWindow(int);
|
||||
extern int GetContext(FvwmWindow *, XEvent *, Window *dummy);
|
||||
extern void ConstrainSize (FvwmWindow *, int *, int *);
|
||||
extern void HandlePaging(int, int, int *, int *, int *, int *,Bool);
|
||||
extern void SetShape(FvwmWindow *, int);
|
||||
extern void AutoPlace(FvwmWindow *);
|
||||
extern void fvwm_err(char *, char *, char *, char *);
|
||||
extern void MoveResizePagerView(FvwmWindow *t);
|
||||
extern void MoveResizeViewPortIndicator(void);
|
||||
extern void executeModule(char *action,FILE *fd, char **arg, int *junk);
|
||||
extern void SetFocus(Window,FvwmWindow *);
|
||||
extern void CheckAndSetFocus(void);
|
||||
extern void initModules(void);
|
||||
extern void HandleModuleInput(Window w, int channel);
|
||||
extern void nofont(char *name);
|
||||
extern char *stripcpy(char *);
|
||||
extern char *stripcpy2(char *,int, Bool);
|
||||
extern char *stripcpy3(char *, Bool);
|
||||
extern void match_string(struct config *, char *, char *, FILE *);
|
||||
extern void no_popup(char *ptr);
|
||||
extern void KillModule(int channel, int place);
|
||||
extern void ClosePipes(void);
|
||||
extern char *findIconFile(char *icon, char *pathlist, int mode);
|
||||
extern void GetBitmapFile(FvwmWindow *tmp_win);
|
||||
extern void GetXPMFile(FvwmWindow *tmp_win);
|
||||
extern void GetIconWindow(FvwmWindow *tmp_win);
|
||||
extern void GetIconBitmap(FvwmWindow *tmp_win);
|
||||
extern void SmartPlacement(FvwmWindow *t, int width, int height,int *x,int *y);
|
||||
extern void usage(void);
|
||||
void Broadcast(unsigned long event_type, unsigned long num_datum,
|
||||
unsigned long data1, unsigned long data2,
|
||||
unsigned long data3, unsigned long data4,
|
||||
unsigned long data5, unsigned long data6,
|
||||
unsigned long data7);
|
||||
void BroadcastConfig(unsigned long event_type, FvwmWindow *t);
|
||||
void SendPacket(int channel, unsigned long event_type, unsigned long num_datum,
|
||||
unsigned long data1, unsigned long data2,
|
||||
unsigned long data3, unsigned long data4,
|
||||
unsigned long data5, unsigned long data6,
|
||||
unsigned long data7);
|
||||
void SendConfig(int module, unsigned long event_type, FvwmWindow *t);
|
||||
void BroadcastName(unsigned long event_type, unsigned long data1,
|
||||
unsigned long data2, unsigned long data3, char *name);
|
||||
void SendName(int channel, unsigned long event_type,unsigned long data1,
|
||||
unsigned long data2, unsigned long data3, char *name);
|
||||
void DeadPipe(int nonsense);
|
||||
void GetMwmHints(FvwmWindow *t);
|
||||
void SelectDecor(FvwmWindow *, unsigned long, int,int);
|
||||
extern Bool PopUpMenu(MenuRoot *, int, int);
|
||||
void ComplexFunction(Window, FvwmWindow *, XEvent *,unsigned long, MenuRoot *);
|
||||
extern int DeferExecution(XEvent *, Window *,FvwmWindow **, unsigned long *, int, int);
|
||||
void send_clientmessage (Window, Atom, Time);
|
||||
void SetBorder (FvwmWindow *, Bool,Bool,Bool, Window);
|
||||
void move_window(XEvent *,Window,FvwmWindow *,int,int, int,int,int);
|
||||
void resize_window(Window,FvwmWindow *, int,int,int,int);
|
||||
void CreateIconWindow(FvwmWindow *, int, int);
|
||||
void send_clientmessage (Window, Atom, Time);
|
||||
void SetMapStateProp(FvwmWindow *, int);
|
||||
void SetStickyProp(FvwmWindow *, int, int, int);
|
||||
void SetClientProp(FvwmWindow *);
|
||||
void Iconify(FvwmWindow *, int, int);
|
||||
void DeIconify(FvwmWindow *);
|
||||
void PopDownMenu(void);
|
||||
void KeepOnTop(void);
|
||||
void show_panner(void);
|
||||
void WaitForButtonsUp(void);
|
||||
void FocusOn(FvwmWindow *t,int DeIconifyOnly);
|
||||
Bool PlaceWindow(FvwmWindow *tmp_win, unsigned long flags,int Desk);
|
||||
void free_window_names (FvwmWindow *tmp, Bool nukename, Bool nukeicon);
|
||||
|
||||
int do_menu (MenuRoot *menu);
|
||||
int check_allowed_function(MenuItem *mi);
|
||||
int check_allowed_function2(int function, FvwmWindow *t);
|
||||
void ReInstallActiveColormap(void);
|
||||
void ParsePopupEntry(char *,FILE *, char **, int *);
|
||||
void ParseMouseEntry(char *,FILE *, char **,int *);
|
||||
void ParseKeyEntry(char *, FILE *, char **,int *);
|
||||
void SetOneStyle(char *text,FILE *,char **,int *);
|
||||
void AddToList(char *name, char *icon_name, unsigned long off_flags,
|
||||
unsigned long on_flags, int desk,int bw, int nobw,
|
||||
char *forecolor, char *backcolor,
|
||||
unsigned long off_buttons, unsigned long on_buttons);
|
||||
|
||||
void ParseStyle(char *text,FILE *,char **,int *);
|
||||
void assign_string(char *text, FILE *fd, char **arg,int *);
|
||||
void ButtonStyle(char *text, FILE *fd, char **arg,int *);
|
||||
void SetFlag(char *text, FILE *fd, char **arg,int *);
|
||||
void SetCursor(char *text, FILE *fd, char **arg,int *);
|
||||
void SetInts(char *text, FILE *fd, char **arg,int *);
|
||||
void SetBox(char *text, FILE *fd, char **arg,int *);
|
||||
void set_func(char *, FILE *, char **,int *);
|
||||
void copy_config(FILE **config_fd);
|
||||
FVWM_INLINE void DrawPattern(Window, GC, GC, int, int,int);
|
||||
Pixel GetShadow(Pixel);
|
||||
Pixel GetHilite(Pixel);
|
||||
|
||||
|
||||
#define UP 1
|
||||
#define DOWN 0
|
||||
extern FvwmWindow *Circulate(FvwmWindow *tmp_win, char *action,Bool Direction);
|
||||
void changeDesks(int val1,int val2);
|
||||
void changeWindowsDesk(FvwmWindow *t,int val1);
|
||||
void MapIt(FvwmWindow *t);
|
||||
void UnmapIt(FvwmWindow *t);
|
||||
void do_save(void);
|
||||
void checkPanFrames(void);
|
||||
void raisePanFrames(void);
|
||||
void initPanFrames(void);
|
||||
Bool StashEventTime (XEvent *ev);
|
||||
int matchWildcards(char *pattern, char *string);
|
||||
int My_XNextEvent(Display *dpy, XEvent *event);
|
||||
void ClearCirculatedFlag();
|
||||
void FlushQueue(int module);
|
||||
void QuickRestart(void);
|
||||
void AddFuncKey (char *, int, int, int, char *, int, int, MenuRoot *,
|
||||
char , char);
|
||||
|
||||
void InteractiveMove(Window *w, FvwmWindow *tmp_win, int *FinalX, int *FinalY,
|
||||
XEvent *eventp);
|
||||
#ifdef BROKEN_SUN_HEADERS
|
||||
#include "sun_headers.h"
|
||||
#endif
|
||||
#ifdef NEEDS_ALPHA_HEADER
|
||||
#include "alpha_header.h"
|
||||
#endif /* NEEDS_ALPHA_HEADER */
|
||||
#endif /* _MISC_ */
|
685
fvwm/module.c
Normal file
685
fvwm/module.c
Normal file
@ -0,0 +1,685 @@
|
||||
/****************************************************************************
|
||||
* 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
|
||||
****************************************************************************/
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* code for launching fvwm modules.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "fvwm.h"
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
#include "module.h"
|
||||
|
||||
|
||||
int npipes;
|
||||
int *readPipes;
|
||||
int *writePipes;
|
||||
int *pipeOn;
|
||||
unsigned long *PipeMask;
|
||||
struct queue_buff_struct **pipeQueue;
|
||||
|
||||
FVWM_INLINE int PositiveWrite(int module, unsigned long *ptr, int size);
|
||||
void DeleteQueueBuff(int module);
|
||||
void AddToQueue(int module, unsigned long *ptr, int size, int done);
|
||||
|
||||
void initModules(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
npipes = GetFdWidth();
|
||||
|
||||
writePipes = (int *)safemalloc(sizeof(int)*npipes);
|
||||
readPipes = (int *)safemalloc(sizeof(int)*npipes);
|
||||
pipeOn = (int *)safemalloc(sizeof(int)*npipes);
|
||||
PipeMask = (unsigned long *)safemalloc(sizeof(unsigned long)*npipes);
|
||||
pipeQueue=(struct queue_buff_struct **)
|
||||
safemalloc(sizeof(struct queue_buff_struct *)*npipes);
|
||||
|
||||
for(i=0;i<npipes;i++)
|
||||
{
|
||||
writePipes[i]= -1;
|
||||
readPipes[i]= -1;
|
||||
pipeOn[i] = -1;
|
||||
PipeMask[i] = MAX_MASK;
|
||||
pipeQueue[i] = (struct queue_buff_struct *)NULL;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void ClosePipes(void)
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<npipes;i++)
|
||||
{
|
||||
if(writePipes[i]>0)
|
||||
{
|
||||
close(writePipes[i]);
|
||||
close(readPipes[i]);
|
||||
}
|
||||
while(pipeQueue[i] != NULL)
|
||||
{
|
||||
DeleteQueueBuff(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void executeModule(char *action,FILE *fd, char **win, int *context)
|
||||
{
|
||||
int fvwm_to_app[2],app_to_fvwm[2];
|
||||
int i,val;
|
||||
char command[256];
|
||||
char *cptr;
|
||||
char *aptr;
|
||||
char *args[10];
|
||||
char *arg1 = NULL;
|
||||
char arg2[40];
|
||||
char arg3[40];
|
||||
char arg5[40];
|
||||
char arg6[40];
|
||||
char *end;
|
||||
extern char *ModulePath;
|
||||
extern FILE *config_fd;
|
||||
extern char *fvwm_file;
|
||||
|
||||
if(action == NULL)
|
||||
return;
|
||||
strcpy(command,action);
|
||||
|
||||
cptr = command;
|
||||
while((isspace(*cptr))&&(*cptr != '\n')&&(*cptr != 0))
|
||||
cptr++;
|
||||
|
||||
end = cptr;
|
||||
while((!(isspace(*end))&&(*end != '\n'))&&(*end != 0)&&(end <(command+256)))
|
||||
end++;
|
||||
|
||||
if((*end == 0)||(end >= command+256))
|
||||
aptr = NULL;
|
||||
else
|
||||
aptr = end+1;
|
||||
*end = 0;
|
||||
|
||||
if(aptr)
|
||||
{
|
||||
while((isspace(*aptr)||(*aptr=='\n'))&&(*aptr!=0)&&(aptr<(command+256)))
|
||||
aptr++;
|
||||
if((*aptr == 0)||(*aptr == '\n'))
|
||||
aptr = NULL;
|
||||
}
|
||||
|
||||
arg1 = findIconFile(cptr,ModulePath,X_OK);
|
||||
if(arg1 == NULL)
|
||||
{
|
||||
fprintf(stderr,"Fvwm: No such module %s %s\n",ModulePath,cptr);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Look for an available pipe slot */
|
||||
i=0;
|
||||
while((i<npipes) && (writePipes[i] >=0))
|
||||
i++;
|
||||
if(i>=npipes)
|
||||
{
|
||||
fprintf(stderr,"fvwm: Too many Accessories!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* I want one-ended pipes, so I open two two-ended pipes,
|
||||
* and close one end of each. I need one ended pipes so that
|
||||
* I can detect when the module crashes/malfunctions */
|
||||
if(pipe(fvwm_to_app)!=0)
|
||||
{
|
||||
fprintf(stderr,"Fvwm: Failed to open pipe\n");
|
||||
return;
|
||||
}
|
||||
if(pipe(app_to_fvwm)!=0)
|
||||
{
|
||||
fprintf(stderr,"Fvwm: Failed to open pipe2\n");
|
||||
close(fvwm_to_app[0]);
|
||||
close(fvwm_to_app[1]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
val = fork();
|
||||
if(val > 0)
|
||||
{
|
||||
/* This fork remains running fvwm */
|
||||
/* close appropriate descriptors from each pipe so
|
||||
* that fvwm will be able to tell when the app dies */
|
||||
close(app_to_fvwm[1]);
|
||||
close(fvwm_to_app[0]);
|
||||
|
||||
/* add these pipes to fvwm's active pipe list */
|
||||
writePipes[i] = fvwm_to_app[1];
|
||||
readPipes[i] = app_to_fvwm[0];
|
||||
pipeOn[i] = -1;
|
||||
PipeMask[i] = MAX_MASK;
|
||||
free(arg1);
|
||||
pipeQueue[i] = NULL;
|
||||
|
||||
/* make the PositiveWrite pipe non-blocking. Don't want to jam up
|
||||
fvwm because of an uncooperative module */
|
||||
fcntl(writePipes[i],F_SETFL,O_NDELAY);
|
||||
/* Mark the pipes close-on exec so other programs
|
||||
* won`t inherit them */
|
||||
if (fcntl(readPipes[i], F_SETFD, 1) == -1)
|
||||
fvwm_err("module close-on-exec failed",NULL,NULL,NULL);
|
||||
if (fcntl(writePipes[i], F_SETFD, 1) == -1)
|
||||
fvwm_err("module close-on-exec failed",NULL,NULL,NULL);
|
||||
}
|
||||
else if (val ==0)
|
||||
{
|
||||
/* this is the child */
|
||||
/* need to close config_fd if its still open! */
|
||||
if(config_fd != (FILE *)NULL)
|
||||
/* Fixes some funny stuff with svr4 and stream IO */
|
||||
/* fclose(config_fd) */
|
||||
close(fileno(config_fd));
|
||||
|
||||
/* this fork execs the module */
|
||||
close(fvwm_to_app[1]);
|
||||
close(app_to_fvwm[0]);
|
||||
sprintf(arg2,"%d",app_to_fvwm[1]);
|
||||
sprintf(arg3,"%d",fvwm_to_app[0]);
|
||||
sprintf(arg5,"%lx",(unsigned long)win);
|
||||
sprintf(arg6,"%lx",(unsigned long)context);
|
||||
args[0]=arg1;
|
||||
args[1]=arg2;
|
||||
args[2]=arg3;
|
||||
args[3]=fvwm_file;
|
||||
args[4]=arg5;
|
||||
args[5]=arg6;
|
||||
if(aptr != NULL)
|
||||
{
|
||||
args[6] = aptr;
|
||||
args[7] = 0;
|
||||
}
|
||||
else
|
||||
args[6]= 0;
|
||||
execvp(arg1,args);
|
||||
fprintf(stderr,"Execution of module failed: %s",arg1);
|
||||
perror("");
|
||||
close(app_to_fvwm[1]);
|
||||
close(fvwm_to_app[0]);
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr,"Fork failed\n");
|
||||
free(arg1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void HandleModuleInput(Window w, int channel)
|
||||
{
|
||||
char text[256];
|
||||
int size;
|
||||
int cont,n;
|
||||
char *newaction = NULL;
|
||||
|
||||
/* Already read a (possibly NULL) window id from the pipe,
|
||||
* Now read an fvwm bultin command line */
|
||||
n = read(readPipes[channel], &size, sizeof(int));
|
||||
if(n < sizeof(int))
|
||||
{
|
||||
KillModule(channel,1);
|
||||
return;
|
||||
}
|
||||
|
||||
if(size >255)
|
||||
{
|
||||
fprintf(stderr,"Module command is too big (%d)\n",size);
|
||||
size=255;
|
||||
}
|
||||
|
||||
pipeOn[channel] = 1;
|
||||
|
||||
n = read(readPipes[channel],text, size);
|
||||
if(n < size)
|
||||
{
|
||||
KillModule(channel,2);
|
||||
return;
|
||||
}
|
||||
|
||||
text[n]=0;
|
||||
n = read(readPipes[channel],&cont, sizeof(int));
|
||||
if(n < sizeof(int))
|
||||
{
|
||||
KillModule(channel,3);
|
||||
return;
|
||||
}
|
||||
if(cont == 0)
|
||||
{
|
||||
KillModule(channel,4);
|
||||
}
|
||||
if(strlen(text)>0)
|
||||
{
|
||||
char function[256],*ptr;
|
||||
MenuRoot *mr=0;
|
||||
char *item=NULL;
|
||||
extern int func_val_1,func_val_2,func,Context;
|
||||
extern struct config func_config[];
|
||||
extern unsigned PopupCount;
|
||||
extern MenuRoot *PopupTable[MAXPOPUPS];
|
||||
FvwmWindow *tmp_win;
|
||||
extern char *orig_tline;
|
||||
int n,unit_val_1,unit_val_2;
|
||||
char unit_1, unit_2;
|
||||
|
||||
|
||||
orig_tline = text;
|
||||
Event.xany.type = ButtonRelease;
|
||||
Event.xany.window = w;
|
||||
|
||||
func_val_1 = 0;
|
||||
func_val_2 = 0;
|
||||
unit_1 = 's';
|
||||
unit_2 = 's';
|
||||
n = sscanf(text,"%s %d %d",function,&func_val_1,&func_val_2);
|
||||
if(n != 3)
|
||||
n = sscanf(text,"%s %d%c %d%c",function,&func_val_1,&unit_1,&func_val_2,&unit_2);
|
||||
|
||||
if(mystrcasecmp(function,"SET_MASK")==0)
|
||||
{
|
||||
PipeMask[channel] = func_val_1;
|
||||
return;
|
||||
}
|
||||
func = F_NOP;
|
||||
match_string(func_config,function,"bad mouse function:",NULL);
|
||||
if((func == F_POPUP)||(func == F_FUNCTION))
|
||||
{
|
||||
unsigned i;
|
||||
ptr = stripcpy2(text,0,True);
|
||||
if(ptr != NULL)
|
||||
for (i = 0; i < PopupCount; i++)
|
||||
if (mystrcasecmp(PopupTable[i]->name,ptr) == 0)
|
||||
{
|
||||
mr = PopupTable[i];
|
||||
break;
|
||||
}
|
||||
if (!mr)
|
||||
{
|
||||
no_popup(ptr);
|
||||
func = F_NOP;
|
||||
}
|
||||
}
|
||||
else if((func == F_EXEC)||(func == F_RESTART)||
|
||||
(func == F_CIRCULATE_UP)||(func == F_CIRCULATE_DOWN)||
|
||||
(func == F_WARP)||(func == F_MODULE))
|
||||
{
|
||||
if((func == F_EXEC)||(func == F_RESTART)||(func== F_MODULE))
|
||||
{
|
||||
item = stripcpy2(text,0,True);
|
||||
newaction = stripcpy3(text,True);
|
||||
}
|
||||
else
|
||||
{
|
||||
item = stripcpy2(text,0,False);
|
||||
newaction = stripcpy3(text,False);
|
||||
}
|
||||
}
|
||||
if (XFindContext (dpy, w, FvwmContext, (caddr_t *) &tmp_win) == XCNOENT)
|
||||
{
|
||||
tmp_win = NULL;
|
||||
w = None;
|
||||
}
|
||||
if(tmp_win)
|
||||
{
|
||||
Event.xbutton.button = 1;
|
||||
Event.xbutton.x_root = tmp_win->frame_x;
|
||||
Event.xbutton.y_root = tmp_win->frame_y;
|
||||
Event.xbutton.x = 0;
|
||||
Event.xbutton.y = 0;
|
||||
Event.xbutton.subwindow = None;
|
||||
}
|
||||
else
|
||||
{
|
||||
Event.xbutton.button = 1;
|
||||
Event.xbutton.x_root = 0;
|
||||
Event.xbutton.y_root = 0;
|
||||
Event.xbutton.x = 0;
|
||||
Event.xbutton.y = 0;
|
||||
Event.xbutton.subwindow = None;
|
||||
}
|
||||
if(unit_1 == 'p')
|
||||
unit_val_1 = 100;
|
||||
else
|
||||
unit_val_1 = Scr.MyDisplayWidth;
|
||||
if(unit_2 == 'p')
|
||||
unit_val_2 = 100;
|
||||
else
|
||||
unit_val_2 = Scr.MyDisplayHeight;
|
||||
|
||||
Context = GetContext(tmp_win,&Event,&w);
|
||||
ExecuteFunction(func,newaction, w, tmp_win, &Event, Context,
|
||||
func_val_1,func_val_2,unit_val_1,unit_val_2,mr,channel);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void DeadPipe(int nonsense)
|
||||
{
|
||||
signal(SIGPIPE, DeadPipe);
|
||||
}
|
||||
|
||||
|
||||
void KillModule(int channel, int place)
|
||||
{
|
||||
close(readPipes[channel]);
|
||||
close(writePipes[channel]);
|
||||
|
||||
readPipes[channel] = -1;
|
||||
writePipes[channel] = -1;
|
||||
pipeOn[channel] = -1;
|
||||
while(pipeQueue[channel] != NULL)
|
||||
{
|
||||
DeleteQueueBuff(channel);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void Broadcast(unsigned long event_type, unsigned long num_datum,
|
||||
unsigned long data1, unsigned long data2, unsigned long data3,
|
||||
unsigned long data4, unsigned long data5, unsigned long data6,
|
||||
unsigned long data7)
|
||||
{
|
||||
int i;
|
||||
unsigned long body[10];
|
||||
|
||||
body[0] = START_FLAG;
|
||||
body[1] = event_type;
|
||||
body[2] = num_datum+3;
|
||||
|
||||
if(num_datum>0)
|
||||
body[3] = data1;
|
||||
if(num_datum>1)
|
||||
body[4] = data2;
|
||||
if(num_datum>2)
|
||||
body[5] = data3;
|
||||
if(num_datum>3)
|
||||
body[6] = data4;
|
||||
if(num_datum>4)
|
||||
body[7] = data5;
|
||||
if(num_datum>5)
|
||||
body[8] = data6;
|
||||
if(num_datum>6)
|
||||
body[9] = data7;
|
||||
|
||||
for(i=0;i<npipes;i++)
|
||||
PositiveWrite(i,body, (num_datum+3)*sizeof(unsigned long));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void SendPacket(int module, unsigned long event_type, unsigned long num_datum,
|
||||
unsigned long data1, unsigned long data2, unsigned long data3,
|
||||
unsigned long data4, unsigned long data5, unsigned long data6,
|
||||
unsigned long data7)
|
||||
{
|
||||
unsigned long body[10];
|
||||
|
||||
body[0] = START_FLAG;
|
||||
body[1] = event_type;
|
||||
body[2] = num_datum+3;
|
||||
|
||||
if(num_datum>0)
|
||||
body[3] = data1;
|
||||
if(num_datum>1)
|
||||
body[4] = data2;
|
||||
if(num_datum>2)
|
||||
body[5] = data3;
|
||||
if(num_datum>3)
|
||||
body[6] = data4;
|
||||
if(num_datum>4)
|
||||
body[7] = data5;
|
||||
if(num_datum>5)
|
||||
body[8] = data6;
|
||||
if(num_datum>6)
|
||||
body[9] = data7;
|
||||
PositiveWrite(module,body,(num_datum+3)*sizeof(unsigned long));
|
||||
}
|
||||
|
||||
void SendConfig(int module, unsigned long event_type, FvwmWindow *t)
|
||||
{
|
||||
unsigned long body[MAX_BODY_SIZE+HEADER_SIZE];
|
||||
|
||||
body[0] = START_FLAG;
|
||||
body[1] = event_type;
|
||||
body[2] = 27;
|
||||
body[3] = t->w;
|
||||
body[4] = t->frame;
|
||||
body[5] = (unsigned long)t;
|
||||
body[6] = t->frame_x;
|
||||
body[7] = t->frame_y;
|
||||
body[8] = t->frame_width;
|
||||
body[9] = t->frame_height;
|
||||
body[10] = t->Desk;
|
||||
body[11] = t->flags;
|
||||
body[12] = t->title_height;
|
||||
body[13] = t->boundary_width;
|
||||
body[14] = t->hints.base_width;
|
||||
body[15] = t->hints.base_height;
|
||||
body[16] = t->hints.width_inc;
|
||||
body[17] = t->hints.height_inc;
|
||||
body[18] = t->hints.min_width;
|
||||
body[19] = t->hints.min_height;
|
||||
body[20] = t->hints.max_width;
|
||||
body[21] = t->hints.max_height;
|
||||
body[22] = t->icon_w;
|
||||
body[23] = t->icon_pixmap_w;
|
||||
body[24] = t->hints.win_gravity;
|
||||
body[25] = t->TextPixel;
|
||||
body[26] = t->BackPixel;
|
||||
|
||||
PositiveWrite(module,body,27*sizeof(unsigned long));
|
||||
}
|
||||
|
||||
|
||||
void BroadcastConfig(unsigned long event_type, FvwmWindow *t)
|
||||
{
|
||||
unsigned long body[MAX_BODY_SIZE+HEADER_SIZE];
|
||||
int i;
|
||||
|
||||
body[0] = START_FLAG;
|
||||
body[1] = event_type;
|
||||
body[2] = 27;
|
||||
body[3] = t->w;
|
||||
body[4] = t->frame;
|
||||
body[5] = (unsigned long)t;
|
||||
body[6] = t->frame_x;
|
||||
body[7] = t->frame_y;
|
||||
body[8] = t->frame_width;
|
||||
body[9] = t->frame_height;
|
||||
body[10] = t->Desk;
|
||||
body[11] = t->flags;
|
||||
body[12] = t->title_height;
|
||||
body[13] = t->boundary_width;
|
||||
body[14] = t->hints.base_width;
|
||||
body[15] = t->hints.base_height;
|
||||
body[16] = t->hints.width_inc;
|
||||
body[17] = t->hints.height_inc;
|
||||
body[18] = t->hints.min_width;
|
||||
body[19] = t->hints.min_height;
|
||||
body[20] = t->hints.max_width;
|
||||
body[21] = t->hints.max_height;
|
||||
body[22] = t->icon_w;
|
||||
body[23] = t->icon_pixmap_w;
|
||||
body[24] = t->hints.win_gravity;
|
||||
body[25] = t->TextPixel;
|
||||
body[26] = t->BackPixel;
|
||||
|
||||
for(i=0;i<npipes;i++)
|
||||
{
|
||||
PositiveWrite(i,body,27*sizeof(unsigned long));
|
||||
}
|
||||
}
|
||||
|
||||
void BroadcastName(unsigned long event_type, unsigned long data1,
|
||||
unsigned long data2, unsigned long data3, char *name)
|
||||
{
|
||||
int l,i;
|
||||
unsigned long *body;
|
||||
|
||||
|
||||
if(name==NULL)
|
||||
return;
|
||||
l=strlen(name)/(sizeof(unsigned long))+7;
|
||||
body = (unsigned long *)safemalloc(l*sizeof(unsigned long));
|
||||
|
||||
body[0] = START_FLAG;
|
||||
body[1] = event_type;
|
||||
body[2] = l;
|
||||
|
||||
body[3] = data1;
|
||||
body[4] = data2;
|
||||
body[5] = data3;
|
||||
strcpy((char *)&body[6],name);
|
||||
|
||||
|
||||
for(i=0;i<npipes;i++)
|
||||
PositiveWrite(i,(unsigned long *)body, l*sizeof(unsigned long));
|
||||
|
||||
free(body);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void SendName(int module, unsigned long event_type,
|
||||
unsigned long data1,unsigned long data2,
|
||||
unsigned long data3, char *name)
|
||||
{
|
||||
int l;
|
||||
unsigned long *body;
|
||||
|
||||
if(name == NULL)
|
||||
return;
|
||||
l=strlen(name)/(sizeof(unsigned long))+7;
|
||||
body = (unsigned long *)safemalloc(l*sizeof(unsigned long));
|
||||
|
||||
body[0] = START_FLAG;
|
||||
body[1] = event_type;
|
||||
body[2] = l;
|
||||
|
||||
body[3] = data1;
|
||||
body[4] = data2;
|
||||
body[5] = data3;
|
||||
strcpy((char *)&body[6],name);
|
||||
|
||||
PositiveWrite(module,(unsigned long *)body, l*sizeof(unsigned long));
|
||||
|
||||
free(body);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include <sys/errno.h>
|
||||
FVWM_INLINE int PositiveWrite(int module, unsigned long *ptr, int size)
|
||||
{
|
||||
if((pipeOn[module]<0)||(!((PipeMask[module]) & ptr[1])))
|
||||
return -1;
|
||||
|
||||
AddToQueue(module,ptr,size,0);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
void AddToQueue(int module, unsigned long *ptr, int size, int done)
|
||||
{
|
||||
struct queue_buff_struct *c,*e;
|
||||
unsigned long *d;
|
||||
|
||||
c = (struct queue_buff_struct *)safemalloc(sizeof(struct queue_buff_struct));
|
||||
c->next = NULL;
|
||||
c->size = size;
|
||||
c->done = done;
|
||||
d = (unsigned long *)safemalloc(size);
|
||||
c->data = d;
|
||||
memcpy(d,ptr,size);
|
||||
|
||||
e = pipeQueue[module];
|
||||
if(e == NULL)
|
||||
{
|
||||
pipeQueue[module] = c;
|
||||
return;
|
||||
}
|
||||
while(e->next != NULL)
|
||||
e = e->next;
|
||||
e->next = c;
|
||||
}
|
||||
|
||||
void DeleteQueueBuff(int module)
|
||||
{
|
||||
struct queue_buff_struct *a;
|
||||
|
||||
if(pipeQueue[module] == NULL)
|
||||
return;
|
||||
a = pipeQueue[module];
|
||||
pipeQueue[module] = a->next;
|
||||
free(a->data);
|
||||
free(a);
|
||||
return;
|
||||
}
|
||||
|
||||
void FlushQueue(int module)
|
||||
{
|
||||
char *dptr;
|
||||
struct queue_buff_struct *d;
|
||||
int a;
|
||||
extern int errno;
|
||||
|
||||
if((pipeOn[module] <= 0)||(pipeQueue[module] == NULL))
|
||||
return;
|
||||
|
||||
while(pipeQueue[module] != NULL)
|
||||
{
|
||||
d = pipeQueue[module];
|
||||
dptr = (char *)d->data;
|
||||
while(d->done < d->size)
|
||||
{
|
||||
a = write(writePipes[module],&dptr[d->done], d->size - d->done);
|
||||
if(a >=0)
|
||||
d->done += a;
|
||||
/* the write returns EWOULDBLOCK or EAGAIN if the pipe is full.
|
||||
* (This is non-blocking I/O). SunOS returns EWOULDBLOCK, OSF/1
|
||||
* returns EAGAIN under these conditions. Hopefully other OSes
|
||||
* return one of these values too. Solaris 2 doesn't seem to have
|
||||
* a man page for write(2) (!) */
|
||||
else if ((errno == EWOULDBLOCK)||(errno == EAGAIN)||(errno==EINTR))
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
KillModule(module,123);
|
||||
return;
|
||||
}
|
||||
}
|
||||
DeleteQueueBuff(module);
|
||||
}
|
||||
}
|
48
fvwm/module.h
Normal file
48
fvwm/module.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef MODULE_H
|
||||
#define MODULE_H
|
||||
|
||||
struct queue_buff_struct
|
||||
{
|
||||
struct queue_buff_struct *next;
|
||||
unsigned long *data;
|
||||
int size;
|
||||
int done;
|
||||
};
|
||||
|
||||
extern int npipes;
|
||||
extern int *readPipes;
|
||||
extern int *writePipes;
|
||||
extern struct queue_buff_struct **pipeQueue;
|
||||
|
||||
#define START_FLAG 0xffffffff
|
||||
|
||||
#define M_TOGGLE_PAGING 1
|
||||
#define M_NEW_PAGE 2
|
||||
#define M_NEW_DESK 4
|
||||
#define M_ADD_WINDOW 8
|
||||
#define M_RAISE_WINDOW 16
|
||||
#define M_LOWER_WINDOW 32
|
||||
#define M_CONFIGURE_WINDOW 64
|
||||
#define M_FOCUS_CHANGE 128
|
||||
#define M_DESTROY_WINDOW 256
|
||||
#define M_ICONIFY 512
|
||||
#define M_DEICONIFY 1024
|
||||
#define M_WINDOW_NAME 2048
|
||||
#define M_ICON_NAME 4096
|
||||
#define M_RES_CLASS 8192
|
||||
#define M_RES_NAME 16384
|
||||
#define M_END_WINDOWLIST 32768
|
||||
#define M_ICON_LOCATION 65536
|
||||
#define M_MAP 131072
|
||||
#define MAX_MESSAGES 18
|
||||
#define MAX_MASK 262143
|
||||
|
||||
#define HEADER_SIZE 3
|
||||
#define MAX_PACKET_SIZE 27
|
||||
#define MAX_BODY_SIZE (MAX_PACKET_SIZE - HEADER_SIZE)
|
||||
|
||||
|
||||
#endif /* MODULE_H */
|
||||
|
||||
|
||||
|
503
fvwm/move.c
Normal file
503
fvwm/move.c
Normal file
@ -0,0 +1,503 @@
|
||||
/*
|
||||
* 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
|
||||
****************************************************************************/
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* code for moving windows
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <X11/keysym.h>
|
||||
#include "fvwm.h"
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
#include "module.h"
|
||||
|
||||
extern XEvent Event;
|
||||
extern int menuFromFrameOrWindowOrTitlebar;
|
||||
Bool NeedToResizeToo;
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Start a window move operation
|
||||
*
|
||||
****************************************************************************/
|
||||
void move_window(XEvent *eventp,Window w,FvwmWindow *tmp_win,int context,
|
||||
int val1, int val2, int val1_unit,int val2_unit)
|
||||
{
|
||||
int FinalX, FinalY;
|
||||
|
||||
/* gotta have a window */
|
||||
if(tmp_win == NULL)
|
||||
return;
|
||||
|
||||
w = tmp_win->frame;
|
||||
if(tmp_win->flags & ICONIFIED)
|
||||
{
|
||||
if(tmp_win->icon_pixmap_w != None)
|
||||
{
|
||||
XUnmapWindow(dpy,tmp_win->icon_w);
|
||||
w = tmp_win->icon_pixmap_w;
|
||||
}
|
||||
else
|
||||
w = tmp_win->icon_w;
|
||||
}
|
||||
|
||||
if((val1 !=0)||(val2 != 0))
|
||||
{
|
||||
FinalX = val1*val1_unit/100;
|
||||
FinalY = val2*val2_unit/100;
|
||||
}
|
||||
else
|
||||
InteractiveMove(&w,tmp_win,&FinalX,&FinalY,eventp);
|
||||
|
||||
if (w == tmp_win->frame)
|
||||
{
|
||||
SetupFrame (tmp_win, FinalX, FinalY,
|
||||
tmp_win->frame_width, tmp_win->frame_height,FALSE);
|
||||
}
|
||||
else /* icon window */
|
||||
{
|
||||
tmp_win->flags |= ICON_MOVED;
|
||||
tmp_win->icon_x_loc = FinalX ;
|
||||
tmp_win->icon_xl_loc = FinalX -
|
||||
(tmp_win->icon_w_width - tmp_win->icon_p_width)/2;
|
||||
tmp_win->icon_y_loc = FinalY;
|
||||
Broadcast(M_ICON_LOCATION,7,tmp_win->w,tmp_win->frame,
|
||||
(unsigned long)tmp_win,
|
||||
tmp_win->icon_x_loc,tmp_win->icon_y_loc,
|
||||
tmp_win->icon_w_width, tmp_win->icon_w_height
|
||||
+tmp_win->icon_p_height);
|
||||
XMoveWindow(dpy,tmp_win->icon_w,
|
||||
tmp_win->icon_xl_loc, FinalY+tmp_win->icon_p_height);
|
||||
if(tmp_win->icon_pixmap_w != None)
|
||||
{
|
||||
XMapWindow(dpy,tmp_win->icon_w);
|
||||
XMoveWindow(dpy, tmp_win->icon_pixmap_w, tmp_win->icon_x_loc,FinalY);
|
||||
XMapWindow(dpy,w);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifndef NO_PAGER
|
||||
RedrawPager();
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Move the rubberband around, return with the new window location
|
||||
*
|
||||
****************************************************************************/
|
||||
void moveLoop(FvwmWindow *tmp_win, int XOffset, int YOffset, int Width,
|
||||
int Height, int *FinalX, int *FinalY,Bool opaque_move,
|
||||
Bool AddWindow)
|
||||
{
|
||||
Bool finished = False;
|
||||
Bool done;
|
||||
int xl,yt,delta_x,delta_y;
|
||||
#ifndef NO_PAGER
|
||||
unsigned int pagerwidth,pagerheight;
|
||||
int ww,wh;
|
||||
int wx,wy;
|
||||
int MaxH,MaxW;
|
||||
int last_x = -10000, last_y = -10000;
|
||||
|
||||
#endif
|
||||
XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,&xl, &yt,
|
||||
&JunkX, &JunkY, &JunkMask);
|
||||
xl += XOffset;
|
||||
yt += YOffset;
|
||||
|
||||
if(((!opaque_move)&&(!(Scr.flags & MWMMenus)))||(AddWindow))
|
||||
MoveOutline(Scr.Root, xl, yt, Width,Height);
|
||||
|
||||
DisplayPosition(tmp_win,xl+Scr.Vx,yt+Scr.Vy,True);
|
||||
|
||||
while (!finished)
|
||||
{
|
||||
/* block until there is an interesting event */
|
||||
XMaskEvent(dpy, ButtonPressMask | ButtonReleaseMask | KeyPressMask |
|
||||
PointerMotionMask | ButtonMotionMask | ExposureMask, &Event);
|
||||
StashEventTime(&Event);
|
||||
|
||||
/* discard any extra motion events before a logical release */
|
||||
if (Event.type == MotionNotify)
|
||||
{
|
||||
while(XCheckMaskEvent(dpy, PointerMotionMask | ButtonMotionMask |
|
||||
ButtonPressMask |ButtonRelease, &Event))
|
||||
{
|
||||
StashEventTime(&Event);
|
||||
if(Event.type == ButtonRelease) break;
|
||||
}
|
||||
}
|
||||
|
||||
done = FALSE;
|
||||
/* Handle a limited number of key press events to allow mouseless
|
||||
* operation */
|
||||
if(Event.type == KeyPress)
|
||||
Keyboard_shortcuts(&Event,ButtonRelease);
|
||||
switch(Event.type)
|
||||
{
|
||||
case KeyPress:
|
||||
done = TRUE;
|
||||
break;
|
||||
case ButtonPress:
|
||||
XAllowEvents(dpy,ReplayPointer,CurrentTime);
|
||||
if(((Event.xbutton.button == 2)&&(!(Scr.flags & MWMMenus)))||
|
||||
((Event.xbutton.button == 1)&&(Scr.flags & MWMMenus)&&
|
||||
(Event.xbutton.state & ShiftMask)))
|
||||
{
|
||||
NeedToResizeToo = True;
|
||||
/* Fallthrough to button-release */
|
||||
}
|
||||
else
|
||||
{
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
case ButtonRelease:
|
||||
if(!opaque_move)
|
||||
MoveOutline(Scr.Root, 0, 0, 0, 0);
|
||||
xl = Event.xmotion.x_root + XOffset;
|
||||
yt = Event.xmotion.y_root + YOffset;
|
||||
|
||||
/* Resist moving windows over the edge of the screen! */
|
||||
if(((xl + Width) >= Scr.MyDisplayWidth)&&
|
||||
((xl + Width) < Scr.MyDisplayWidth+Scr.MoveResistance))
|
||||
xl = Scr.MyDisplayWidth - Width - tmp_win->bw;
|
||||
if((xl <= 0)&&(xl > -Scr.MoveResistance))
|
||||
xl = 0;
|
||||
if(((yt + Height) >= Scr.MyDisplayHeight)&&
|
||||
((yt + Height) < Scr.MyDisplayHeight+Scr.MoveResistance))
|
||||
yt = Scr.MyDisplayHeight - Height - tmp_win->bw;
|
||||
if((yt <= 0)&&(yt > -Scr.MoveResistance))
|
||||
yt = 0;
|
||||
|
||||
*FinalX = xl;
|
||||
*FinalY = yt;
|
||||
|
||||
done = TRUE;
|
||||
finished = TRUE;
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
/* update location of the pager_view window */
|
||||
#ifndef NO_PAGER
|
||||
if((Scr.FvwmPager != NULL)&&
|
||||
(xl < Scr.FvwmPager->frame_x + Scr.FvwmPager->frame_width)&&
|
||||
(xl+Width > Scr.FvwmPager->frame_x)&&
|
||||
(yt < Scr.FvwmPager->frame_y + Scr.FvwmPager->frame_height)&&
|
||||
(yt+ Height > Scr.FvwmPager->frame_y)&&(!opaque_move))
|
||||
MoveOutline(Scr.Root,0,0,0,0);
|
||||
#endif
|
||||
xl = Event.xmotion.x_root;
|
||||
yt = Event.xmotion.y_root;
|
||||
HandlePaging(Scr.MyDisplayWidth,Scr.MyDisplayHeight,&xl,&yt,
|
||||
&delta_x,&delta_y,False);
|
||||
/* redraw the rubberband */
|
||||
xl += XOffset;
|
||||
yt += YOffset;
|
||||
|
||||
/* Resist moving windows over the edge of the screen! */
|
||||
if(((xl + Width) >= Scr.MyDisplayWidth)&&
|
||||
((xl + Width) < Scr.MyDisplayWidth+Scr.MoveResistance))
|
||||
xl = Scr.MyDisplayWidth - Width - tmp_win->bw;
|
||||
if((xl <= 0)&&(xl > -Scr.MoveResistance))
|
||||
xl = 0;
|
||||
if(((yt + Height) >= Scr.MyDisplayHeight)&&
|
||||
((yt + Height) < Scr.MyDisplayHeight+Scr.MoveResistance))
|
||||
yt = Scr.MyDisplayHeight - Height - tmp_win->bw;
|
||||
if((yt <= 0)&&(yt > -Scr.MoveResistance))
|
||||
yt = 0;
|
||||
|
||||
#ifndef NO_PAGER
|
||||
if(Scr.FvwmPager)
|
||||
{
|
||||
pagerwidth = Scr.FvwmPager->frame_width -
|
||||
2*Scr.FvwmPager->boundary_width;
|
||||
pagerheight = Scr.FvwmPager->frame_height -
|
||||
Scr.FvwmPager->title_height - 2*Scr.FvwmPager->boundary_width;
|
||||
|
||||
MaxW = Scr.VxMax + Scr.MyDisplayWidth;
|
||||
MaxH = Scr.VyMax + Scr.MyDisplayHeight;
|
||||
|
||||
if(!(tmp_win->flags & STICKY)&&
|
||||
(!(tmp_win->flags&ICONIFIED)||
|
||||
(!(tmp_win->flags&SUPPRESSICON)))&&
|
||||
(!(tmp_win->flags&ICONIFIED)||(!(Scr.flags & StickyIcons))))
|
||||
{
|
||||
/* show the actual window */
|
||||
wx = (xl + Scr.Vx)*(int)pagerwidth/MaxW;
|
||||
wy = (yt + Scr.Vy)*(int)pagerheight/MaxH;
|
||||
if((last_x - wx >= 2)||(last_x - wx <= -2)||
|
||||
(last_y - wy >= 2)||(last_y - wy <= -2))
|
||||
{
|
||||
ww = Width*(int)pagerwidth/MaxW;
|
||||
wh = Height*(int)pagerheight/MaxH;
|
||||
if(ww<2)ww=2;
|
||||
if(wh<2)wh=2;
|
||||
XMoveResizeWindow(dpy,
|
||||
tmp_win->pager_view, wx, wy, ww, wh);
|
||||
last_x = wx;
|
||||
last_y = wy;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!opaque_move)
|
||||
MoveOutline(Scr.Root, xl, yt, Width,Height);
|
||||
else
|
||||
{
|
||||
if (tmp_win->flags & ICONIFIED)
|
||||
{
|
||||
tmp_win->icon_x_loc = xl ;
|
||||
tmp_win->icon_xl_loc = xl -
|
||||
(tmp_win->icon_w_width - tmp_win->icon_p_width)/2;
|
||||
tmp_win->icon_y_loc = yt;
|
||||
if(tmp_win->icon_pixmap_w != None)
|
||||
XMoveWindow (dpy, tmp_win->icon_pixmap_w,
|
||||
tmp_win->icon_x_loc,yt);
|
||||
else if (tmp_win->icon_w != None)
|
||||
XMoveWindow(dpy, tmp_win->icon_w,tmp_win->icon_xl_loc,
|
||||
yt+tmp_win->icon_p_height);
|
||||
|
||||
}
|
||||
else
|
||||
XMoveWindow(dpy,tmp_win->frame,xl,yt);
|
||||
}
|
||||
DisplayPosition(tmp_win,xl+Scr.Vx,yt+Scr.Vy,False);
|
||||
done = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(!done)
|
||||
{
|
||||
if(!opaque_move)
|
||||
MoveOutline(Scr.Root,0,0,0,0);
|
||||
DispatchEvent();
|
||||
if(!opaque_move)
|
||||
MoveOutline(Scr.Root, xl, yt, Width, Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* DisplayPosition - display the position in the dimensions window
|
||||
*
|
||||
* Inputs:
|
||||
* tmp_win - the current fvwm window
|
||||
* x, y - position of the window
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
void DisplayPosition (FvwmWindow *tmp_win, int x, int y,int Init)
|
||||
{
|
||||
char str [100];
|
||||
int offset;
|
||||
|
||||
(void) sprintf (str, " %+-4d %+-4d ", x, y);
|
||||
if(Init)
|
||||
{
|
||||
XClearWindow(dpy,Scr.SizeWindow);
|
||||
if(Scr.d_depth >= 2)
|
||||
RelieveWindow(tmp_win,Scr.SizeWindow,0,0,
|
||||
Scr.SizeStringWidth+ SIZE_HINDENT*2,
|
||||
Scr.StdFont.height + SIZE_VINDENT*2,
|
||||
Scr.StdReliefGC,Scr.StdShadowGC, FULL_HILITE);
|
||||
}
|
||||
else
|
||||
{
|
||||
XClearArea(dpy,Scr.SizeWindow,SIZE_HINDENT,SIZE_VINDENT,Scr.SizeStringWidth,
|
||||
Scr.StdFont.height,False);
|
||||
}
|
||||
|
||||
offset = (Scr.SizeStringWidth + SIZE_HINDENT*2
|
||||
- XTextWidth(Scr.StdFont.font,str,strlen(str)))/2;
|
||||
XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC,
|
||||
offset,
|
||||
Scr.StdFont.font->ascent + SIZE_VINDENT,
|
||||
str, strlen(str));
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* For menus, move, and resize operations, we can effect keyboard
|
||||
* shortcuts by warping the pointer.
|
||||
*
|
||||
****************************************************************************/
|
||||
void Keyboard_shortcuts(XEvent *Event, int ReturnEvent)
|
||||
{
|
||||
int x,y,x_root,y_root;
|
||||
int move_size,x_move,y_move;
|
||||
KeySym keysym;
|
||||
|
||||
/* Pick the size of the cursor movement */
|
||||
move_size = Scr.EntryHeight;
|
||||
if(Event->xkey.state & ControlMask)
|
||||
move_size = 1;
|
||||
if(Event->xkey.state & ShiftMask)
|
||||
move_size = 100;
|
||||
|
||||
keysym = XLookupKeysym(&Event->xkey,0);
|
||||
|
||||
x_move = 0;
|
||||
y_move = 0;
|
||||
switch(keysym)
|
||||
{
|
||||
case XK_Up:
|
||||
case XK_k:
|
||||
case XK_p:
|
||||
y_move = -move_size;
|
||||
break;
|
||||
case XK_Down:
|
||||
case XK_n:
|
||||
case XK_j:
|
||||
y_move = move_size;
|
||||
break;
|
||||
case XK_Left:
|
||||
case XK_b:
|
||||
case XK_h:
|
||||
x_move = -move_size;
|
||||
break;
|
||||
case XK_Right:
|
||||
case XK_f:
|
||||
case XK_l:
|
||||
x_move = move_size;
|
||||
break;
|
||||
case XK_Return:
|
||||
case XK_space:
|
||||
/* beat up the event */
|
||||
Event->type = ReturnEvent;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
XQueryPointer( dpy, Scr.Root, &JunkRoot, &Event->xany.window,
|
||||
&x_root, &y_root, &x, &y, &JunkMask);
|
||||
|
||||
if((x_move != 0)||(y_move != 0))
|
||||
{
|
||||
/* beat up the event */
|
||||
XWarpPointer(dpy, None, Scr.Root, 0, 0, 0, 0, x_root+x_move,
|
||||
y_root+y_move);
|
||||
|
||||
/* beat up the event */
|
||||
Event->type = MotionNotify;
|
||||
Event->xkey.x += x_move;
|
||||
Event->xkey.y += y_move;
|
||||
Event->xkey.x_root += x_move;
|
||||
Event->xkey.y_root += y_move;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void InteractiveMove(Window *win, FvwmWindow *tmp_win, int *FinalX, int *FinalY, XEvent *eventp)
|
||||
{
|
||||
extern int Stashed_X, Stashed_Y;
|
||||
int origDragX,origDragY,DragX, DragY, DragWidth, DragHeight;
|
||||
int XOffset, YOffset;
|
||||
Window w;
|
||||
|
||||
Bool opaque_move = False;
|
||||
#ifndef NO_PAGER
|
||||
extern Bool pagerOn;
|
||||
#endif
|
||||
|
||||
|
||||
InstallRootColormap();
|
||||
if (menuFromFrameOrWindowOrTitlebar)
|
||||
{
|
||||
/* warp the pointer to the cursor position from before menu appeared*/
|
||||
XWarpPointer(dpy, None, Scr.Root, 0, 0, 0, 0, Stashed_X,Stashed_Y);
|
||||
XFlush(dpy);
|
||||
}
|
||||
|
||||
|
||||
DragX = eventp->xbutton.x_root;
|
||||
DragY = eventp->xbutton.y_root;
|
||||
/* If this is left commented out, then the move starts from the button press
|
||||
* location instead of the current location, which seems to be an
|
||||
* improvement */
|
||||
/* XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
|
||||
&DragX, &DragY, &JunkX, &JunkY, &JunkMask);*/
|
||||
|
||||
if(!GrabEm(MOVE))
|
||||
{
|
||||
XBell(dpy,Scr.screen);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef NO_PAGER
|
||||
pagerOn = False;
|
||||
#endif
|
||||
|
||||
w = tmp_win->frame;
|
||||
|
||||
if(tmp_win->flags & ICONIFIED)
|
||||
if(tmp_win->icon_pixmap_w != None)
|
||||
{
|
||||
XUnmapWindow(dpy,tmp_win->icon_w);
|
||||
w = tmp_win->icon_pixmap_w;
|
||||
}
|
||||
else
|
||||
w = tmp_win->icon_w;
|
||||
|
||||
*win = w;
|
||||
|
||||
XGetGeometry(dpy, w, &JunkRoot, &origDragX, &origDragY,
|
||||
(unsigned int *)&DragWidth, (unsigned int *)&DragHeight,
|
||||
&JunkBW, &JunkDepth);
|
||||
|
||||
if(DragWidth*DragHeight <
|
||||
(Scr.OpaqueSize*Scr.MyDisplayWidth*Scr.MyDisplayHeight)/100)
|
||||
opaque_move = True;
|
||||
else
|
||||
XGrabServer(dpy);
|
||||
|
||||
if((!opaque_move)&&(tmp_win->flags & ICONIFIED))
|
||||
XUnmapWindow(dpy,w);
|
||||
|
||||
DragWidth += JunkBW;
|
||||
DragHeight+= JunkBW;
|
||||
XOffset = origDragX - DragX;
|
||||
YOffset = origDragY - DragY;
|
||||
XMapRaised(dpy,Scr.SizeWindow);
|
||||
moveLoop(tmp_win, XOffset,YOffset,DragWidth,DragHeight, FinalX,FinalY,
|
||||
opaque_move,False);
|
||||
|
||||
XUnmapWindow(dpy,Scr.SizeWindow);
|
||||
UninstallRootColormap();
|
||||
|
||||
if(!opaque_move)
|
||||
XUngrabServer(dpy);
|
||||
UngrabEm();
|
||||
|
||||
|
||||
#ifndef NO_PAGER
|
||||
pagerOn = True;
|
||||
#endif
|
||||
|
||||
}
|
815
fvwm/pager.c
Normal file
815
fvwm/pager.c
Normal file
@ -0,0 +1,815 @@
|
||||
/****************************************************************************
|
||||
* This module is all new
|
||||
* by Rob Nation
|
||||
****************************************************************************/
|
||||
/***********************************************************************
|
||||
*
|
||||
* fvwm pager handling code
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include "fvwm.h"
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
#include "module.h"
|
||||
|
||||
extern XEvent Event;
|
||||
|
||||
XGCValues Globalgcv;
|
||||
unsigned long Globalgcm;
|
||||
|
||||
void DrawPartitionLines(void);
|
||||
FvwmWindow *FindCounterpart(Window target);
|
||||
Bool pagerOn = True;
|
||||
Bool EnablePagerRedraw = True;
|
||||
Bool DoHandlePageing = True;
|
||||
|
||||
/****************************************************************************
|
||||
* Cause the pager window to be re-drawn
|
||||
*
|
||||
* Trying to get clever - re-draw the pager by causing an expose event,
|
||||
* the really redraw only when an expose arrives. Advantage is that the
|
||||
* number of re-draws will be minimized
|
||||
***************************************************************************/
|
||||
void RedrawPager()
|
||||
{
|
||||
#ifndef NO_PAGER
|
||||
if((Scr.FvwmPager)&&(EnablePagerRedraw))
|
||||
XClearArea(dpy,Scr.Pager_w, 0, 0, Scr.FvwmPager->frame_width,
|
||||
Scr.FvwmPager->frame_height,True);
|
||||
#endif
|
||||
}
|
||||
|
||||
void ReallyRedrawPager()
|
||||
{
|
||||
#ifndef NO_PAGER
|
||||
FvwmWindow *t;
|
||||
Pixel TextColor,BackColor;
|
||||
|
||||
if(!Scr.FvwmPager)
|
||||
return;
|
||||
|
||||
flush_expose (Scr.Pager_w);
|
||||
flush_expose (Scr.CPagerWin);
|
||||
|
||||
if(Scr.PagerFont.height > 0)
|
||||
{
|
||||
if(Scr.Hilite != NULL)
|
||||
{
|
||||
if(!(Scr.Hilite->flags & STICKY)&& (!(Scr.Hilite->flags&ICONIFIED)||(!(Scr.Hilite->flags & SUPPRESSICON)))&&
|
||||
(!(Scr.Hilite->flags&ICONIFIED)||(!(Scr.flags & StickyIcons)))&&
|
||||
(Scr.Hilite->icon_name != NULL))
|
||||
{
|
||||
TextColor = Scr.HiColors.fore;
|
||||
BackColor = Scr.HiColors.back;
|
||||
NewFontAndColor(Scr.PagerFont.font->fid,TextColor,BackColor);
|
||||
flush_expose(Scr.Hilite->pager_view);
|
||||
XDrawImageString (dpy, Scr.Hilite->pager_view, Scr.FontGC,
|
||||
2,Scr.PagerFont.y+2,
|
||||
Scr.Hilite->icon_name, strlen(Scr.Hilite->icon_name));
|
||||
}
|
||||
}
|
||||
|
||||
TextColor = Scr.StdColors.fore;
|
||||
BackColor = Scr.StdColors.back;
|
||||
NewFontAndColor(Scr.PagerFont.font->fid,TextColor,BackColor);
|
||||
|
||||
|
||||
for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
|
||||
{
|
||||
if(t != Scr.Hilite)
|
||||
{
|
||||
if(!(t->flags & STICKY)&&
|
||||
(!(t->flags & ICONIFIED)||(!(t->flags & SUPPRESSICON)))&&
|
||||
(!(t->flags & ICONIFIED)||(!(Scr.flags & StickyIcons)))&&
|
||||
(t->icon_name != NULL))
|
||||
{
|
||||
flush_expose(t->pager_view);
|
||||
XDrawImageString (dpy, t->pager_view, Scr.FontGC,
|
||||
2,Scr.PagerFont.y+2,
|
||||
t->icon_name, strlen(t->icon_name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DrawPartitionLines();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef NO_PAGER
|
||||
void DrawPartitionLines(void)
|
||||
{
|
||||
int y, y1, y2, x, x1, x2;
|
||||
int MaxW,MaxH,width,height;
|
||||
|
||||
MaxW = Scr.VxMax + Scr.MyDisplayWidth;
|
||||
MaxH = Scr.VyMax + Scr.MyDisplayHeight;
|
||||
|
||||
width = Scr.FvwmPager->frame_width - 2*Scr.FvwmPager->boundary_width;
|
||||
height = Scr.FvwmPager->frame_height - Scr.FvwmPager->title_height
|
||||
- 2*Scr.FvwmPager->boundary_width;
|
||||
|
||||
x = Scr.MyDisplayWidth;
|
||||
y1 = 0;
|
||||
y2 = height;
|
||||
while(x < MaxW)
|
||||
{
|
||||
x1 = x*width/MaxW;
|
||||
XDrawLine(dpy,Scr.Pager_w,Scr.NormalGC,x1,y1,x1,y2);
|
||||
x += Scr.MyDisplayWidth;
|
||||
}
|
||||
|
||||
y = Scr.MyDisplayHeight;
|
||||
x1 = 0;
|
||||
x2 = width;
|
||||
while(y < MaxH)
|
||||
{
|
||||
y1 = y*height/MaxH;
|
||||
XDrawLine(dpy,Scr.Pager_w,Scr.NormalGC,x1,y1,x2,y1);
|
||||
y += Scr.MyDisplayHeight;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void SwitchPages(Bool align, Bool ChangeFocus)
|
||||
{
|
||||
#ifndef NO_PAGER
|
||||
int x,y;
|
||||
unsigned int width,height;
|
||||
FvwmWindow *tmp_win;
|
||||
Window dumwin;
|
||||
|
||||
if(!Scr.FvwmPager)
|
||||
return;
|
||||
|
||||
XTranslateCoordinates (dpy, Event.xbutton.window, Scr.Pager_w,
|
||||
Event.xbutton.x, Event.xbutton.y, &x, &y, &dumwin);
|
||||
|
||||
width = Scr.FvwmPager->frame_width - 2*Scr.FvwmPager->boundary_width;
|
||||
height = Scr.FvwmPager->frame_height - Scr.FvwmPager->title_height
|
||||
- 2*Scr.FvwmPager->boundary_width;
|
||||
|
||||
if(x<0)x=0;
|
||||
if(y<0)y=0;
|
||||
x = x * (Scr.VxMax+Scr.MyDisplayWidth)/width;
|
||||
y = y * (Scr.VyMax+Scr.MyDisplayHeight)/height;
|
||||
if(align)
|
||||
{
|
||||
x = (x/Scr.MyDisplayWidth)*Scr.MyDisplayWidth;
|
||||
y = (y/Scr.MyDisplayHeight)*Scr.MyDisplayHeight;
|
||||
}
|
||||
if(x<0)x=0;
|
||||
if(y<0)y=0;
|
||||
#ifndef NON_VIRTUAL
|
||||
MoveViewport(x,y,True);
|
||||
#endif
|
||||
if((ChangeFocus)&&(Scr.flags & ClickToFocus))
|
||||
{
|
||||
tmp_win = FindCounterpart(Event.xbutton.subwindow);
|
||||
if(tmp_win)
|
||||
{
|
||||
RaiseWindow(tmp_win);
|
||||
SetFocus(tmp_win->w,tmp_win);
|
||||
ClearCirculatedFlag();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void RaiseWindow(FvwmWindow *t)
|
||||
{
|
||||
FvwmWindow *t2;
|
||||
int count, i;
|
||||
Window *wins;
|
||||
SetTimer(0);
|
||||
|
||||
/* raise the target, at least */
|
||||
count = 1;
|
||||
Broadcast(M_RAISE_WINDOW,3,t->w,t->frame,(unsigned long)t,0,0,0,0);
|
||||
|
||||
for (t2 = Scr.FvwmRoot.next; t2 != NULL; t2 = t2->next)
|
||||
{
|
||||
if(t2->flags & ONTOP)
|
||||
count++;
|
||||
if((t2->flags & TRANSIENT) &&(t2->transientfor == t->w)&&
|
||||
(t2 != t))
|
||||
{
|
||||
#ifndef NO_PAGER
|
||||
if((Scr.Pager_w)&& !(t2->flags & STICKY))
|
||||
XRaiseWindow(dpy,t2->pager_view);
|
||||
#endif
|
||||
count++;
|
||||
Broadcast(M_RAISE_WINDOW,3,t2->w,t2->frame,(unsigned long) t2,
|
||||
0,0,0,0);
|
||||
if ((t2->flags & ICONIFIED)&&(!(t2->flags & SUPPRESSICON)))
|
||||
{
|
||||
count += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((t->flags & ICONIFIED)&&(!(t->flags & SUPPRESSICON)))
|
||||
{
|
||||
count += 2;
|
||||
}
|
||||
|
||||
#ifndef NO_PAGER
|
||||
if((Scr.Pager_w)&& !(t->flags & STICKY))
|
||||
{
|
||||
XRaiseWindow(dpy,t->pager_view);
|
||||
}
|
||||
#endif
|
||||
|
||||
wins = (Window *)safemalloc(count*sizeof(Window));
|
||||
|
||||
i=0;
|
||||
|
||||
/* ONTOP windows on top */
|
||||
for (t2 = Scr.FvwmRoot.next; t2 != NULL; t2 = t2->next)
|
||||
{
|
||||
if(t2->flags & ONTOP)
|
||||
{
|
||||
Broadcast(M_RAISE_WINDOW,3,t2->w,t2->frame,(unsigned long) t2,
|
||||
0,0,0,0);
|
||||
wins[i++] = t2->frame;
|
||||
}
|
||||
}
|
||||
|
||||
/* now raise transients */
|
||||
#ifndef DONT_RAISE_TRANSIENTS
|
||||
for (t2 = Scr.FvwmRoot.next; t2 != NULL; t2 = t2->next)
|
||||
{
|
||||
if((t2->flags & TRANSIENT) &&(t2->transientfor == t->w)&&
|
||||
(t2 != t)&&(!(t2->flags & ONTOP)))
|
||||
{
|
||||
wins[i++] = t2->frame;
|
||||
if ((t2->flags & ICONIFIED)&&(!(t2->flags & SUPPRESSICON)))
|
||||
{
|
||||
if(!(t2->flags & NOICON_TITLE))wins[i++] = t2->icon_w;
|
||||
wins[i++] = t2->icon_pixmap_w;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if ((t->flags & ICONIFIED)&&(!(t->flags & SUPPRESSICON)))
|
||||
{
|
||||
if(!(t->flags & NOICON_TITLE))wins[i++] = t->icon_w;
|
||||
wins[i++] = t->icon_pixmap_w;
|
||||
}
|
||||
if(!(t->flags & ONTOP))
|
||||
wins[i++] = t->frame;
|
||||
if(!(t->flags & ONTOP))
|
||||
Scr.LastWindowRaised = t;
|
||||
|
||||
if(i > 0)
|
||||
XRaiseWindow(dpy,wins[0]);
|
||||
|
||||
XRestackWindows(dpy,wins,i);
|
||||
free(wins);
|
||||
|
||||
RedrawPager();
|
||||
#ifndef NON_VIRTUAL
|
||||
raisePanFrames();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void LowerWindow(FvwmWindow *t)
|
||||
{
|
||||
XLowerWindow(dpy,t->frame);
|
||||
|
||||
SetTimer(0);
|
||||
|
||||
Broadcast(M_LOWER_WINDOW,3,t->w,t->frame,(unsigned long)t,0,0,0,0);
|
||||
#ifndef NO_PAGER
|
||||
if((Scr.Pager_w)&& !(t->flags & STICKY))
|
||||
XLowerWindow(dpy,t->pager_view);
|
||||
#endif
|
||||
|
||||
if((t->flags & ICONIFIED)&&(!(t->flags & SUPPRESSICON)))
|
||||
{
|
||||
XLowerWindow(dpy, t->icon_w);
|
||||
XLowerWindow(dpy, t->icon_pixmap_w);
|
||||
}
|
||||
Scr.LastWindowRaised = (FvwmWindow *)0;
|
||||
#ifndef NO_PAGER
|
||||
if(Scr.CPagerWin)
|
||||
XLowerWindow(dpy,Scr.CPagerWin);
|
||||
#endif
|
||||
RedrawPager();
|
||||
}
|
||||
|
||||
|
||||
void PagerMoveWindow()
|
||||
{
|
||||
#ifndef NO_PAGER
|
||||
FvwmWindow *tmp_win;
|
||||
unsigned int width, height;
|
||||
int Xoff,Yoff,x,y,MaxW,MaxH,xl,yt,xl1,yt1;
|
||||
Window target;
|
||||
Bool done,finished = False;
|
||||
/* I tried to implement a feature so that when windows which could be
|
||||
* opaque moved in a normal move would get the full size windows moved in
|
||||
* conjunction with the pager version of the window, but it seems to
|
||||
* be buggy on some machines */
|
||||
#ifdef BROKEN_STUFF
|
||||
Bool OpaqueMove = False;
|
||||
int dwidth,dheight;
|
||||
#endif
|
||||
if(!Scr.FvwmPager)
|
||||
return;
|
||||
|
||||
|
||||
EnablePagerRedraw = False;
|
||||
target = Event.xbutton.subwindow;
|
||||
tmp_win = FindCounterpart(target);
|
||||
|
||||
if(tmp_win == NULL)
|
||||
return;
|
||||
|
||||
|
||||
MaxW = Scr.VxMax + Scr.MyDisplayWidth;
|
||||
MaxH = Scr.VyMax + Scr.MyDisplayHeight;
|
||||
|
||||
width = Scr.FvwmPager->frame_width - 2*Scr.FvwmPager->boundary_width;
|
||||
height = Scr.FvwmPager->frame_height - Scr.FvwmPager->title_height
|
||||
- 2*Scr.FvwmPager->boundary_width;
|
||||
|
||||
XQueryPointer(dpy, target, &JunkRoot, &JunkChild,
|
||||
&JunkX, &JunkY, &Xoff, &Yoff, &JunkMask);
|
||||
|
||||
XQueryPointer(dpy, Scr.Pager_w, &JunkRoot, &JunkChild,
|
||||
&JunkX, &JunkY, &xl, &yt, &JunkMask);
|
||||
if(xl<0)xl=0;
|
||||
if(yt<0)yt=0;
|
||||
if(xl>width)xl=width;
|
||||
if(yt>height)yt=height;
|
||||
xl -= Xoff;
|
||||
yt -= Yoff;
|
||||
xl1=xl;
|
||||
yt1=yt;
|
||||
|
||||
while (!finished)
|
||||
{
|
||||
/* block until there is an interesting event */
|
||||
XMaskEvent(dpy, ButtonPressMask | ButtonReleaseMask | KeyPressMask |
|
||||
PointerMotionMask | ButtonMotionMask | ExposureMask |
|
||||
VisibilityChangeMask, &Event);
|
||||
StashEventTime(&Event);
|
||||
|
||||
if (Event.type == MotionNotify)
|
||||
/* discard any extra motion events before a logical release */
|
||||
while(XCheckMaskEvent(dpy, PointerMotionMask | ButtonMotionMask |
|
||||
ButtonRelease, &Event))
|
||||
{
|
||||
StashEventTime(&Event);
|
||||
if(Event.type == ButtonRelease) break;
|
||||
}
|
||||
|
||||
done = FALSE;
|
||||
|
||||
/* Handle a limited number of key press events to allow mouseless
|
||||
* operation */
|
||||
if(Event.type == KeyPress)
|
||||
Keyboard_shortcuts(&Event,ButtonRelease);
|
||||
switch(Event.type)
|
||||
{
|
||||
case ButtonPress:
|
||||
case KeyPress:
|
||||
/* throw away enter and leave events until release */
|
||||
done = TRUE;
|
||||
break;
|
||||
case ButtonRelease:
|
||||
XQueryPointer(dpy, Scr.Pager_w, &JunkRoot, &JunkChild,
|
||||
&JunkX, &JunkY, &xl, &yt, &JunkMask);
|
||||
if(xl<0)xl=0;
|
||||
if(yt<0)yt=0;
|
||||
if(xl>width)xl=width;
|
||||
if(yt>height)yt=height;
|
||||
xl -= Xoff;
|
||||
yt -= Yoff;
|
||||
done = TRUE;
|
||||
finished = TRUE;
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
XQueryPointer(dpy, Scr.Pager_w, &JunkRoot, &JunkChild,
|
||||
&JunkX, &JunkY, &xl, &yt, &JunkMask);
|
||||
if(xl<0)xl=0;
|
||||
if(yt<0)yt=0;
|
||||
if(xl>width)xl=width;
|
||||
if(yt>height)yt=height;
|
||||
|
||||
/* redraw the rubberband */
|
||||
xl -= Xoff;
|
||||
yt -= Yoff;
|
||||
|
||||
done = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(!done)
|
||||
{
|
||||
DispatchEvent();
|
||||
}
|
||||
XMoveWindow(dpy, target,xl, yt);
|
||||
DrawPartitionLines();
|
||||
|
||||
}
|
||||
|
||||
x = xl*MaxW/(int)width - Scr.Vx;
|
||||
y = yt*MaxH/(int)height - Scr.Vy;
|
||||
|
||||
MoveResizePagerView(tmp_win);
|
||||
if((xl1!=xl)||(yt1 != yt))
|
||||
{
|
||||
if((tmp_win->flags & ICONIFIED)&&(!(tmp_win->flags & SUPPRESSICON)))
|
||||
{
|
||||
tmp_win->icon_x_loc = x;
|
||||
tmp_win->icon_xl_loc = x -
|
||||
(tmp_win->icon_w_width - tmp_win->icon_p_width)/2;
|
||||
tmp_win->icon_y_loc = y;
|
||||
XMoveWindow (dpy, tmp_win->icon_w, tmp_win->icon_xl_loc, y+tmp_win->icon_p_height);
|
||||
|
||||
if(tmp_win->icon_pixmap_w != None)
|
||||
XMoveWindow (dpy, tmp_win->icon_pixmap_w, x,y);
|
||||
|
||||
tmp_win->flags |= ICON_MOVED;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/* show the actual window */
|
||||
SetupFrame(tmp_win,x,y, tmp_win->frame_width,tmp_win->frame_height,FALSE);
|
||||
}
|
||||
}
|
||||
EnablePagerRedraw = True;
|
||||
RedrawPager();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifndef NO_PAGER
|
||||
FvwmWindow *FindCounterpart(Window target)
|
||||
{
|
||||
FvwmWindow *t,*tmp_win=0;
|
||||
|
||||
tmp_win = NULL;
|
||||
for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
|
||||
{
|
||||
if(t->pager_view == target)
|
||||
{
|
||||
tmp_win = t;
|
||||
}
|
||||
}
|
||||
return tmp_win;
|
||||
}
|
||||
#endif
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* Check to see if the pointer is on the edge of the screen, and scroll/page
|
||||
* if needed
|
||||
***************************************************************************/
|
||||
void HandlePaging(int HorWarpSize, int VertWarpSize, int *xl, int *yt,
|
||||
int *delta_x, int *delta_y,Bool Grab)
|
||||
{
|
||||
#ifndef NON_VIRTUAL
|
||||
int x,y,total;
|
||||
#endif
|
||||
|
||||
*delta_x = 0;
|
||||
*delta_y = 0;
|
||||
|
||||
#ifndef NON_VIRTUAL
|
||||
if (DoHandlePageing)
|
||||
{
|
||||
if((Scr.ScrollResistance >= 10000)||
|
||||
((HorWarpSize ==0)&&(VertWarpSize==0)))
|
||||
return;
|
||||
|
||||
/* need to move the viewport */
|
||||
if(( *xl >= SCROLL_REGION)&&( *xl < Scr.MyDisplayWidth-SCROLL_REGION)&&
|
||||
( *yt >= SCROLL_REGION)&&( *yt < Scr.MyDisplayHeight-SCROLL_REGION))
|
||||
return;
|
||||
|
||||
total = 0;
|
||||
while(total < Scr.ScrollResistance)
|
||||
{
|
||||
sleep_a_little(10000);
|
||||
total+=10;
|
||||
if(XCheckWindowEvent(dpy,Scr.PanFrameTop.win,
|
||||
LeaveWindowMask,&Event))
|
||||
{
|
||||
StashEventTime(&Event);
|
||||
return;
|
||||
}
|
||||
if(XCheckWindowEvent(dpy,Scr.PanFrameBottom.win,
|
||||
LeaveWindowMask,&Event))
|
||||
{
|
||||
StashEventTime(&Event);
|
||||
return;
|
||||
}
|
||||
if(XCheckWindowEvent(dpy,Scr.PanFrameLeft.win,
|
||||
LeaveWindowMask,&Event))
|
||||
{
|
||||
StashEventTime(&Event);
|
||||
return;
|
||||
}
|
||||
if(XCheckWindowEvent(dpy,Scr.PanFrameRight.win,
|
||||
LeaveWindowMask,&Event))
|
||||
{
|
||||
StashEventTime(&Event);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
|
||||
&x, &y, &JunkX, &JunkY, &JunkMask);
|
||||
|
||||
/* Turn off the rubberband if its on */
|
||||
MoveOutline(Scr.Root,0,0,0,0);
|
||||
|
||||
/* Move the viewport */
|
||||
/* and/or move the cursor back to the approximate correct location */
|
||||
/* that is, the same place on the virtual desktop that it */
|
||||
/* started at */
|
||||
if( x<SCROLL_REGION)
|
||||
*delta_x = -HorWarpSize;
|
||||
else if ( x >= Scr.MyDisplayWidth-SCROLL_REGION)
|
||||
*delta_x = HorWarpSize;
|
||||
else
|
||||
*delta_x = 0;
|
||||
if( y<SCROLL_REGION)
|
||||
*delta_y = -VertWarpSize;
|
||||
else if ( y >= Scr.MyDisplayHeight-SCROLL_REGION)
|
||||
*delta_y = VertWarpSize;
|
||||
else
|
||||
*delta_y = 0;
|
||||
|
||||
/* Ouch! lots of bounds checking */
|
||||
if(Scr.Vx + *delta_x < 0)
|
||||
{
|
||||
if (!(Scr.flags & EdgeWrapX ))
|
||||
{
|
||||
*delta_x = -Scr.Vx;
|
||||
*xl = x - *delta_x;
|
||||
}
|
||||
else
|
||||
{
|
||||
*delta_x += Scr.VxMax + Scr.MyDisplayWidth;
|
||||
*xl = x + *delta_x % Scr.MyDisplayWidth + HorWarpSize;
|
||||
}
|
||||
}
|
||||
else if(Scr.Vx + *delta_x > Scr.VxMax)
|
||||
{
|
||||
if (!(Scr.flags & EdgeWrapX))
|
||||
{
|
||||
*delta_x = Scr.VxMax - Scr.Vx;
|
||||
*xl = x - *delta_x;
|
||||
}
|
||||
else
|
||||
{
|
||||
*delta_x -= Scr.VxMax +Scr.MyDisplayWidth;
|
||||
*xl = x + *delta_x % Scr.MyDisplayWidth - HorWarpSize;
|
||||
}
|
||||
}
|
||||
else
|
||||
*xl = x - *delta_x;
|
||||
|
||||
if(Scr.Vy + *delta_y < 0)
|
||||
{
|
||||
if (!(Scr.flags & EdgeWrapY))
|
||||
{
|
||||
*delta_y = -Scr.Vy;
|
||||
*yt = y - *delta_y;
|
||||
}
|
||||
else
|
||||
{
|
||||
*delta_y += Scr.VyMax + Scr.MyDisplayHeight;
|
||||
*yt = y + *delta_y % Scr.MyDisplayHeight + VertWarpSize;
|
||||
}
|
||||
}
|
||||
else if(Scr.Vy + *delta_y > Scr.VyMax)
|
||||
{
|
||||
if (!(Scr.flags & EdgeWrapY))
|
||||
{
|
||||
*delta_y = Scr.VyMax - Scr.Vy;
|
||||
*yt = y - *delta_y;
|
||||
}
|
||||
else
|
||||
{
|
||||
*delta_y -= Scr.VyMax + Scr.MyDisplayHeight;
|
||||
*yt = y + *delta_y % Scr.MyDisplayHeight - VertWarpSize;
|
||||
}
|
||||
}
|
||||
else
|
||||
*yt = y - *delta_y;
|
||||
|
||||
if(*xl <= SCROLL_REGION) *xl = SCROLL_REGION+1;
|
||||
if(*yt <= SCROLL_REGION) *yt = SCROLL_REGION+1;
|
||||
if(*xl >= Scr.MyDisplayWidth - SCROLL_REGION)
|
||||
*xl = Scr.MyDisplayWidth - SCROLL_REGION -1;
|
||||
if(*yt >= Scr.MyDisplayHeight - SCROLL_REGION)
|
||||
*yt = Scr.MyDisplayHeight - SCROLL_REGION -1;
|
||||
|
||||
if((*delta_x != 0)||(*delta_y!=0))
|
||||
{
|
||||
if(Grab)
|
||||
XGrabServer(dpy);
|
||||
XWarpPointer(dpy,None,Scr.Root,0,0,0,0,*xl,*yt);
|
||||
MoveViewport(Scr.Vx + *delta_x,Scr.Vy + *delta_y,False);
|
||||
XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
|
||||
xl, yt, &JunkX, &JunkY, &JunkMask);
|
||||
if(Grab)
|
||||
XUngrabServer(dpy);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MoveResizeViewPortIndicator(void)
|
||||
{
|
||||
#ifndef NO_PAGER
|
||||
int width,height,x1,x2,y1,y2;
|
||||
|
||||
if((Scr.CPagerWin)&&(Scr.FvwmPager))
|
||||
{
|
||||
width = Scr.FvwmPager->frame_width - 2*Scr.FvwmPager->boundary_width;
|
||||
height = Scr.FvwmPager->frame_height - Scr.FvwmPager->title_height
|
||||
- 2*Scr.FvwmPager->boundary_width;
|
||||
x1 = Scr.Vx * width/(Scr.VxMax+Scr.MyDisplayWidth)+1;
|
||||
y1 = Scr.Vy * height/(Scr.VyMax+Scr.MyDisplayHeight)+1;
|
||||
x2 = (Scr.MyDisplayWidth) * width/(Scr.VxMax+Scr.MyDisplayWidth)-1;
|
||||
y2 = (Scr.MyDisplayHeight) * height/(Scr.VyMax+Scr.MyDisplayHeight)-1;
|
||||
if(x1==1)
|
||||
{
|
||||
x1--;
|
||||
x2++;
|
||||
}
|
||||
if(y1==1)
|
||||
{
|
||||
y1--;
|
||||
y2++;
|
||||
}
|
||||
XMoveResizeWindow(dpy,Scr.CPagerWin,x1,y1,x2,y2);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void MoveResizePagerView(FvwmWindow *t)
|
||||
{
|
||||
#ifndef NO_PAGER
|
||||
unsigned int width,height;
|
||||
int ww,wh;
|
||||
int wx,wy;
|
||||
int MaxH,MaxW;
|
||||
|
||||
if((!Scr.FvwmPager)||(!pagerOn))
|
||||
return;
|
||||
|
||||
width = Scr.FvwmPager->frame_width - 2*Scr.FvwmPager->boundary_width;
|
||||
height = Scr.FvwmPager->frame_height - Scr.FvwmPager->title_height
|
||||
- 2*Scr.FvwmPager->boundary_width;
|
||||
|
||||
MaxW = Scr.VxMax + Scr.MyDisplayWidth;
|
||||
MaxH = Scr.VyMax + Scr.MyDisplayHeight;
|
||||
|
||||
if((!(t->flags & STICKY)&&
|
||||
(!(t->flags & ICONIFIED)||(!(t->flags & SUPPRESSICON)))&&
|
||||
(!(t->flags & ICONIFIED)||(!(t->flags & SUPPRESSICON))))&&
|
||||
(!((t->flags & ICONIFIED)&&(t->flags &ICON_UNMAPPED)))&&
|
||||
(t->Desk == Scr.CurrentDesk))
|
||||
{
|
||||
if(t->flags & ICONIFIED)
|
||||
{
|
||||
/* show the icon loc */
|
||||
wx = (t->icon_x_loc + Scr.Vx)*(int)width/MaxW;;
|
||||
wy = (t->icon_y_loc + Scr.Vy)*(int)height/MaxH;
|
||||
ww = t->icon_w_width*(int)width/MaxW;
|
||||
wh = (t->icon_w_height+t->icon_p_height)*(int)height/MaxH;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* show the actual window */
|
||||
wx = (t->frame_x + Scr.Vx)*(int)width/MaxW;
|
||||
wy = (t->frame_y + Scr.Vy)*(int)height/MaxH;
|
||||
ww = t->frame_width*(int)width/MaxW;
|
||||
wh = t->frame_height*(int)height/MaxH;
|
||||
}
|
||||
if(ww<2)ww=2;
|
||||
if(wh<2)wh=2;
|
||||
XMoveResizeWindow(dpy, t->pager_view, wx, wy, ww, wh);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* window is sticky - make sure that the pager_view window is not
|
||||
* visible */
|
||||
XMoveResizeWindow(dpy, t->pager_view, -10, -10, 5, 5);
|
||||
}
|
||||
RedrawPager();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* Initialize_pager - creates the pager window, if needed
|
||||
*
|
||||
* Inputs:
|
||||
* x,y location of the window
|
||||
*
|
||||
***********************************************************************/
|
||||
#ifndef NO_PAGER
|
||||
char *pager_name = "Fvwm Pager";
|
||||
XSizeHints sizehints =
|
||||
{
|
||||
(PMinSize | PResizeInc | PBaseSize | PWinGravity),
|
||||
0, 0, 100, 100, /* x, y, width and height */
|
||||
1, 1, /* Min width and height */
|
||||
0, 0, /* Max width and height */
|
||||
1, 1, /* Width and height increments */
|
||||
{0, 0}, {0, 0}, /* Aspect ratio - not used */
|
||||
1, 1, /* base size */
|
||||
(NorthWestGravity) /* gravity */
|
||||
};
|
||||
|
||||
void initialize_pager(int x, int y)
|
||||
{
|
||||
XTextProperty name;
|
||||
int width,height,window_x,window_y;
|
||||
unsigned long valuemask;
|
||||
XSetWindowAttributes attributes;
|
||||
extern Pixel PagerBackColor;
|
||||
extern Pixel PagerForeColor;
|
||||
|
||||
width = (Scr.VxMax + Scr.MyDisplayWidth)/Scr.VScale;
|
||||
height = (Scr.VyMax + Scr.MyDisplayHeight)/Scr.VScale;
|
||||
|
||||
if(x >=0)
|
||||
window_x = x;
|
||||
else
|
||||
{
|
||||
sizehints.win_gravity = NorthEastGravity;
|
||||
window_x = Scr.MyDisplayWidth - width + x -2;
|
||||
}
|
||||
|
||||
if(y >=0)
|
||||
window_y = y;
|
||||
else
|
||||
{
|
||||
window_y = Scr.MyDisplayHeight - height + y -2;
|
||||
if(x<0)
|
||||
sizehints.win_gravity = SouthEastGravity;
|
||||
else
|
||||
sizehints.win_gravity = SouthWestGravity;
|
||||
}
|
||||
valuemask = (CWBackPixel | CWBorderPixel | CWEventMask|CWCursor);
|
||||
attributes.background_pixel = PagerBackColor;
|
||||
attributes.border_pixel = Scr.StdColors.fore;
|
||||
attributes.cursor = Scr.FvwmCursors[DEFAULT];
|
||||
attributes.event_mask = (ExposureMask | EnterWindowMask|ButtonReleaseMask|
|
||||
ButtonMotionMask);
|
||||
sizehints.width = width;
|
||||
sizehints.height = height;
|
||||
sizehints.x = window_x;
|
||||
sizehints.y = window_y;
|
||||
|
||||
Scr.Pager_w = XCreateWindow (dpy, Scr.Root, window_x, window_y, width,
|
||||
height, (unsigned int) 1,
|
||||
CopyFromParent, InputOutput,
|
||||
(Visual *) CopyFromParent,
|
||||
valuemask, &attributes);
|
||||
XSetWMNormalHints(dpy,Scr.Pager_w,&sizehints);
|
||||
XStringListToTextProperty(&pager_name,1,&name);
|
||||
XSetWMName(dpy,Scr.Pager_w,&name);
|
||||
XSetWMIconName(dpy,Scr.Pager_w,&name);
|
||||
XFree((char *)name.value);
|
||||
|
||||
attributes.event_mask = KeyPressMask | ExposureMask;
|
||||
attributes.background_pixel = PagerForeColor;
|
||||
attributes.cursor = Scr.FvwmCursors[DEFAULT];
|
||||
Scr.CPagerWin=XCreateWindow(dpy,Scr.Pager_w,-10, -10, 10, 10,0,
|
||||
CopyFromParent,
|
||||
InputOutput,CopyFromParent,
|
||||
CWEventMask|CWBackPixel|CWCursor,
|
||||
&attributes);
|
||||
XMapRaised(dpy,Scr.CPagerWin);
|
||||
}
|
||||
#endif
|
65
fvwm/parse.h
Normal file
65
fvwm/parse.h
Normal file
@ -0,0 +1,65 @@
|
||||
/****************************************************************************
|
||||
* This module was originally based on the twm module of the same name.
|
||||
* Since its use and contents have changed so dramatically, I have removed
|
||||
* the original twm copyright, and inserted my own.
|
||||
*
|
||||
* by Rob Nation
|
||||
* Copyright 1993 Robert Nation. No restrictions are placed on this code,
|
||||
* as long as the copyright notice is preserved
|
||||
****************************************************************************/
|
||||
|
||||
/**********************************************************************
|
||||
*
|
||||
* Codes for fvwm builtins
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef _PARSE_
|
||||
#define _PARSE_
|
||||
|
||||
#define F_NOP 0
|
||||
#define F_BEEP 1
|
||||
#define F_QUIT 2
|
||||
#define F_RESTART 3
|
||||
#define F_REFRESH 4
|
||||
#define F_TITLE 5
|
||||
#define F_SCROLL 6 /* scroll the virtual desktop */
|
||||
#define F_CIRCULATE_UP 7
|
||||
#define F_CIRCULATE_DOWN 8
|
||||
#define F_TOGGLE_PAGE 9
|
||||
#define F_GOTO_PAGE 10
|
||||
#define F_WINDOWLIST 11
|
||||
#define F_MOVECURSOR 12
|
||||
#define F_FUNCTION 13
|
||||
#define F_WARP 14
|
||||
#define F_MODULE 15
|
||||
#define F_DESK 16
|
||||
#define F_CHANGE_WINDOWS_DESK 17
|
||||
#define F_EXEC 18 /* string */
|
||||
#define F_POPUP 19 /* string */
|
||||
#define F_WAIT 20
|
||||
#define F_CLOSE 21
|
||||
#define F_QUICKIE 22
|
||||
|
||||
/* Functions which require a target window */
|
||||
#define F_RESIZE 100
|
||||
#define F_RAISE 101
|
||||
#define F_LOWER 102
|
||||
#define F_DESTROY 103
|
||||
#define F_DELETE 104
|
||||
#define F_MOVE 105
|
||||
#define F_ICONIFY 106
|
||||
#define F_STICK 107
|
||||
#define F_RAISELOWER 108
|
||||
#define F_MAXIMIZE 109
|
||||
#define F_FOCUS 110
|
||||
|
||||
|
||||
/* Functions for use by modules only! */
|
||||
#define F_SEND_WINDOW_LIST 1000
|
||||
|
||||
/* Functions for internal only! */
|
||||
#define F_RAISE_IT 2000
|
||||
|
||||
#endif /* _PARSE_ */
|
||||
|
349
fvwm/placement.c
Normal file
349
fvwm/placement.c
Normal file
@ -0,0 +1,349 @@
|
||||
/****************************************************************************
|
||||
* This module is all new
|
||||
* by Rob Nation
|
||||
*
|
||||
* This code does smart-placement initial window placement stuff
|
||||
*
|
||||
* Copyright 1994 Robert Nation. No restrictions are placed on this code,
|
||||
* as long as the copyright notice is preserved . No guarantees or
|
||||
* warrantees of any sort whatsoever are given or implied or anything.
|
||||
****************************************************************************/
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "fvwm.h"
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
|
||||
void SmartPlacement(FvwmWindow *t, int width, int height, int *x, int *y)
|
||||
{
|
||||
int temp_h,temp_w;
|
||||
int test_x = 0,test_y = 0;
|
||||
int loc_ok = False, tw,tx,ty,th;
|
||||
FvwmWindow *test_window;
|
||||
|
||||
temp_h = height;
|
||||
temp_w = width;
|
||||
|
||||
while(((test_y + temp_h) < (Scr.MyDisplayHeight))&&(!loc_ok))
|
||||
{
|
||||
test_x = 0;
|
||||
while(((test_x + temp_w) < (Scr.MyDisplayWidth))&&(!loc_ok))
|
||||
{
|
||||
loc_ok = True;
|
||||
test_window = Scr.FvwmRoot.next;
|
||||
while((test_window != (FvwmWindow *)0)&&(loc_ok == True))
|
||||
{
|
||||
if(test_window->Desk == Scr.CurrentDesk)
|
||||
{
|
||||
if(Scr.flags & StubbornPlacement)
|
||||
{
|
||||
if((test_window->flags & ICONIFIED)&&
|
||||
(!(test_window->flags & ICON_UNMAPPED))&&
|
||||
(test_window->icon_w)&&
|
||||
(test_window != t))
|
||||
{
|
||||
tw=test_window->icon_p_width;
|
||||
th=test_window->icon_p_height+
|
||||
test_window->icon_w_height;
|
||||
tx = test_window->icon_x_loc;
|
||||
ty = test_window->icon_y_loc;
|
||||
|
||||
if((tx<(test_x+width))&&((tx + tw) > test_x)&&
|
||||
(ty<(test_y+height))&&((ty + th)>test_y))
|
||||
{
|
||||
loc_ok = False;
|
||||
test_x = tx + tw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!(test_window->flags & ICONIFIED)&&(test_window != t))
|
||||
{
|
||||
tw=test_window->frame_width+2*test_window->bw;
|
||||
th=test_window->frame_height+2*test_window->bw;
|
||||
tx = test_window->frame_x;
|
||||
ty = test_window->frame_y;
|
||||
if((tx <= (test_x+width))&&((tx + tw) >= test_x)&&
|
||||
(ty <= (test_y+height))&&((ty + th)>= test_y))
|
||||
{
|
||||
loc_ok = False;
|
||||
test_x = tx + tw;
|
||||
}
|
||||
}
|
||||
}
|
||||
test_window = test_window->next;
|
||||
}
|
||||
test_x +=1;
|
||||
}
|
||||
test_y +=1;
|
||||
}
|
||||
if(loc_ok == False)
|
||||
{
|
||||
*x = -1;
|
||||
*y = -1;
|
||||
return;
|
||||
}
|
||||
*x = test_x;
|
||||
*y = test_y;
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Handles initial placement and sizing of a new window
|
||||
* Returns False in the event of a lost window.
|
||||
*
|
||||
**************************************************************************/
|
||||
Bool PlaceWindow(FvwmWindow *tmp_win, unsigned long tflag,int Desk)
|
||||
{
|
||||
FvwmWindow *t;
|
||||
int xl = -1,yt,DragWidth,DragHeight;
|
||||
int gravx, gravy; /* gravity signs for positioning */
|
||||
extern Bool PPosOverride;
|
||||
|
||||
GetGravityOffsets (tmp_win, &gravx, &gravy);
|
||||
|
||||
|
||||
/* Select a desk to put the window on (in list of priority):
|
||||
* 1. Sticky Windows stay on the current desk.
|
||||
* 2. Windows specified with StartsOnDesk go where specified
|
||||
* 3. Put it on the desk it was on before the restart.
|
||||
* 4. Transients go on the same desk as their parents.
|
||||
* 5. Window groups stay together (completely untested)
|
||||
*/
|
||||
tmp_win->Desk = Scr.CurrentDesk;
|
||||
if (tflag & STICKY_FLAG)
|
||||
tmp_win->Desk = Scr.CurrentDesk;
|
||||
else if (tflag & STAYSONDESK_FLAG)
|
||||
tmp_win->Desk = Desk;
|
||||
else
|
||||
{
|
||||
Atom atype;
|
||||
int aformat;
|
||||
unsigned long nitems, bytes_remain;
|
||||
unsigned char *prop;
|
||||
|
||||
if((tmp_win->wmhints)&&(tmp_win->wmhints->flags & WindowGroupHint)&&
|
||||
(tmp_win->wmhints->window_group != None)&&
|
||||
(tmp_win->wmhints->window_group != Scr.Root))
|
||||
{
|
||||
/* Try to find the group leader or another window
|
||||
* in the group */
|
||||
for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
|
||||
{
|
||||
if((t->w == tmp_win->wmhints->window_group)||
|
||||
((t->wmhints)&&(t->wmhints->flags & WindowGroupHint)&&
|
||||
(t->wmhints->window_group==tmp_win->wmhints->window_group)))
|
||||
tmp_win->Desk = t->Desk;
|
||||
}
|
||||
}
|
||||
if((tmp_win->flags & TRANSIENT)&&(tmp_win->transientfor!=None)&&
|
||||
(tmp_win->transientfor != Scr.Root))
|
||||
{
|
||||
/* Try to find the parent's desktop */
|
||||
for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
|
||||
{
|
||||
if(t->w == tmp_win->transientfor)
|
||||
tmp_win->Desk = t->Desk;
|
||||
}
|
||||
}
|
||||
|
||||
if ((XGetWindowProperty(dpy, tmp_win->w, _XA_WM_DESKTOP, 0L, 1L, True,
|
||||
_XA_WM_DESKTOP, &atype, &aformat, &nitems,
|
||||
&bytes_remain, &prop))==Success)
|
||||
{
|
||||
if(prop != NULL)
|
||||
{
|
||||
tmp_win->Desk = *(unsigned long *)prop;
|
||||
XFree(prop);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* I think it would be good to switch to the selected desk
|
||||
* whenever a new window pops up, except during initialization */
|
||||
if(!PPosOverride)
|
||||
changeDesks(0,tmp_win->Desk);
|
||||
|
||||
|
||||
/* Desk has been selected, now pick a location for the window */
|
||||
/*
|
||||
* If
|
||||
* o the window is a transient, or
|
||||
*
|
||||
* o a USPosition was requested
|
||||
*
|
||||
* then put the window where requested.
|
||||
*
|
||||
* If RandomPlacement was specified,
|
||||
* then place the window in a psuedo-random location
|
||||
*/
|
||||
if (!(tmp_win->flags & TRANSIENT) &&
|
||||
!(tmp_win->hints.flags & USPosition) &&
|
||||
((Scr.flags & NoPPosition)||!(tmp_win->hints.flags & PPosition)) &&
|
||||
!(PPosOverride) &&
|
||||
!((tmp_win->wmhints)&&
|
||||
(tmp_win->wmhints->flags & StateHint)&&
|
||||
(tmp_win->wmhints->initial_state == IconicState)) )
|
||||
{
|
||||
/* Get user's window placement, unless RandomPlacement is specified */
|
||||
if(Scr.flags & RandomPlacement)
|
||||
{
|
||||
if(Scr.flags & SMART_PLACEMENT)
|
||||
SmartPlacement(tmp_win,tmp_win->frame_width+2*tmp_win->bw,
|
||||
tmp_win->frame_height+2*tmp_win->bw,
|
||||
&xl,&yt);
|
||||
if(xl < 0)
|
||||
{
|
||||
/* plase window in a random location */
|
||||
if ((Scr.randomx += Scr.TitleHeight) > Scr.MyDisplayWidth / 2)
|
||||
Scr.randomx = Scr.TitleHeight;
|
||||
if ((Scr.randomy += 2*Scr.TitleHeight) > Scr.MyDisplayHeight / 2)
|
||||
Scr.randomy = 2 * Scr.TitleHeight;
|
||||
tmp_win->attr.x = Scr.randomx - tmp_win->old_bw;
|
||||
tmp_win->attr.y = Scr.randomy - tmp_win->old_bw;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp_win->attr.x = xl - tmp_win->old_bw;
|
||||
tmp_win->attr.y = yt - tmp_win->old_bw;
|
||||
}
|
||||
/* patches 11/93 to try to keep the window on the
|
||||
* screen */
|
||||
tmp_win->frame_x = tmp_win->attr.x + tmp_win->old_bw - tmp_win->bw;
|
||||
tmp_win->frame_y = tmp_win->attr.y + tmp_win->old_bw - tmp_win->bw;
|
||||
|
||||
if(tmp_win->frame_x + tmp_win->frame_width +
|
||||
2*tmp_win->boundary_width> Scr.MyDisplayWidth)
|
||||
{
|
||||
tmp_win->attr.x = Scr.MyDisplayWidth -tmp_win->attr.width
|
||||
- tmp_win->old_bw +tmp_win->bw - 2*tmp_win->boundary_width;
|
||||
Scr.randomx = 0;
|
||||
}
|
||||
if(tmp_win->frame_y + 2*tmp_win->boundary_width+tmp_win->title_height
|
||||
+ tmp_win->frame_height > Scr.MyDisplayHeight)
|
||||
{
|
||||
tmp_win->attr.y = Scr.MyDisplayHeight -tmp_win->attr.height
|
||||
- tmp_win->old_bw +tmp_win->bw - tmp_win->title_height -
|
||||
2*tmp_win->boundary_width;;
|
||||
Scr.randomy = 0;
|
||||
}
|
||||
|
||||
tmp_win->xdiff = tmp_win->attr.x - tmp_win->bw;
|
||||
tmp_win->ydiff = tmp_win->attr.y - tmp_win->bw;
|
||||
}
|
||||
else
|
||||
{
|
||||
xl = -1;
|
||||
yt = -1;
|
||||
if(Scr.flags & SMART_PLACEMENT)
|
||||
SmartPlacement(tmp_win,tmp_win->frame_width+2*tmp_win->bw,
|
||||
tmp_win->frame_height+2*tmp_win->bw,
|
||||
&xl,&yt);
|
||||
if(xl < 0)
|
||||
{
|
||||
if(GrabEm(POSITION))
|
||||
{
|
||||
/* Grabbed the pointer - continue */
|
||||
XGrabServer(dpy);
|
||||
if(XGetGeometry(dpy, tmp_win->w, &JunkRoot, &JunkX, &JunkY,
|
||||
(unsigned int *)&DragWidth,
|
||||
(unsigned int *)&DragHeight,
|
||||
&JunkBW, &JunkDepth) == 0)
|
||||
{
|
||||
free((char *)tmp_win);
|
||||
XUngrabServer(dpy);
|
||||
return False;
|
||||
}
|
||||
DragWidth += 2*tmp_win->boundary_width;
|
||||
DragHeight +=
|
||||
tmp_win->title_height + 2*tmp_win->boundary_width;
|
||||
|
||||
XMapRaised(dpy,Scr.SizeWindow);
|
||||
moveLoop(tmp_win,0,0,DragWidth,DragHeight,
|
||||
&xl,&yt,False,True);
|
||||
XUnmapWindow(dpy,Scr.SizeWindow);
|
||||
XUngrabServer(dpy);
|
||||
UngrabEm();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* couldn't grab the pointer - better do something */
|
||||
XBell(dpy,Scr.screen);
|
||||
xl = 0;
|
||||
yt = 0;
|
||||
}
|
||||
}
|
||||
tmp_win->attr.y = yt - tmp_win->old_bw + tmp_win->bw;
|
||||
tmp_win->attr.x = xl - tmp_win->old_bw + tmp_win->bw;
|
||||
tmp_win->xdiff = xl ;
|
||||
tmp_win->ydiff = yt ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* the USPosition was specified, or the window is a transient,
|
||||
* or it starts iconic so place it automatically */
|
||||
|
||||
tmp_win->xdiff = tmp_win->attr.x;
|
||||
tmp_win->ydiff = tmp_win->attr.y;
|
||||
/* put it where asked, mod title bar */
|
||||
/* if the gravity is towards the top, move it by the title height */
|
||||
tmp_win->attr.y -= gravy*(tmp_win->bw-tmp_win->old_bw);
|
||||
tmp_win->attr.x -= gravx*(tmp_win->bw-tmp_win->old_bw);
|
||||
if(gravy > 0)
|
||||
tmp_win->attr.y -= 2*tmp_win->boundary_width + tmp_win->title_height;
|
||||
if(gravx > 0)
|
||||
tmp_win->attr.x -= 2*tmp_win->boundary_width;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* GetGravityOffsets - map gravity to (x,y) offset signs for adding
|
||||
* to x and y when window is mapped to get proper placement.
|
||||
*
|
||||
************************************************************************/
|
||||
struct _gravity_offset
|
||||
{
|
||||
int x, y;
|
||||
};
|
||||
|
||||
void GetGravityOffsets (FvwmWindow *tmp,int *xp,int *yp)
|
||||
{
|
||||
static struct _gravity_offset gravity_offsets[11] =
|
||||
{
|
||||
{ 0, 0 }, /* ForgetGravity */
|
||||
{ -1, -1 }, /* NorthWestGravity */
|
||||
{ 0, -1 }, /* NorthGravity */
|
||||
{ 1, -1 }, /* NorthEastGravity */
|
||||
{ -1, 0 }, /* WestGravity */
|
||||
{ 0, 0 }, /* CenterGravity */
|
||||
{ 1, 0 }, /* EastGravity */
|
||||
{ -1, 1 }, /* SouthWestGravity */
|
||||
{ 0, 1 }, /* SouthGravity */
|
||||
{ 1, 1 }, /* SouthEastGravity */
|
||||
{ 0, 0 }, /* StaticGravity */
|
||||
};
|
||||
register int g = ((tmp->hints.flags & PWinGravity)
|
||||
? tmp->hints.win_gravity : NorthWestGravity);
|
||||
|
||||
if (g < ForgetGravity || g > StaticGravity)
|
||||
*xp = *yp = 0;
|
||||
else
|
||||
{
|
||||
*xp = (int)gravity_offsets[g].x;
|
||||
*yp = (int)gravity_offsets[g].y;
|
||||
}
|
||||
return;
|
||||
}
|
662
fvwm/resize.c
Normal file
662
fvwm/resize.c
Normal file
@ -0,0 +1,662 @@
|
||||
/****************************************************************************
|
||||
* This module is based on Twm, but has been siginificantly modified
|
||||
* by Rob Nation
|
||||
****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/
|
||||
/** Salt Lake City, Utah **/
|
||||
/** Portions Copyright 1989 by the Massachusetts Institute of Technology **/
|
||||
/** Cambridge, Massachusetts **/
|
||||
/** **/
|
||||
/** All Rights Reserved **/
|
||||
/** **/
|
||||
/** Permission to use, copy, modify, and distribute this software and **/
|
||||
/** its documentation for any purpose and without fee is hereby **/
|
||||
/** granted, provided that the above copyright notice appear in all **/
|
||||
/** copies and that both that copyright notice and this permis- **/
|
||||
/** sion notice appear in supporting documentation, and that the **/
|
||||
/** names of Evans & Sutherland and M.I.T. not be used in advertising **/
|
||||
/** in publicity pertaining to distribution of the software without **/
|
||||
/** specific, written prior permission. **/
|
||||
/** **/
|
||||
/** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/
|
||||
/** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/
|
||||
/** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/
|
||||
/** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/
|
||||
/** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/
|
||||
/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/
|
||||
/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/
|
||||
/** OR PERFORMANCE OF THIS SOFTWARE. **/
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* window resizing borrowed from the "wm" window manager
|
||||
*
|
||||
***********************************************************************/
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "fvwm.h"
|
||||
#include "misc.h"
|
||||
#include "screen.h"
|
||||
#include "parse.h"
|
||||
|
||||
static int dragx; /* all these variables are used */
|
||||
static int dragy; /* in resize operations */
|
||||
static int dragWidth;
|
||||
static int dragHeight;
|
||||
|
||||
static int origx;
|
||||
static int origy;
|
||||
static int origWidth;
|
||||
static int origHeight;
|
||||
|
||||
static int ymotion, xmotion;
|
||||
static int last_width,last_height;
|
||||
extern int menuFromFrameOrWindowOrTitlebar;
|
||||
extern Window PressedW;
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Starts a window resize operation
|
||||
*
|
||||
****************************************************************************/
|
||||
void resize_window(Window w,FvwmWindow *tmp_win, int val1, int val2, int val1_unit, int val2_unit)
|
||||
{
|
||||
Bool finished = FALSE, done = FALSE;
|
||||
int x,y,delta_x,delta_y;
|
||||
Window ResizeWindow;
|
||||
extern int Stashed_X, Stashed_Y;
|
||||
Bool flags;
|
||||
#ifndef NO_PAGER
|
||||
extern Bool pagerOn;
|
||||
#endif
|
||||
|
||||
if((w == None)||(tmp_win == NULL))
|
||||
return;
|
||||
|
||||
/* Already checked this in functions.c, but its here too incase
|
||||
* there's a resize on initial placement. */
|
||||
if(check_allowed_function2(F_RESIZE,tmp_win) == 0)
|
||||
{
|
||||
XBell(dpy, Scr.screen);
|
||||
return;
|
||||
}
|
||||
/* can't resize icons */
|
||||
if(tmp_win->flags & ICONIFIED)
|
||||
return;
|
||||
|
||||
ResizeWindow = tmp_win->frame;
|
||||
|
||||
if((val1 != 0)&&(val2 != 0))
|
||||
{
|
||||
int width,height;
|
||||
|
||||
dragWidth = val1*val1_unit/100;
|
||||
dragHeight = val2*val2_unit/100;
|
||||
|
||||
ConstrainSize (tmp_win, &dragWidth, &dragHeight);
|
||||
SetupFrame (tmp_win, tmp_win->frame_x,
|
||||
tmp_win->frame_y ,dragWidth, dragHeight,FALSE);
|
||||
|
||||
ResizeWindow = None;
|
||||
#ifndef NO_PAGER
|
||||
RedrawPager();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
InstallRootColormap();
|
||||
if (menuFromFrameOrWindowOrTitlebar)
|
||||
{
|
||||
/* warp the pointer to the cursor position from before menu appeared*/
|
||||
XWarpPointer(dpy, None, Scr.Root, 0, 0, 0, 0, Stashed_X,Stashed_Y);
|
||||
XFlush(dpy);
|
||||
}
|
||||
|
||||
if(!GrabEm(MOVE))
|
||||
{
|
||||
XBell(dpy,Scr.screen);
|
||||
return;
|
||||
}
|
||||
|
||||
if((!(Scr.flags & OpaqueResize))||
|
||||
((Scr.flags & OpaqueResize)&&(!(tmp_win->flags & MAPPED))))
|
||||
XGrabServer(dpy);
|
||||
|
||||
|
||||
/* handle problems with edge-wrapping while resizing */
|
||||
flags = Scr.flags;
|
||||
Scr.flags &= ~(EdgeWrapX|EdgeWrapY);
|
||||
|
||||
#ifndef NO_PAGER
|
||||
pagerOn = False;
|
||||
#endif
|
||||
XGetGeometry(dpy, (Drawable) ResizeWindow, &JunkRoot,
|
||||
&dragx, &dragy, (unsigned int *)&dragWidth,
|
||||
(unsigned int *)&dragHeight, &JunkBW,&JunkDepth);
|
||||
|
||||
dragx += tmp_win->bw;
|
||||
dragy += tmp_win->bw;
|
||||
origx = dragx;
|
||||
origy = dragy;
|
||||
origWidth = dragWidth;
|
||||
origHeight = dragHeight;
|
||||
ymotion=xmotion=0;
|
||||
|
||||
/* pop up a resize dimensions window */
|
||||
XMapRaised(dpy, Scr.SizeWindow);
|
||||
last_width = 0;
|
||||
last_height = 0;
|
||||
DisplaySize(tmp_win, origWidth, origHeight,True);
|
||||
|
||||
/* Get the current position to determine which border to resize */
|
||||
if((PressedW != Scr.Root)&&(PressedW != None))
|
||||
{
|
||||
if(PressedW == tmp_win->sides[0]) /* top */
|
||||
ymotion = 1;
|
||||
if(PressedW == tmp_win->sides[1]) /* right */
|
||||
xmotion = -1;
|
||||
if(PressedW == tmp_win->sides[2]) /* bottom */
|
||||
ymotion = -1;
|
||||
if(PressedW == tmp_win->sides[3]) /* left */
|
||||
xmotion = 1;
|
||||
if(PressedW == tmp_win->corners[0]) /* upper-left */
|
||||
{
|
||||
ymotion = 1;
|
||||
xmotion = 1;
|
||||
}
|
||||
if(PressedW == tmp_win->corners[1]) /* upper-right */
|
||||
{
|
||||
xmotion = -1;
|
||||
ymotion = 1;
|
||||
}
|
||||
if(PressedW == tmp_win->corners[2]) /* lower right */
|
||||
{
|
||||
ymotion = -1;
|
||||
xmotion = 1;
|
||||
}
|
||||
if(PressedW == tmp_win->corners[3]) /* lower left */
|
||||
{
|
||||
ymotion = -1;
|
||||
xmotion = -1;
|
||||
}
|
||||
}
|
||||
/* draw the rubber-band window */
|
||||
if((!(Scr.flags & OpaqueResize))||
|
||||
((Scr.flags & OpaqueResize)&&(!(tmp_win->flags & MAPPED))))
|
||||
MoveOutline (Scr.Root, dragx - tmp_win->bw, dragy - tmp_win->bw, dragWidth + 2 * tmp_win->bw,
|
||||
dragHeight + 2 * tmp_win->bw);
|
||||
|
||||
/* loop to resize */
|
||||
while(!finished)
|
||||
{
|
||||
XMaskEvent(dpy, ButtonPressMask | ButtonReleaseMask | KeyPressMask |
|
||||
ButtonMotionMask | PointerMotionMask | ExposureMask, &Event);
|
||||
StashEventTime(&Event);
|
||||
|
||||
if (Event.type == MotionNotify)
|
||||
/* discard any extra motion events before a release */
|
||||
while(XCheckMaskEvent(dpy, ButtonMotionMask | ButtonReleaseMask |
|
||||
PointerMotionMask,&Event))
|
||||
{
|
||||
StashEventTime(&Event);
|
||||
if (Event.type == ButtonRelease) break;
|
||||
}
|
||||
|
||||
done = FALSE;
|
||||
/* Handle a limited number of key press events to allow mouseless
|
||||
* operation */
|
||||
if(Event.type == KeyPress)
|
||||
Keyboard_shortcuts(&Event,ButtonRelease);
|
||||
switch(Event.type)
|
||||
{
|
||||
case ButtonPress:
|
||||
XAllowEvents(dpy,ReplayPointer,CurrentTime);
|
||||
case KeyPress:
|
||||
done = TRUE;
|
||||
break;
|
||||
|
||||
case ButtonRelease:
|
||||
finished = TRUE;
|
||||
done = TRUE;
|
||||
break;
|
||||
|
||||
case MotionNotify:
|
||||
x = Event.xmotion.x_root;
|
||||
y = Event.xmotion.y_root;
|
||||
/* need to move the viewport */
|
||||
HandlePaging(Scr.EdgeScrollX,Scr.EdgeScrollY,&x,&y,
|
||||
&delta_x,&delta_y,False);
|
||||
origx -= delta_x;
|
||||
origy -= delta_y;
|
||||
dragx -= delta_x;
|
||||
dragy -= delta_y;
|
||||
|
||||
DoResize(x, y, tmp_win);
|
||||
done = TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(!done)
|
||||
{
|
||||
if((!(Scr.flags & OpaqueResize))||
|
||||
((Scr.flags & OpaqueResize)&&(!(tmp_win->flags & MAPPED))))
|
||||
MoveOutline(Scr.Root,0,0,0,0);
|
||||
|
||||
DispatchEvent();
|
||||
|
||||
if((!(Scr.flags & OpaqueResize))||
|
||||
((Scr.flags & OpaqueResize)&&(!(tmp_win->flags & MAPPED))))
|
||||
MoveOutline(Scr.Root, dragx - tmp_win->bw, dragy - tmp_win->bw,
|
||||
dragWidth + 2 * tmp_win->bw, dragHeight + 2 * tmp_win->bw);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* erase the rubber-band */
|
||||
if((!(Scr.flags & OpaqueResize))||
|
||||
((Scr.flags & OpaqueResize)&&(!(tmp_win->flags & MAPPED))))
|
||||
MoveOutline(Scr.Root, 0, 0, 0, 0);
|
||||
|
||||
/* pop down the size window */
|
||||
XUnmapWindow(dpy, Scr.SizeWindow);
|
||||
|
||||
#ifndef NO_PAGER
|
||||
pagerOn = True;
|
||||
#endif
|
||||
ConstrainSize (tmp_win, &dragWidth, &dragHeight);
|
||||
SetupFrame (tmp_win, dragx - tmp_win->bw,
|
||||
dragy - tmp_win->bw, dragWidth, dragHeight,FALSE);
|
||||
|
||||
UninstallRootColormap();
|
||||
ResizeWindow = None;
|
||||
XUngrabServer(dpy);
|
||||
UngrabEm();
|
||||
#ifndef NO_PAGER
|
||||
RedrawPager();
|
||||
#endif
|
||||
Scr.flags |= flags & (EdgeWrapX|EdgeWrapY);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* DoResize - move the rubberband around. This is called for
|
||||
* each motion event when we are resizing
|
||||
*
|
||||
* Inputs:
|
||||
* x_root - the X corrdinate in the root window
|
||||
* y_root - the Y corrdinate in the root window
|
||||
* tmp_win - the current fvwm window
|
||||
*
|
||||
************************************************************************/
|
||||
void DoResize(int x_root, int y_root, FvwmWindow *tmp_win)
|
||||
{
|
||||
int action=0;
|
||||
#ifndef NO_PAGER
|
||||
unsigned int width,height;
|
||||
int ww,wh;
|
||||
int wx,wy;
|
||||
int MaxH,MaxW;
|
||||
static int last_w = -10000, last_h = -10000;
|
||||
#endif
|
||||
|
||||
if ((y_root <= origy)||((ymotion == 1)&&(y_root < origy+origHeight-1)))
|
||||
{
|
||||
dragy = y_root;
|
||||
dragHeight = origy + origHeight - y_root;
|
||||
action = 1;
|
||||
ymotion = 1;
|
||||
}
|
||||
else if ((y_root >= origy + origHeight - 1)||
|
||||
((ymotion == -1)&&(y_root > origy)))
|
||||
{
|
||||
dragy = origy;
|
||||
dragHeight = 1 + y_root - dragy;
|
||||
action = 1;
|
||||
ymotion = -1;
|
||||
}
|
||||
|
||||
if ((x_root <= origx)||
|
||||
((xmotion == 1)&&(x_root < origx + origWidth - 1)))
|
||||
{
|
||||
dragx = x_root;
|
||||
dragWidth = origx + origWidth - x_root;
|
||||
action = 1;
|
||||
xmotion = 1;
|
||||
}
|
||||
if ((x_root >= origx + origWidth - 1)||
|
||||
((xmotion == -1)&&(x_root > origx)))
|
||||
{
|
||||
dragx = origx;
|
||||
dragWidth = 1 + x_root - origx;
|
||||
action = 1;
|
||||
xmotion = -1;
|
||||
}
|
||||
|
||||
if (action)
|
||||
{
|
||||
ConstrainSize (tmp_win, &dragWidth, &dragHeight);
|
||||
if (xmotion == 1)
|
||||
dragx = origx + origWidth - dragWidth;
|
||||
if (ymotion == 1)
|
||||
dragy = origy + origHeight - dragHeight;
|
||||
|
||||
#ifndef NO_PAGER
|
||||
/* update size of the pager_view window */
|
||||
if((Scr.FvwmPager != NULL)&&
|
||||
(dragx < Scr.FvwmPager->frame_x + Scr.FvwmPager->frame_width)&&
|
||||
(dragx+dragWidth > Scr.FvwmPager->frame_x)&&
|
||||
(dragy < Scr.FvwmPager->frame_y + Scr.FvwmPager->frame_height)&&
|
||||
(dragy+dragHeight > Scr.FvwmPager->frame_y)&&
|
||||
((!(Scr.flags & OpaqueResize))||
|
||||
((Scr.flags & OpaqueResize)&&(!(tmp_win->flags & MAPPED)))))
|
||||
MoveOutline(Scr.Root,0,0,0,0);
|
||||
if(Scr.FvwmPager)
|
||||
{
|
||||
width = Scr.FvwmPager->frame_width - 2*Scr.FvwmPager->boundary_width;
|
||||
height = Scr.FvwmPager->frame_height - Scr.FvwmPager->title_height
|
||||
- 2*Scr.FvwmPager->boundary_width;
|
||||
|
||||
MaxW = Scr.VxMax + Scr.MyDisplayWidth;
|
||||
MaxH = Scr.VyMax + Scr.MyDisplayHeight;
|
||||
|
||||
if(!(tmp_win->flags & STICKY)&&
|
||||
(!(tmp_win->flags & ICONIFIED)||(!(Scr.flags & SuppressIcons)))&&
|
||||
(!(tmp_win->flags & ICONIFIED)||(!(Scr.flags & StickyIcons))))
|
||||
{
|
||||
/* show the actual window */
|
||||
wx = (dragx + Scr.Vx)*(int)width/MaxW;
|
||||
wy = (dragy + Scr.Vy)*(int)height/MaxH;
|
||||
ww = dragWidth*(int)width/MaxW;
|
||||
wh = dragHeight*(int)height/MaxH;
|
||||
|
||||
if((last_w - ww >= 2)||(last_w - ww <= -2)||
|
||||
(last_h - wh >= 2)||(last_h - wh <= -2))
|
||||
{
|
||||
if(ww<2)ww=2;
|
||||
if(wh<2)wh=2;
|
||||
XMoveResizeWindow(dpy, tmp_win->pager_view, wx, wy, ww, wh);
|
||||
last_h = wh;
|
||||
last_w = ww;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if((!(Scr.flags & OpaqueResize))||
|
||||
((Scr.flags & OpaqueResize)&&(!(tmp_win->flags & MAPPED))))
|
||||
{
|
||||
MoveOutline(Scr.Root, dragx - tmp_win->bw,dragy - tmp_win->bw,
|
||||
dragWidth + 2 * tmp_win->bw, dragHeight + 2 * tmp_win->bw);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetupFrame (tmp_win, dragx - tmp_win->bw,
|
||||
dragy - tmp_win->bw, dragWidth, dragHeight,FALSE);
|
||||
}
|
||||
}
|
||||
DisplaySize(tmp_win, dragWidth, dragHeight,False);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* DisplaySize - display the size in the dimensions window
|
||||
*
|
||||
* Inputs:
|
||||
* tmp_win - the current fvwm window
|
||||
* width - the width of the rubber band
|
||||
* height - the height of the rubber band
|
||||
*
|
||||
***********************************************************************/
|
||||
void DisplaySize(FvwmWindow *tmp_win, int width, int height,Bool Init)
|
||||
{
|
||||
char str[100];
|
||||
int dwidth,dheight,offset;
|
||||
|
||||
if (last_width == width && last_height == height)
|
||||
return;
|
||||
|
||||
last_width = width;
|
||||
last_height = height;
|
||||
|
||||
dheight = height - tmp_win->title_height - 2*tmp_win->boundary_width;
|
||||
dwidth = width - 2*tmp_win->boundary_width;
|
||||
|
||||
dwidth -= tmp_win->hints.base_width;
|
||||
dheight -= tmp_win->hints.base_height;
|
||||
dwidth /= tmp_win->hints.width_inc;
|
||||
dheight /= tmp_win->hints.height_inc;
|
||||
|
||||
(void) sprintf (str, " %4d x %-4d ", dwidth, dheight);
|
||||
offset = (Scr.SizeStringWidth + SIZE_HINDENT*2
|
||||
- XTextWidth(Scr.StdFont.font,str,strlen(str)))/2;
|
||||
if(Init)
|
||||
{
|
||||
XClearWindow(dpy,Scr.SizeWindow);
|
||||
if(Scr.d_depth >= 2)
|
||||
RelieveWindow(tmp_win,
|
||||
Scr.SizeWindow,0,0,Scr.SizeStringWidth+ SIZE_HINDENT*2,
|
||||
Scr.StdFont.height + SIZE_VINDENT*2,
|
||||
Scr.StdReliefGC,Scr.StdShadowGC,FULL_HILITE);
|
||||
}
|
||||
else
|
||||
{
|
||||
XClearArea(dpy,Scr.SizeWindow,SIZE_HINDENT,SIZE_VINDENT,Scr.SizeStringWidth,
|
||||
Scr.StdFont.height,False);
|
||||
}
|
||||
|
||||
XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC,
|
||||
offset, Scr.StdFont.font->ascent + SIZE_VINDENT, str, 13);
|
||||
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* ConstrainSize - adjust the given width and height to account for the
|
||||
* constraints imposed by size hints
|
||||
*
|
||||
* The general algorithm, especially the aspect ratio stuff, is
|
||||
* borrowed from uwm's CheckConsistency routine.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
void ConstrainSize (FvwmWindow *tmp_win, int *widthp, int *heightp)
|
||||
{
|
||||
#define makemult(a,b) ((b==1) ? (a) : (((int)((a)/(b))) * (b)) )
|
||||
#define _min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
int minWidth, minHeight, maxWidth, maxHeight, xinc, yinc, delta;
|
||||
int baseWidth, baseHeight;
|
||||
int dwidth = *widthp, dheight = *heightp;
|
||||
|
||||
dwidth -= 2 *tmp_win->boundary_width;
|
||||
dheight -= (tmp_win->title_height + 2*tmp_win->boundary_width);
|
||||
|
||||
minWidth = tmp_win->hints.min_width;
|
||||
minHeight = tmp_win->hints.min_height;
|
||||
|
||||
baseWidth = tmp_win->hints.base_width;
|
||||
baseHeight = tmp_win->hints.base_height;
|
||||
|
||||
maxWidth = tmp_win->hints.max_width;
|
||||
maxHeight = tmp_win->hints.max_height;
|
||||
|
||||
/* maxWidth = Scr.VxMax + Scr.MyDisplayWidth;
|
||||
maxHeight = Scr.VyMax + Scr.MyDisplayHeight;*/
|
||||
|
||||
xinc = tmp_win->hints.width_inc;
|
||||
yinc = tmp_win->hints.height_inc;
|
||||
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
#define maxAspectX tmp_win->hints.max_aspect.x
|
||||
#define maxAspectY tmp_win->hints.max_aspect.y
|
||||
#define minAspectX tmp_win->hints.min_aspect.x
|
||||
#define minAspectY tmp_win->hints.min_aspect.y
|
||||
/*
|
||||
* The math looks like this:
|
||||
*
|
||||
* minAspectX dwidth maxAspectX
|
||||
* ---------- <= ------- <= ----------
|
||||
* minAspectY dheight maxAspectY
|
||||
*
|
||||
* If that is multiplied out, then the width and height are
|
||||
* invalid in the following situations:
|
||||
*
|
||||
* minAspectX * dheight > minAspectY * dwidth
|
||||
* maxAspectX * dheight < maxAspectY * dwidth
|
||||
*
|
||||
*/
|
||||
|
||||
if (tmp_win->hints.flags & PAspect)
|
||||
{
|
||||
if (minAspectX * dheight > minAspectY * dwidth)
|
||||
{
|
||||
delta = makemult(minAspectX * dheight / minAspectY - dwidth,
|
||||
xinc);
|
||||
if (dwidth + delta <= maxWidth)
|
||||
dwidth += delta;
|
||||
else
|
||||
{
|
||||
delta = makemult(dheight - dwidth*minAspectY/minAspectX,
|
||||
yinc);
|
||||
if (dheight - delta >= minHeight) dheight -= delta;
|
||||
}
|
||||
}
|
||||
|
||||
if (maxAspectX * dheight < maxAspectY * dwidth)
|
||||
{
|
||||
delta = makemult(dwidth * maxAspectY / maxAspectX - dheight,
|
||||
yinc);
|
||||
if (dheight + delta <= maxHeight)
|
||||
dheight += delta;
|
||||
else
|
||||
{
|
||||
delta = makemult(dwidth - maxAspectX*dheight/maxAspectY,
|
||||
xinc);
|
||||
if (dwidth - delta >= minWidth) dwidth -= delta;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Fourth, account for border width and title height
|
||||
*/
|
||||
*widthp = dwidth + 2*tmp_win->boundary_width;
|
||||
*heightp = dheight + tmp_win->title_height + 2*tmp_win->boundary_width;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* MoveOutline - move a window outline
|
||||
*
|
||||
* Inputs:
|
||||
* root - the window we are outlining
|
||||
* x - upper left x coordinate
|
||||
* y - upper left y coordinate
|
||||
* width - the width of the rectangle
|
||||
* height - the height of the rectangle
|
||||
*
|
||||
***********************************************************************/
|
||||
void MoveOutline(Window root, int x, int y, int width, int height)
|
||||
{
|
||||
static int lastx = 0;
|
||||
static int lasty = 0;
|
||||
static int lastWidth = 0;
|
||||
static int lastHeight = 0;
|
||||
XRectangle rects[5];
|
||||
|
||||
if (x == lastx && y == lasty && width == lastWidth && height == lastHeight)
|
||||
return;
|
||||
|
||||
/* undraw the old one, if any */
|
||||
if (lastWidth || lastHeight)
|
||||
{
|
||||
rects[0].x = lastx;
|
||||
rects[0].y = lasty;
|
||||
rects[0].width = lastWidth;
|
||||
rects[0].height = lastHeight;
|
||||
rects[1].x = lastx+1;
|
||||
rects[1].y = lasty+1;
|
||||
rects[1].width = lastWidth-2;
|
||||
rects[1].height = lastHeight-2;
|
||||
rects[2].x = lastx+2;
|
||||
rects[2].y = lasty+2;
|
||||
rects[2].width = lastWidth-4;
|
||||
rects[2].height = lastHeight-4;
|
||||
rects[3].x = lastx+3;
|
||||
rects[3].y = lasty+3 + (lastHeight-6)/3;
|
||||
rects[3].width = lastWidth-6;
|
||||
rects[3].height = (lastHeight-6)/3;
|
||||
rects[4].x = lastx+3 + (lastWidth-6)/3;
|
||||
rects[4].y = lasty+3;
|
||||
rects[4].width = (lastWidth-6)/3;
|
||||
rects[4].height = (lastHeight-6);
|
||||
XDrawRectangles(dpy,Scr.Root,Scr.DrawGC,rects,5);
|
||||
}
|
||||
|
||||
lastx = x;
|
||||
lasty = y;
|
||||
lastWidth = width;
|
||||
lastHeight = height;
|
||||
|
||||
/* draw the new one, if any */
|
||||
if (lastWidth || lastHeight)
|
||||
{
|
||||
rects[0].x = lastx;
|
||||
rects[0].y = lasty;
|
||||
rects[0].width = lastWidth;
|
||||
rects[0].height = lastHeight;
|
||||
rects[1].x = lastx+1;
|
||||
rects[1].y = lasty+1;
|
||||
rects[1].width = lastWidth-2;
|
||||
rects[1].height = lastHeight-2;
|
||||
rects[2].x = lastx+2;
|
||||
rects[2].y = lasty+2;
|
||||
rects[2].width = lastWidth-4;
|
||||
rects[2].height = lastHeight-4;
|
||||
rects[3].x = lastx+3;
|
||||
rects[3].y = lasty+3 + (lastHeight-6)/3;
|
||||
rects[3].width = lastWidth-6;
|
||||
rects[3].height = (lastHeight-6)/3;
|
||||
rects[4].x = lastx+3 + (lastWidth-6)/3;
|
||||
rects[4].y = lasty+3;
|
||||
rects[4].width = (lastWidth-6)/3;
|
||||
rects[4].height = (lastHeight-6);
|
||||
XDrawRectangles(dpy,Scr.Root,Scr.DrawGC,rects,5);
|
||||
}
|
||||
}
|
||||
|
||||
|
247
fvwm/screen.h
Normal file
247
fvwm/screen.h
Normal file
@ -0,0 +1,247 @@
|
||||
/****************************************************************************
|
||||
* This module is based on Twm, but has been siginificantly modified
|
||||
* by Rob Nation
|
||||
****************************************************************************/
|
||||
/*
|
||||
* Copyright 1989 Massachusetts Institute of Technology
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
* that the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of M.I.T. not be used in advertising
|
||||
* or publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. M.I.T. makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
|
||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* fvwm per-screen data include file
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef _SCREEN_
|
||||
#define _SCREEN_
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include "misc.h"
|
||||
#include "menus.h"
|
||||
|
||||
#define SIZE_HINDENT 5
|
||||
#define SIZE_VINDENT 3
|
||||
#define MAX_WINDOW_WIDTH 32767
|
||||
#define MAX_WINDOW_HEIGHT 32767
|
||||
|
||||
|
||||
/* Cursor types */
|
||||
#define POSITION 0 /* upper Left corner cursor */
|
||||
#define TITLE_CURSOR 1 /* title-bar cursor */
|
||||
#define DEFAULT 2 /* cursor for apps to inherit */
|
||||
#define SYS 3 /* sys-menu and iconify boxes cursor */
|
||||
#define MOVE 4 /* resize cursor */
|
||||
#if defined(__alpha)
|
||||
#ifdef WAIT
|
||||
#undef WAIT
|
||||
#endif /*WAIT */
|
||||
#endif /*alpha */
|
||||
#define WAIT 5 /* wait a while cursor */
|
||||
#define MENU 6 /* menu cursor */
|
||||
#define SELECT 7 /* dot cursor for f.move, etc. from menus */
|
||||
#define DESTROY 8 /* skull and cross bones, f.destroy */
|
||||
#define TOP 9
|
||||
#define RIGHT 10
|
||||
#define BOTTOM 11
|
||||
#define LEFT 12
|
||||
#define TOP_LEFT 13
|
||||
#define TOP_RIGHT 14
|
||||
#define BOTTOM_LEFT 15
|
||||
#define BOTTOM_RIGHT 16
|
||||
#define MAX_CURSORS 18
|
||||
|
||||
/* Maximum number of icon boxes that are allowed */
|
||||
#define MAX_BOXES 4
|
||||
|
||||
#ifndef NON_VIRTUAL
|
||||
typedef struct
|
||||
{
|
||||
Window win;
|
||||
int isMapped;
|
||||
} PanFrame;
|
||||
#endif
|
||||
|
||||
typedef struct ScreenInfo
|
||||
{
|
||||
|
||||
unsigned long screen;
|
||||
int d_depth; /* copy of DefaultDepth(dpy, screen) */
|
||||
int NumberOfScreens; /* number of screens on display */
|
||||
int MyDisplayWidth; /* my copy of DisplayWidth(dpy, screen) */
|
||||
int MyDisplayHeight; /* my copy of DisplayHeight(dpy, screen) */
|
||||
|
||||
FvwmWindow FvwmRoot; /* the head of the fvwm window list */
|
||||
Window Root; /* the root window */
|
||||
Window SizeWindow; /* the resize dimensions window */
|
||||
Window NoFocusWin; /* Window which will own focus when no other
|
||||
* windows have it */
|
||||
#ifndef NON_VIRTUAL
|
||||
PanFrame PanFrameTop,PanFrameLeft,PanFrameRight,PanFrameBottom;
|
||||
int usePanFrames; /* toggle to disable them */
|
||||
#endif
|
||||
|
||||
Pixmap gray_bitmap; /*dark gray pattern for shaded out menu items*/
|
||||
Pixmap gray_pixmap; /* dark gray pattern for inactive borders */
|
||||
Pixmap light_gray_pixmap; /* light gray pattern for inactive borders */
|
||||
Pixmap sticky_gray_pixmap; /* light gray pattern for sticky borders */
|
||||
|
||||
MouseButton *MouseButtonRoot;
|
||||
FuncKey FuncKeyRoot;
|
||||
|
||||
int root_pushes; /* current push level to install root
|
||||
colormap windows */
|
||||
FvwmWindow *pushed_window; /* saved window to install when pushes drops
|
||||
to zero */
|
||||
#ifndef NO_PAGER
|
||||
FvwmWindow *FvwmPager;
|
||||
Window Pager_w;
|
||||
Window CPagerWin;
|
||||
#endif
|
||||
Cursor FvwmCursors[MAX_CURSORS];
|
||||
|
||||
name_list *TheList; /* list of window names with attributes */
|
||||
char *DefaultIcon; /* Icon to use when no other icons are found */
|
||||
|
||||
ColorPair MenuColors;
|
||||
ColorPair MenuStippleColors;
|
||||
ColorPair MenuRelief;
|
||||
|
||||
ColorPair StdColors; /* standard fore/back colors */
|
||||
ColorPair StickyColors; /* sticky fore/back colors */
|
||||
ColorPair StickyRelief; /* sticky hilight colors */
|
||||
ColorPair HiColors; /* standard fore/back colors */
|
||||
ColorPair StdRelief;
|
||||
ColorPair HiRelief;
|
||||
MyFont StdFont; /* font structure */
|
||||
MyFont WindowFont; /* font structure for window titles */
|
||||
#ifndef NO_PAGER
|
||||
MyFont PagerFont; /* font struct for window labels in pager (optional)*/
|
||||
#endif
|
||||
MyFont IconFont; /* for icon labels */
|
||||
|
||||
GC NormalGC; /* normal GC for menus, pager, resize window */
|
||||
GC StippleGC; /* normal GC for menus, pager, resize window */
|
||||
GC DrawGC; /* GC to draw lines for move and resize */
|
||||
GC HiReliefGC; /* GC for highlighted window relief */
|
||||
GC HiShadowGC; /* GC for highlighted window shadow */
|
||||
GC MenuGC;
|
||||
GC MenuStippleGC;
|
||||
GC MenuReliefGC;
|
||||
GC MenuShadowGC;
|
||||
GC StdReliefGC; /* GC for unselected window relief */
|
||||
GC StdShadowGC; /* GC for unselected window shadow */
|
||||
GC ScratchGC1;
|
||||
GC ScratchGC2;
|
||||
|
||||
GC StickyReliefGC; /* GC for unselected sticky window relief */
|
||||
GC StickyShadowGC; /* GC for unselected sticky window shadow */
|
||||
GC FontGC; /* GC for non-standard fonts */
|
||||
|
||||
int SizeStringWidth; /* minimum width of size window */
|
||||
int CornerWidth; /* corner width for decoratedwindows */
|
||||
int BoundaryWidth; /* frame width for decorated windows */
|
||||
int NoBoundaryWidth; /* frame width for decorated windows */
|
||||
int TitleHeight; /* height of the title bar window */
|
||||
FvwmWindow *Hilite; /* the fvwm window that is highlighted
|
||||
* except for networking delays, this is the
|
||||
* window which REALLY has the focus */
|
||||
FvwmWindow *Focus; /* Last window which Fvwm gave the focus to
|
||||
* NOT the window that really has the focus */
|
||||
FvwmWindow *Ungrabbed;
|
||||
FvwmWindow *PreviousFocus; /* Window which had focus before fvwm stole it
|
||||
* to do moves/menus/etc. */
|
||||
int EntryHeight; /* menu entry height */
|
||||
int EdgeScrollX; /* #pixels to scroll on screen edge */
|
||||
int EdgeScrollY; /* #pixels to scroll on screen edge */
|
||||
unsigned char buttons2grab; /* buttons to grab in click to focus mode */
|
||||
unsigned long flags;
|
||||
int IconBoxes[MAX_BOXES][4];
|
||||
int NumBoxes;
|
||||
int randomx; /* values used for randomPlacement */
|
||||
int randomy;
|
||||
unsigned VScale; /* Panner scale factor */
|
||||
FvwmWindow *LastWindowRaised; /* Last window which was raised. Used for raise
|
||||
* lower func. */
|
||||
int VxMax; /* Max location for top left of virt desk*/
|
||||
int VyMax;
|
||||
int Vx; /* Current loc for top left of virt desk */
|
||||
int Vy;
|
||||
|
||||
int nr_left_buttons; /* number of left-side title-bar buttons */
|
||||
int nr_right_buttons; /* number of right-side title-bar buttons */
|
||||
|
||||
int left_button_styles[2][5];
|
||||
int right_button_styles[2][5];
|
||||
|
||||
int ClickTime; /*Max button-click delay for Function built-in*/
|
||||
int AutoRaiseDelay; /* Delay between setting focus and raising win*/
|
||||
int ScrollResistance; /* resistance to scrolling in desktop */
|
||||
int MoveResistance; /* res to moving windows over viewport edge */
|
||||
int OpaqueSize;
|
||||
int CurrentDesk; /* The current desktop number */
|
||||
MenuRoot *InitFunction;
|
||||
MenuRoot *RestartFunction;
|
||||
|
||||
/* new style */
|
||||
Boolean use_new_style[10]; /* if true then use custom shapes */
|
||||
int left_num_coords[5];
|
||||
int left_x_coords[5][20];
|
||||
int left_y_coords[5][20];
|
||||
int left_line_style[5][20];
|
||||
int right_num_coords[5];
|
||||
int right_x_coords[5][20];
|
||||
int right_y_coords[5][20];
|
||||
int right_line_style[5][20];
|
||||
|
||||
} ScreenInfo;
|
||||
|
||||
extern ScreenInfo Scr;
|
||||
|
||||
/* for the flags value - these used to be seperate Bool's */
|
||||
#define ClickToFocus (1) /* Focus follows mouse, or click to focus?*/
|
||||
#define DecorateTransients (2) /* decorate transient windows? */
|
||||
#define DontMoveOff (4) /* make sure all windows stay on desktop*/
|
||||
#define RandomPlacement (8) /* place windows in random locations? */
|
||||
#define SuppressIcons (16) /* prevent generation of icon windows */
|
||||
#define StickyIcons (32) /* Icons always sticky? */
|
||||
#define EdgeWrapX (64) /* Should EdgeScroll wrap around? */
|
||||
#define EdgeWrapY (128)
|
||||
#define CenterOnCirculate (256) /* center window when circulating? */
|
||||
#define MWMBorders (512)
|
||||
#define MWMMenus (1024)
|
||||
#define MWMButtons (2048)
|
||||
#define MWMDecorHints (4096)
|
||||
#define NoPPosition (8192)
|
||||
#define SMART_PLACEMENT (16384)
|
||||
#define CirculateSkipIcons (32768)
|
||||
#define StubbornIcons (65536)
|
||||
#define StubbornPlacement (131072)
|
||||
#define StubbornIconPlacement (262144)
|
||||
#define OpaqueResize (524288)
|
||||
#define MWMFunctionHints (1048576)
|
||||
#define MWMHintOverride (2097152)
|
||||
#define BackingStore (4194304)
|
||||
#define AppsBackingStore (8388608)
|
||||
#define SaveUnders (16777216)
|
||||
#define Lenience (33554432)
|
||||
#define SloppyFocus (67108864)
|
||||
#endif /* _SCREEN_ */
|
399
fvwm/style.c
Normal file
399
fvwm/style.c
Normal file
@ -0,0 +1,399 @@
|
||||
/****************************************************************************
|
||||
* 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
|
||||
****************************************************************************/
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* code for parsing the fvwm style command
|
||||
*
|
||||
***********************************************************************/
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "fvwm.h"
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
#include "../version.h"
|
||||
|
||||
void ParseStyle(char *text, FILE *fd, char **list, int *junk)
|
||||
{
|
||||
extern char *orig_tline;
|
||||
char *name, *line;
|
||||
char *restofline,*tmp;
|
||||
char *icon_name = NULL;
|
||||
char *forecolor = NULL;
|
||||
char *backcolor = NULL;
|
||||
unsigned long off_buttons=0;
|
||||
unsigned long on_buttons=0;
|
||||
int butt;
|
||||
|
||||
int len,desknumber = 0,bw=0, nobw = 0;
|
||||
unsigned long off_flags = 0;
|
||||
unsigned long on_flags = 0;
|
||||
|
||||
name = stripcpy2(text,FALSE,TRUE);
|
||||
/* in case there was no argument! */
|
||||
if(name == NULL)
|
||||
return;
|
||||
|
||||
restofline = stripcpy3(text,FALSE);
|
||||
line = restofline;
|
||||
|
||||
if(restofline == NULL)return;
|
||||
while((*restofline != 0)&&(*restofline != '\n'))
|
||||
{
|
||||
while(isspace(*restofline))restofline++;
|
||||
if(mystrncasecmp(restofline,"ICON",4)==0)
|
||||
{
|
||||
restofline +=4;
|
||||
while(isspace(*restofline))restofline++;
|
||||
tmp = restofline;
|
||||
len = 0;
|
||||
while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&&(*tmp != '\n'))
|
||||
{
|
||||
tmp++;
|
||||
len++;
|
||||
}
|
||||
if(len > 0)
|
||||
{
|
||||
icon_name = safemalloc(len+1);
|
||||
strncpy(icon_name,restofline,len);
|
||||
icon_name[len] = 0;
|
||||
off_flags |= ICON_FLAG;
|
||||
on_flags |= SUPPRESSICON_FLAG;
|
||||
}
|
||||
else
|
||||
on_flags |= SUPPRESSICON_FLAG;
|
||||
restofline = tmp;
|
||||
}
|
||||
if(mystrncasecmp(restofline,"COLOR",5)==0)
|
||||
{
|
||||
restofline +=5;
|
||||
while(isspace(*restofline))restofline++;
|
||||
tmp = restofline;
|
||||
len = 0;
|
||||
while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&&
|
||||
(*tmp != '\n')&&(*tmp != '/')&&(!isspace(*tmp)))
|
||||
{
|
||||
tmp++;
|
||||
len++;
|
||||
}
|
||||
if(len > 0)
|
||||
{
|
||||
forecolor = safemalloc(len+1);
|
||||
strncpy(forecolor,restofline,len);
|
||||
forecolor[len] = 0;
|
||||
off_flags |= FORE_COLOR_FLAG;
|
||||
}
|
||||
|
||||
while(isspace(*tmp))tmp++;
|
||||
if(*tmp == '/')
|
||||
{
|
||||
tmp++;
|
||||
while(isspace(*tmp))tmp++;
|
||||
restofline = tmp;
|
||||
len = 0;
|
||||
while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&&
|
||||
(*tmp != '\n')&&(*tmp != '/')&&(!isspace(*tmp)))
|
||||
{
|
||||
tmp++;
|
||||
len++;
|
||||
}
|
||||
if(len > 0)
|
||||
{
|
||||
backcolor = safemalloc(len+1);
|
||||
strncpy(backcolor,restofline,len);
|
||||
backcolor[len] = 0;
|
||||
off_flags |= BACK_COLOR_FLAG;
|
||||
}
|
||||
}
|
||||
restofline = tmp;
|
||||
}
|
||||
if(mystrncasecmp(restofline,"FORECOLOR",9)==0)
|
||||
{
|
||||
restofline +=9;
|
||||
while(isspace(*restofline))restofline++;
|
||||
tmp = restofline;
|
||||
len = 0;
|
||||
while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&&
|
||||
(*tmp != '\n')&&(*tmp != '/')&&(!isspace(*tmp)))
|
||||
{
|
||||
tmp++;
|
||||
len++;
|
||||
}
|
||||
if(len > 0)
|
||||
{
|
||||
forecolor = safemalloc(len+1);
|
||||
strncpy(forecolor,restofline,len);
|
||||
forecolor[len] = 0;
|
||||
off_flags |= FORE_COLOR_FLAG;
|
||||
}
|
||||
restofline = tmp;
|
||||
}
|
||||
|
||||
if(mystrncasecmp(restofline,"BACKCOLOR",9)==0)
|
||||
{
|
||||
restofline +=9;
|
||||
while(isspace(*restofline))restofline++;
|
||||
tmp = restofline;
|
||||
len = 0;
|
||||
while((tmp != NULL)&&(*tmp != 0)&&(*tmp != ',')&&
|
||||
(*tmp != '\n')&&(*tmp != '/')&&(!isspace(*tmp)))
|
||||
{
|
||||
tmp++;
|
||||
len++;
|
||||
}
|
||||
if(len > 0)
|
||||
{
|
||||
backcolor = safemalloc(len+1);
|
||||
strncpy(backcolor,restofline,len);
|
||||
backcolor[len] = 0;
|
||||
off_flags |= BACK_COLOR_FLAG;
|
||||
}
|
||||
restofline = tmp;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"NoIconTitle",11)==0)
|
||||
{
|
||||
off_flags |= NOICON_TITLE_FLAG;
|
||||
restofline +=11;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"IconTitle",9)==0)
|
||||
{
|
||||
on_flags |= NOICON_TITLE_FLAG;
|
||||
restofline +=9;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"NOICON",6)==0)
|
||||
{
|
||||
restofline +=6;
|
||||
off_flags |= SUPPRESSICON_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"NOTITLE",7)==0)
|
||||
{
|
||||
restofline +=7;
|
||||
off_flags |= NOTITLE_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"TITLE",5)==0)
|
||||
{
|
||||
restofline +=5;
|
||||
on_flags |= NOTITLE_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"NOHANDLES",9)==0)
|
||||
{
|
||||
restofline +=9;
|
||||
off_flags |= NOBORDER_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"HANDLES",7)==0)
|
||||
{
|
||||
restofline +=7;
|
||||
on_flags |= NOBORDER_FLAG;
|
||||
}
|
||||
else if (mystrncasecmp(restofline,"NOBUTTON",8)==0)
|
||||
{
|
||||
restofline +=8;
|
||||
|
||||
sscanf(restofline,"%d",&butt);
|
||||
while(isspace(*restofline))restofline++;
|
||||
while((!isspace(*restofline))&&(*restofline!= 0)&&
|
||||
(*restofline != ',')&&(*restofline != '\n'))
|
||||
restofline++;
|
||||
while(isspace(*restofline))restofline++;
|
||||
|
||||
off_buttons |= (1<<(butt-1));
|
||||
}
|
||||
else if (mystrncasecmp(restofline,"BUTTON",6)==0)
|
||||
{
|
||||
restofline +=6;
|
||||
|
||||
sscanf(restofline,"%d",&butt);
|
||||
while(isspace(*restofline))restofline++;
|
||||
while((!isspace(*restofline))&&(*restofline!= 0)&&
|
||||
(*restofline != ',')&&(*restofline != '\n'))
|
||||
restofline++;
|
||||
while(isspace(*restofline))restofline++;
|
||||
|
||||
on_buttons |= (1<<(butt-1));
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"WindowListSkip",14)==0)
|
||||
{
|
||||
restofline +=14;
|
||||
off_flags |= LISTSKIP_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"WindowListHit",13)==0)
|
||||
{
|
||||
restofline +=13;
|
||||
on_flags |= LISTSKIP_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"CirculateSkip",13)==0)
|
||||
{
|
||||
restofline +=13;
|
||||
off_flags |= CIRCULATESKIP_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"CirculateHit",12)==0)
|
||||
{
|
||||
restofline +=12;
|
||||
on_flags |= CIRCULATESKIP_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"StartIconic",11)==0)
|
||||
{
|
||||
restofline +=11;
|
||||
off_flags |= START_ICONIC_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"StartNormal",11)==0)
|
||||
{
|
||||
restofline +=11;
|
||||
on_flags |= START_ICONIC_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"StaysOnTop",10)==0)
|
||||
{
|
||||
restofline +=10;
|
||||
off_flags |= STAYSONTOP_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"StaysPut",8)==0)
|
||||
{
|
||||
restofline +=8;
|
||||
on_flags |= STAYSONTOP_FLAG;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"Sticky",6)==0)
|
||||
{
|
||||
off_flags |= STICKY_FLAG;
|
||||
restofline +=6;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"Slippery",8)==0)
|
||||
{
|
||||
on_flags |= STICKY_FLAG;
|
||||
restofline +=8;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"BorderWidth",11)==0)
|
||||
{
|
||||
restofline +=11;
|
||||
off_flags |= BW_FLAG;
|
||||
sscanf(restofline,"%d",&bw);
|
||||
while(isspace(*restofline))restofline++;
|
||||
while((!isspace(*restofline))&&(*restofline!= 0)&&
|
||||
(*restofline != ',')&&(*restofline != '\n'))
|
||||
restofline++;
|
||||
while(isspace(*restofline))restofline++;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"HandleWidth",11)==0)
|
||||
{
|
||||
restofline +=11;
|
||||
off_flags |= NOBW_FLAG;
|
||||
sscanf(restofline,"%d",&nobw);
|
||||
while(isspace(*restofline))restofline++;
|
||||
while((!isspace(*restofline))&&(*restofline!= 0)&&
|
||||
(*restofline != ',')&&(*restofline != '\n'))
|
||||
restofline++;
|
||||
while(isspace(*restofline))restofline++;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"STARTSONDESK",12)==0)
|
||||
{
|
||||
restofline +=12;
|
||||
off_flags |= STAYSONDESK_FLAG;
|
||||
sscanf(restofline,"%d",&desknumber);
|
||||
while(isspace(*restofline))restofline++;
|
||||
while((!isspace(*restofline))&&(*restofline!= 0)&&
|
||||
(*restofline != ',')&&(*restofline != '\n'))
|
||||
restofline++;
|
||||
while(isspace(*restofline))restofline++;
|
||||
}
|
||||
else if(mystrncasecmp(restofline,"STARTSANYWHERE",14)==0)
|
||||
{
|
||||
restofline +=14;
|
||||
on_flags |= STAYSONDESK_FLAG;
|
||||
}
|
||||
while(isspace(*restofline))restofline++;
|
||||
if(*restofline == ',')
|
||||
restofline++;
|
||||
else if((*restofline != 0)&&(*restofline != '\n'))
|
||||
{
|
||||
fvwm_err("bad style command in line %s at %s",
|
||||
orig_tline,restofline,NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/* capture default icons */
|
||||
if(strcmp(name,"*") == 0)
|
||||
{
|
||||
if(off_flags & ICON_FLAG)
|
||||
Scr.DefaultIcon = icon_name;
|
||||
off_flags &= ~ICON_FLAG;
|
||||
icon_name = NULL;
|
||||
}
|
||||
|
||||
/* capture default colors */
|
||||
if(strcmp(name,"*") == 0)
|
||||
{
|
||||
extern char *Stdfore, *Stdback;
|
||||
|
||||
if(off_flags & FORE_COLOR_FLAG)
|
||||
Stdfore = forecolor;
|
||||
off_flags &= ~FORE_COLOR_FLAG;
|
||||
forecolor = NULL;
|
||||
if(off_flags & BACK_COLOR_FLAG)
|
||||
Stdback = backcolor;
|
||||
off_flags &= ~BACK_COLOR_FLAG;
|
||||
backcolor = NULL;
|
||||
}
|
||||
free(line);
|
||||
AddToList(name,icon_name,off_flags,on_flags,desknumber,bw,nobw,
|
||||
forecolor,backcolor,off_buttons,on_buttons);
|
||||
}
|
||||
|
||||
|
||||
void AddToList(char *name, char *icon_name, unsigned long off_flags,
|
||||
unsigned long on_flags, int desk, int bw, int nobw,
|
||||
char *forecolor, char *backcolor,
|
||||
unsigned long off_buttons, unsigned long on_buttons)
|
||||
{
|
||||
name_list *nptr,*lastptr = NULL;
|
||||
|
||||
if((name == NULL)||((off_flags == 0)&&(on_flags == 0)&&(on_buttons == 0)&&
|
||||
(off_buttons == 0)))
|
||||
{
|
||||
if(name)
|
||||
free(name);
|
||||
if(icon_name)
|
||||
free(icon_name);
|
||||
return;
|
||||
}
|
||||
|
||||
/* used to merge duplicate entries, but that is no longer
|
||||
* appropriate since conficting styles are possible, and the
|
||||
* last match should win! */
|
||||
for (nptr = Scr.TheList; nptr != NULL; nptr = nptr->next)
|
||||
{
|
||||
lastptr=nptr;
|
||||
}
|
||||
|
||||
nptr = (name_list *)safemalloc(sizeof(name_list));
|
||||
nptr->next = NULL;
|
||||
nptr->name = name;
|
||||
nptr->on_flags = on_flags;
|
||||
nptr->off_flags = off_flags;
|
||||
nptr->value = icon_name;
|
||||
nptr->Desk = desk;
|
||||
nptr->border_width = bw;
|
||||
nptr->resize_width = nobw;
|
||||
nptr->ForeColor = forecolor;
|
||||
nptr->BackColor = backcolor;
|
||||
|
||||
nptr->off_buttons = off_buttons;
|
||||
nptr->on_buttons = on_buttons;
|
||||
|
||||
if(lastptr != NULL)
|
||||
lastptr->next = nptr;
|
||||
else
|
||||
Scr.TheList = nptr;
|
||||
}
|
||||
|
55
fvwm/sun_headers.h
Normal file
55
fvwm/sun_headers.h
Normal file
@ -0,0 +1,55 @@
|
||||
/**************************************************************************/
|
||||
/* Prototypes that don't exist on suns */
|
||||
/* If I do ALL this, I can compile OK with -Wall -Wstrict-prototypes on the
|
||||
* Sun's */
|
||||
|
||||
#if defined(sun) && !defined(SVR4)
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
|
||||
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
||||
|
||||
extern int system(char *command);
|
||||
extern int toupper(int);
|
||||
extern int tolower(int);
|
||||
|
||||
/* stdio things */
|
||||
extern int fputc(char, FILE *);
|
||||
extern int fgetc(FILE *);
|
||||
extern int fputs(char *, FILE *);
|
||||
extern char *mktemp(char *);
|
||||
extern int pclose(FILE *);
|
||||
extern int sscanf(char *input, char *format, ...);
|
||||
extern int printf(char *format, ...);
|
||||
extern int fprintf(FILE *file,char *format, ...);
|
||||
extern int fseek(FILE *file,long offset,int);
|
||||
extern int fclose(FILE *file);
|
||||
extern int fread(char *data, int size, int count, FILE *file);
|
||||
extern int fflush(FILE *file);
|
||||
extern void perror(char *s);
|
||||
|
||||
/* string manipulation */
|
||||
extern int strncasecmp(char *str1, char *str2, int length);
|
||||
extern int strcasecmp(char *str1, char *str2);
|
||||
extern int putenv(char *);
|
||||
|
||||
/* sunOS defines SIG_IGN, but they get it wrong, as far as GCC
|
||||
* is concerned */
|
||||
#ifdef SIG_IGN
|
||||
#undef SIG_IGN
|
||||
#endif
|
||||
#define SIG_IGN (void (*)(int))1
|
||||
int wait3(int *, int, struct rusage *);
|
||||
int sigsetmask(int);
|
||||
int sigblock(int);
|
||||
|
||||
int setitimer(int, struct itimerval *, struct itimerval *);
|
||||
int getitimer(int, struct itimerval *);
|
||||
int bzero(char *, int);
|
||||
|
||||
long time(long *);
|
||||
int gethostname(char *name, int namelen);
|
||||
/**************************************************************************/
|
||||
#endif
|
159
fvwm/windows.c
Normal file
159
fvwm/windows.c
Normal file
@ -0,0 +1,159 @@
|
||||
/****************************************************************************
|
||||
* This module is all new
|
||||
* by Rob Nation
|
||||
* A little of it is borrowed from ctwm.
|
||||
* Copyright 1993 Robert Nation. No restrictions are placed on this code,
|
||||
* as long as the copyright notice is preserved
|
||||
****************************************************************************/
|
||||
/***********************************************************************
|
||||
*
|
||||
* fvwm window-list popup code
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "fvwm.h"
|
||||
#include "menus.h"
|
||||
#include "misc.h"
|
||||
#include "parse.h"
|
||||
#include "screen.h"
|
||||
|
||||
/* I tried to include "limits.h" to get these values, but it
|
||||
* didn't work for some reason */
|
||||
/* Minimum and maximum values a `signed int' can hold. */
|
||||
#define MY_INT_MIN (- MY_INT_MAX - 1)
|
||||
#define MY_INT_MAX 2147483647
|
||||
|
||||
extern XContext MenuContext;
|
||||
/*
|
||||
* Change by PRB (pete@tecc.co.uk), 31/10/93. Prepend a hot key
|
||||
* specifier to each item in the list. This means allocating the
|
||||
* memory for each item (& freeing it) rather than just using the window
|
||||
* title directly. */
|
||||
void do_windowList(int val1, int val2)
|
||||
{
|
||||
#ifndef NO_WINDOWLIST
|
||||
MenuRoot *mr;
|
||||
MenuItem *mi,*tmp;
|
||||
FvwmWindow *t;
|
||||
char *tname;
|
||||
char loc[40],*name=NULL;
|
||||
int dwidth,dheight;
|
||||
char tlabel[50];
|
||||
int last_desk_done = MY_INT_MIN;
|
||||
int next_desk;
|
||||
|
||||
char *t_hot; /* Menu label with hotkey added */
|
||||
char scut = '0'; /* Current short cut key */
|
||||
|
||||
sprintf(tlabel,"CurrentDesk: %d",Scr.CurrentDesk);
|
||||
mr=NewMenuRoot(tlabel);
|
||||
AddToMenu(mr, tlabel, "Geometry", NULL, F_TITLE,0,0,'s','s');
|
||||
|
||||
next_desk = 0;
|
||||
while(next_desk != MY_INT_MAX)
|
||||
{
|
||||
/* Sort window list by desktop number */
|
||||
if((val1 < 2)&&(val1 > -2))
|
||||
{
|
||||
next_desk = MY_INT_MAX;
|
||||
for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
|
||||
{
|
||||
if((t->Desk >last_desk_done)&&(t->Desk < next_desk))
|
||||
next_desk = t->Desk;
|
||||
}
|
||||
}
|
||||
else if((val1 <4)&&(val1 > -4))
|
||||
{
|
||||
if(last_desk_done == MY_INT_MIN)
|
||||
next_desk = Scr.CurrentDesk;
|
||||
else
|
||||
next_desk = MY_INT_MAX;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(last_desk_done == MY_INT_MIN)
|
||||
next_desk = val2;
|
||||
else
|
||||
next_desk = MY_INT_MAX;
|
||||
}
|
||||
last_desk_done = next_desk;
|
||||
for (t = Scr.FvwmRoot.next; t != NULL; t = t->next)
|
||||
{
|
||||
if((t->Desk == next_desk)&&
|
||||
(!(t->flags & WINDOWLISTSKIP)))
|
||||
{
|
||||
if (++scut == ('9' + 1)) scut = 'A'; /* Next shortcut key */
|
||||
if(val1%2 != 0)
|
||||
name = t->icon_name;
|
||||
else
|
||||
name = t->name;
|
||||
t_hot = safemalloc(strlen(name) + 8);
|
||||
sprintf(t_hot, "&%c. %s", scut, name); /* Generate label */
|
||||
|
||||
tname = safemalloc(40);
|
||||
tname[0]=0;
|
||||
if(t->flags & ICONIFIED)
|
||||
strcpy(tname, "(");
|
||||
sprintf(loc,"%d:",t->Desk);
|
||||
strcat(tname,loc);
|
||||
if(t->frame_x >=0)
|
||||
sprintf(loc,"+%d",t->frame_x);
|
||||
else
|
||||
sprintf(loc,"%d",t->frame_x);
|
||||
strcat(tname, loc);
|
||||
if(t->frame_y >=0)
|
||||
sprintf(loc,"+%d",t->frame_y);
|
||||
else
|
||||
sprintf(loc,"%d",t->frame_y);
|
||||
strcat(tname, loc);
|
||||
dheight = t->frame_height - t->title_height - 2*t->boundary_width;
|
||||
dwidth = t->frame_width - 2*t->boundary_width;
|
||||
|
||||
dwidth -= t->hints.base_width;
|
||||
dheight -= t->hints.base_height;
|
||||
|
||||
dwidth /= t->hints.width_inc;
|
||||
dheight /= t->hints.height_inc;
|
||||
|
||||
sprintf(loc,"x%d",dwidth);
|
||||
strcat(tname, loc);
|
||||
sprintf(loc,"x%d",dheight);
|
||||
strcat(tname, loc);
|
||||
if(t->flags & ICONIFIED)
|
||||
strcat(tname, ")");
|
||||
|
||||
AddToMenu(mr, t_hot, tname, NULL, F_RAISE_IT,
|
||||
(long)t,(long)(t->w),'s','s');
|
||||
}
|
||||
}
|
||||
}
|
||||
MakeMenu(mr);
|
||||
|
||||
do_menu(mr);
|
||||
|
||||
XDestroyWindow(dpy,mr->w);
|
||||
XDeleteContext(dpy, mr->w, MenuContext);
|
||||
/* need to free the window list ? */
|
||||
mi = mr->first;
|
||||
while(mi != NULL)
|
||||
{
|
||||
tmp = mi->next;
|
||||
if (mi->func != F_TITLE)
|
||||
{
|
||||
if (mi->item != NULL) free(mi->item);
|
||||
if (mi->item2 != NULL) free(mi->item2);
|
||||
}
|
||||
free(mi);
|
||||
mi = tmp;
|
||||
}
|
||||
free(mr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
41
fvwm_icons/arrdown2.xpm
Normal file
41
fvwm_icons/arrdown2.xpm
Normal file
@ -0,0 +1,41 @@
|
||||
/* XPM */
|
||||
static char * arrdown[] = {
|
||||
/* arrdown pixmap
|
||||
* width height ncolors chars_per_pixel */
|
||||
"32 32 2 2 ",
|
||||
" s None c None",
|
||||
". c #000 s s_#000 ",
|
||||
/* pixels */
|
||||
" . . . . . . . . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . . . . . . . . ",
|
||||
" . . . . ",
|
||||
" . . . . ",
|
||||
" . . . . ",
|
||||
" . . . . ",
|
||||
" . . . . ",
|
||||
" . . . . ",
|
||||
" . . . . ",
|
||||
" . . . ",
|
||||
" . "
|
||||
} ;
|
51
fvwm_icons/arrows2.xpm
Normal file
51
fvwm_icons/arrows2.xpm
Normal file
@ -0,0 +1,51 @@
|
||||
/* XPM */
|
||||
static char *noname[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 12 1",
|
||||
/* colors */
|
||||
"` c #CBFFFF",
|
||||
"a c #AB0000",
|
||||
"c c #326565",
|
||||
"e c red",
|
||||
"g c green",
|
||||
"h c #770000",
|
||||
"i c #99CCCC",
|
||||
"j c #00AB00",
|
||||
"l c #007700",
|
||||
"m c #005500",
|
||||
"q c #DC0000",
|
||||
"v c black",
|
||||
/* pixels */
|
||||
"```````````````````````````````i",
|
||||
"`iiiiiiiiiiiiiiiiiiiiiiiiiiiiiic",
|
||||
"`iiiiiiiiiiiiiiiiiiiiiiiiiiiiiic",
|
||||
"`iiiiiiiiiiiiiiiiiiiviiiiiiiiiic",
|
||||
"`iiiiiiiiiiiiiiiiiivlviiiiiiiiic",
|
||||
"`iiiiiiiiiiiiiiiiivllmviiiiiiiic",
|
||||
"`iiiiiiiiiiiiiiiiiivlmmviiiiiiic",
|
||||
"`iiiiiiiiiiiiiiiiiiivmmmviiiiiic",
|
||||
"`iiivgvvvgvvvvvvvvvvvvmmmviiiiic",
|
||||
"`iiiiggggggggjjjjllllmmmmvviiiic",
|
||||
"`iiiiivgvvvggjjjjllllmmmmvvviiic",
|
||||
"`iiiiiiggggggjjjjllllmmmmvviiiic",
|
||||
"`iiiiiiivgvvvjvvvvvvvvmmmviiiiic",
|
||||
"`iiiiiiiiiiiiiiiiiiivmmmviiiiiic",
|
||||
"`iiiiiiiiiiviiiiiiivlmmviiiiiiic",
|
||||
"`iiiiiiiiivqviiiiivllmviiiiiiiic",
|
||||
"`iiiiiiiivqqqviiiiivlviiiiiiiiic",
|
||||
"`iiiiiiivqqqviiiiiiiviiiiiiiiiic",
|
||||
"`iiiiiiveqqviiiiiiiiiiiiiiiiiiic",
|
||||
"`iiiiiveeqvvvvvvvvvvvvhvvvvviiic",
|
||||
"`iiiiveeeqqqqaaaahhhhhhhhhviiiic",
|
||||
"`iiiveeeeqqqqaaaahhhhvvvhviiiiic",
|
||||
"`iiiiveeeqqqqaaaahhhhhhhhiiiiiic",
|
||||
"`iiiiiveeqvvvvvvvvhvvvhviiiiiiic",
|
||||
"`iiiiiiveqqviiiiiiiiiiiiiiiiiiic",
|
||||
"`iiiiiiivqqqviiiiiiiiiiiiiiiiiic",
|
||||
"`iiiiiiiivqqqviiiiiiiiiiiiiiiiic",
|
||||
"`iiiiiiiiivqviiiiiiiiiiiiiiiiiic",
|
||||
"`iiiiiiiiiiviiiiiiiiiiiiiiiiiiic",
|
||||
"`iiiiiiiiiiiiiiiiiiiiiiiiiiiiiic",
|
||||
"`iiiiiiiiiiiiiiiiiiiiiiiiiiiiiic",
|
||||
"iccccccccccccccccccccccccccccccc"
|
||||
};
|
41
fvwm_icons/arrup2.xpm
Normal file
41
fvwm_icons/arrup2.xpm
Normal file
@ -0,0 +1,41 @@
|
||||
/* XPM */
|
||||
static char * arrup[] = {
|
||||
/* arrup pixmap
|
||||
* width height ncolors chars_per_pixel */
|
||||
"32 32 2 2 ",
|
||||
" s None c None",
|
||||
". c #000 s s_#000 ",
|
||||
/* pixels */
|
||||
" . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . ",
|
||||
" . . . . . . . . . . ",
|
||||
" . . . . . . . . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . ",
|
||||
" . . . . . . . . . . ",
|
||||
" . . . . . . . . . "
|
||||
} ;
|
47
fvwm_icons/bomb.xpm
Normal file
47
fvwm_icons/bomb.xpm
Normal file
@ -0,0 +1,47 @@
|
||||
/* XPM */
|
||||
static char * icl8_11432_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 9 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
"o c #999999",
|
||||
"O c black",
|
||||
"+ c #333333",
|
||||
"@ c #111111",
|
||||
"# c #FF6666",
|
||||
"$ c #FEFE00",
|
||||
"% c #DDDDDD",
|
||||
"& c #BBBBBB",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" oOoOo ",
|
||||
" O Oo ",
|
||||
" o O ",
|
||||
" O o ",
|
||||
" +++++ O ",
|
||||
" +@@@+ o ",
|
||||
" +@@O@@+ O ",
|
||||
" ++@OOO@O@++ o # $",
|
||||
" +@@OOOOOOO@@+ O $ # ",
|
||||
" +@OOOOOOOOOOO@+ o $ ",
|
||||
" +@OOOOOO%&oOO@+ O # $ ",
|
||||
" +@OOOOOOOO%&oOO@+ o ",
|
||||
" +@OOOOOOOOOOOOO@+ OoO # $ #",
|
||||
" +@OOOOOOOOO%&oO@+ ",
|
||||
" +@OOOOOOOOO%&oO@+ $ $ ",
|
||||
" +@OOOOOOOOO%&oO@+ # # ",
|
||||
" +@OOOOOOOO%&oOO@+ # ",
|
||||
" +@OOOOOOOO%&oOO@+ $ $ $",
|
||||
" +@OOOOOO%&oOO@+ ",
|
||||
" +@OOOOOOOOOOO@+ # ",
|
||||
" +@@OOOOOOO@@+ ",
|
||||
" ++@@@@@@@++ ",
|
||||
" +++++++ ",
|
||||
" "};
|
17
fvwm_icons/ccode.icon
Normal file
17
fvwm_icons/ccode.icon
Normal file
@ -0,0 +1,17 @@
|
||||
/* This X bitmap is designed for use with the X Desktop Manager.
|
||||
* it was designed by Edward Groenendaal, April 1991.
|
||||
*/
|
||||
#define ccode_width 32
|
||||
#define ccode_height 32
|
||||
static char ccode_bits[] = {
|
||||
0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0xe0, 0x41, 0x01,
|
||||
0x10, 0xf8, 0x43, 0x02, 0x10, 0x3c, 0x47, 0x04, 0x10, 0x1c, 0xc6, 0x0f,
|
||||
0x10, 0x1e, 0x00, 0x08, 0x10, 0x0e, 0x00, 0x08, 0x10, 0x0e, 0x00, 0x08,
|
||||
0x10, 0x0e, 0x00, 0x08, 0x10, 0x0e, 0x00, 0x08, 0x10, 0x1e, 0x00, 0x08,
|
||||
0x10, 0x1c, 0x06, 0x08, 0x10, 0x3c, 0x07, 0x08, 0x10, 0xf8, 0x03, 0x08,
|
||||
0xd0, 0xe0, 0x01, 0x08, 0x10, 0x00, 0x00, 0x08, 0x90, 0x05, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x90, 0xdf, 0x0a, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0xb7, 0x03, 0x08, 0x10, 0x00, 0x00, 0x08, 0x90, 0xbd, 0xb7, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x6c, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x90, 0xdd, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
|
43
fvwm_icons/clamp.xpm
Normal file
43
fvwm_icons/clamp.xpm
Normal file
@ -0,0 +1,43 @@
|
||||
/* XPM */
|
||||
static char * icl8_17087_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 5 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c wheat",
|
||||
"o c tan",
|
||||
"O c #555555",
|
||||
/* pixels */
|
||||
" ................... ",
|
||||
" .XXXXXXXXXXXXXXXXX.. ",
|
||||
" .XXXXXX............o. ",
|
||||
" .XXXXX.OOOOOOOOOOO.oo. ",
|
||||
" .XXXXX.OOOO........ooo. ",
|
||||
" .XXXXX.OOO.XXXXXXX.oooo. ",
|
||||
" .XXXX.......XXXXXX....... ",
|
||||
" .XXXX.......XXXXXXX....o. ",
|
||||
" .XXXXXXXXXXXXXXXXXX....o. ",
|
||||
" .XXXXXXXXXXXXXXXXXX.OO.X. ",
|
||||
" .XXXXXXXXXXXXXXXXXX.OO.X. ",
|
||||
" .XXXXXXXXXXXXXXXXXX.OO.X. ",
|
||||
" .XXXXXXXXXXXXXXXXXX.OO.X. ",
|
||||
" .XXXXXXXXXXXXXXXXXX.OO.X. ",
|
||||
" .XXXXXXXXXXXXXXXXXX.OO.X. ",
|
||||
" .XXXXXXXXXXXXXXXXXX.OO.X. ",
|
||||
" .XXXXXXXXXXXXXXXXXX.OO.X. ",
|
||||
" .XXXXXXXXXXXXXXXXXX.OO.X. ",
|
||||
" .XXXX.......XXXXXXX.OO.X. ",
|
||||
" .XXXX.......XXXXXXX.OO.X. ",
|
||||
" .XXXXX.....XXXXXXXX.OO.X. ",
|
||||
" .XXXXXX.O.XXXXXXXX.OOO.X. ",
|
||||
" .XXXX..............OOO.X. ",
|
||||
" .XXXX.OOOOOOOOOOOOOOO.XX. ",
|
||||
" .XXXX................XXX. ",
|
||||
" .XXXXXX.O.XXXXXXXXXXXXXX. ",
|
||||
" .XXXXXX...XXXXXXXXXXXXXX. ",
|
||||
" .X.XXXX.O.XXXX.XXXXXXXXX. ",
|
||||
" .X.............XXXXXXXXX. ",
|
||||
" .X.XXXX...XXXX.XXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" ......................... "};
|
60
fvwm_icons/datebook.xpm
Normal file
60
fvwm_icons/datebook.xpm
Normal file
@ -0,0 +1,60 @@
|
||||
/* XPM */
|
||||
/*****************************************************************************/
|
||||
/** This pixmap is kindly offered by Ion Cionca - 1992 - **/
|
||||
/** Swiss Federal Institute of Technology **/
|
||||
/** Central Computing Service **/
|
||||
/*****************************************************************************/
|
||||
static char * image_name [] = {
|
||||
"64 38 13 1",
|
||||
/**/
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c blue",
|
||||
"o c red",
|
||||
"O c white",
|
||||
"+ c lightskyblue",
|
||||
"@ c navy",
|
||||
"# c darkslategrey",
|
||||
"$ c lightyellow",
|
||||
"% c gray85",
|
||||
"& c peachpuff4",
|
||||
"* c gray70",
|
||||
"= c tan",
|
||||
" ",
|
||||
" ",
|
||||
" ..................... XXXXXXXX ",
|
||||
" ..ooooooooooooooooooo. XOO+XXXXXXX ",
|
||||
" .o.ooooooooooooooooooo. XOO+XXXXXXXXX ",
|
||||
" .o.ooooooooooooooooooo. XXO++XXXXXXXXXXXX ",
|
||||
" .o.ooooooooooooooooooo. XX++++++++++XXXXXXX ",
|
||||
" .o.ooooooooooooooooooo. @@@@@@@@@@@@@@@@@@@ ",
|
||||
" .o..................... ################### ",
|
||||
" .o.$$$$$$$$$$$$$$$$$$. XXXXXX%%%XXXXXX ",
|
||||
" ..&.$$$$$$$$$$$$$$$$$. XXX%%***@****%XXX ",
|
||||
" .&&.$$$$$$$$@@@$$$$$$. XXX%%%%%%@%%***%XXX ",
|
||||
" .&=.$$$@@$$@@$@@$$$$$. XX%%%%%%%@@@%%***%%XX ",
|
||||
" .&=.$$$@@$$@@$@@$$$$$. XX%%%%%%%%@@@%%%***%%XX ",
|
||||
" .&=.$$$@@@$$$$@@@@$$$. #XXX%%%%%%%%@@@%%%%%**%XXX ",
|
||||
" .&=.$$$@$@$$$@@$$@@$$$. ##XX%%%%%%%%%@@@%%%%%***%XX ",
|
||||
" .&=.$$$@$@$$$$$$$$@@$$. ##X%%%%%%%%%%@@@%%%%%****%XX ",
|
||||
" .&=.$$$@$@@$$$$$$$$@$$.##XX%%%%%%%%%%@@@%%%%%%***%XX ",
|
||||
" .&=.$$$$$$@$$$$$$$$@$$$##XX%%%%%%%%%%%@%%%%%%%%**%XXX ",
|
||||
" .&=..$$$$$@@$$$$$$$@$$###X%%%%%%%%%%%%@%%%%%%%%***%XX ",
|
||||
" .&=..$$$$$$@@$$@@$@@$$##XX%%%%%%%%%%%%@%%%%%%%%%**%XX ",
|
||||
" .&=.=.$$$$$$@@$$@@@$$$##XX%%%%%%%%%%%@%@%%%%%%%%**%XX ",
|
||||
" .&=.=.$$$$$$$@@$$$$$$$##XX%%%%%%%%%%%%@%%%%%%%%%**%XX ",
|
||||
" .&=..=.$$$$$$$$$$$$$$$##XX%%%%%%%%%%%%%%@@%%%%%%*%%XX ",
|
||||
" .&=..=.$$$$$$$$$$$$$$$###XX%%%%%%%%%%%%%@@@%%%%%*%XXX ",
|
||||
" .&=.=.=.$$$$$$$$$.$$$$###XX%%%%%%%%%%%%%%@@%%%%%%%XXX ",
|
||||
" .&=.=.==.$$$$$$$..$$$$$##XX%%%%%%%%%%%%%%%%@%%%%%%XX ",
|
||||
" .&=.=.===..$$$$.$$.$$$$###XX%%%%%%%%%%%%%%%%%%%%%XX ",
|
||||
" .&==.=.$==*....$$$$.....##XXX%%%%%%%%%%%%%%%%%%%XXX ",
|
||||
" .&&=..=.$==**.$$$$$$$..$###XX%%%%%%%%%%%%%%%%%%%XX ",
|
||||
" .&&==.==.$===*.......*$..###XX%%%%%%%%%%%%%%%%%XX ",
|
||||
" .&&&=..$.$=======$$$.... ###XXX%%%%%%%%%%%%%XXX ",
|
||||
" .&&&&=..............&. ##XXXX%%%%%%%%%%%XXXX ",
|
||||
" .&&&&&=============&&. ##XX#XXXXX%%%XXXXXXXX ",
|
||||
" ...................... #XX#####XXXXXX##X####X ",
|
||||
" ##X ########### ###XX ",
|
||||
" #X ##X ",
|
||||
" "};
|
27
fvwm_icons/default.xbm
Normal file
27
fvwm_icons/default.xbm
Normal file
@ -0,0 +1,27 @@
|
||||
#define default_width 48
|
||||
#define default_height 48
|
||||
static char default_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xac, 0xaa, 0xaa, 0xab, 0xaa, 0x2a,
|
||||
0xa4, 0xaa, 0xaa, 0xa9, 0xaa, 0x2a, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x20,
|
||||
0x04, 0x00, 0x80, 0x01, 0x00, 0x20, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f,
|
||||
0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xac, 0xaa, 0xaa, 0xab, 0xaa, 0x2a,
|
||||
0xa4, 0xaa, 0xaa, 0xa9, 0xaa, 0x2a, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0xfc, 0xff, 0x9f, 0xff, 0xff, 0x27,
|
||||
0xa4, 0xaa, 0x8a, 0xa9, 0xaa, 0x22, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x20,
|
||||
0x04, 0x00, 0x80, 0x01, 0x00, 0x20, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
46
fvwm_icons/desk.xpm
Normal file
46
fvwm_icons/desk.xpm
Normal file
@ -0,0 +1,46 @@
|
||||
/* XPM */
|
||||
static char * icl8_30231_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 8 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #660000",
|
||||
"X c #CD3300",
|
||||
"o c #33FE00",
|
||||
"O c #986500",
|
||||
"+ c #220000",
|
||||
"@ c #550000",
|
||||
"# c #983200",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
"......................... ",
|
||||
".XXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
".XXXXXoooOXoooXOoooXoXXoXX. ",
|
||||
"+.XXXXoXXoXoXXXoXXXXoXoXXXX. ",
|
||||
"++.XXXoXXoXooXXOooOXoooXXXXX. ",
|
||||
"+++.XXoXXoXoXXXXXXoXoXXoXXXXX. ",
|
||||
"++++.XoooOXoooXoooOXoXXXoXXXXX. ",
|
||||
"+++++.XXXXXXXXXXXXXXXXXXXXXXXXX.",
|
||||
"++++++@@@@@@@@@@@@@@@@@@@@@@@@@@",
|
||||
"++++++@######@ +++++@######@",
|
||||
"++++++@######@ ++++@######@",
|
||||
"++++++@@@@@@@@ +++@@@@@@@@",
|
||||
"++++++@######@ ++@######@",
|
||||
" +++++@######@ +@######@",
|
||||
" ++++@@@@@@@@ @@@@@@@@",
|
||||
" +++@######@ @######@",
|
||||
" ++@######@ @######@",
|
||||
" +@######@ @######@",
|
||||
" @@@@@@@@ @@@@@@@@",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|
47
fvwm_icons/dialog_box.xpm
Normal file
47
fvwm_icons/dialog_box.xpm
Normal file
@ -0,0 +1,47 @@
|
||||
/* XPM */
|
||||
static char * icl8_16322_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 9 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c cadet blue",
|
||||
"o c #555555",
|
||||
"O c #FF9966",
|
||||
"+ c white",
|
||||
"@ c #0000EF",
|
||||
"# c #99CCCC",
|
||||
"$ c #00CBFE",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" .............................. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXoXXXXXXXX. ",
|
||||
" .X................XXoXXOOOOXX. ",
|
||||
" .X.+++++++++++.++.XXoXXOOOOXX. ",
|
||||
" .X.+@@@@++++++.++.XXoXXXXXXXX. ",
|
||||
" .X.+++++++++++....XXoXXXXXXXX. ",
|
||||
" .X.+@@@+@@++++.##.XXoXXOOOOXX. ",
|
||||
" .X.+++++++++++.##.XXoXXOOOOXX. ",
|
||||
" .X.+@@+@@@++++.##.XXoXXXXXXXX. ",
|
||||
" .X.+++++++++++.##.XXoXXXXXXXX. ",
|
||||
" .X.###########.##.XXoXXXXXXXX. ",
|
||||
" .X.#$$$$#$$###.##.XXoXXOOOOXX. ",
|
||||
" .X.###########.##.XXoXXOOOOXX. ",
|
||||
" .X.+++++++++++....XXoXXXXXXXX. ",
|
||||
" .X.+@@@+@@@+++.++.XXoXXXXXXXX. ",
|
||||
" .X.+++++++++++.++.XXoXXOOOOXX. ",
|
||||
" .X................XXoXXOOOOXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXoXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .............................. "};
|
47
fvwm_icons/editres.xpm
Normal file
47
fvwm_icons/editres.xpm
Normal file
@ -0,0 +1,47 @@
|
||||
/* XPM */
|
||||
static char * editres_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 9 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #00FE32",
|
||||
"X c #006600",
|
||||
"o c #444444",
|
||||
"O c #FFCC9A",
|
||||
"+ c black",
|
||||
"@ c #3366FF",
|
||||
"# c #FE0000",
|
||||
"$ c #CD0000",
|
||||
/* pixels */
|
||||
" .... ",
|
||||
" ....... ",
|
||||
" ...X.XXXo oo ",
|
||||
" .X.X.XXOOO+OO+ ",
|
||||
" .XXXXXOOo@OOO+ ",
|
||||
" X XXOOOOOOO+ ",
|
||||
" XX XOoO#$OOO+ ",
|
||||
" X oO@O#$O#O+ ",
|
||||
" +OOOOO#O++ ",
|
||||
" oOOOO##OO+@+ ",
|
||||
" oOO+OOOO+@@#+ ",
|
||||
" ++ ++++@@+#+ ",
|
||||
" +@+##@+ ",
|
||||
" +##+@+ ",
|
||||
" #+@@+ ",
|
||||
" +@@+#@ ",
|
||||
" @+#+@ ",
|
||||
" ###### +###@ ",
|
||||
" ###### #+@ ### ",
|
||||
" ###### +@ #### ",
|
||||
" ###### ### ",
|
||||
" ###### ### ",
|
||||
" ###### ### ",
|
||||
" ###### ### ",
|
||||
" ###### ### ",
|
||||
" #### ##### ",
|
||||
" ### ####### ",
|
||||
" ### ###### ",
|
||||
" ### ###### ",
|
||||
" ### ###### ",
|
||||
" ### ####### ",
|
||||
" ### ###### "};
|
53
fvwm_icons/eps.xpm
Normal file
53
fvwm_icons/eps.xpm
Normal file
@ -0,0 +1,53 @@
|
||||
/* XPM */
|
||||
static char * icl8_6289_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 15 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #444444",
|
||||
"X c #BDBDC5C5CCCC",
|
||||
"o c white",
|
||||
"O c wheat",
|
||||
"+ c #9AFFFF",
|
||||
"@ c #00FEFE",
|
||||
"# c #555555",
|
||||
"$ c #00CDCD",
|
||||
"% c #FF33FE",
|
||||
"& c #888888",
|
||||
"* c #FF3399",
|
||||
"= c #CC66FF",
|
||||
"- c #222222",
|
||||
"; c #FE9800",
|
||||
/* pixels */
|
||||
" ......................... ",
|
||||
" .XXXXXXXXoOOOOOOOOOOOOOO. ",
|
||||
" .XXXXXXoooOOOO++++++++++++++@ ",
|
||||
" .oXXXXo###oOOO+@@@@@@@@@@@@@$ ",
|
||||
" .OoXXo###oOOOO+@%%%@%%@@@%@@$ ",
|
||||
" .OOoXo####oOOO+@%@@@%@%@%@%@$&&",
|
||||
" .OOOo##o###oOO+@%@@@%@%@%@@@$&&",
|
||||
" .OOOOooOo##oOO+@%@@@%@%@%@@@$&&",
|
||||
" .OOOOOOOOoo#oO+@%%@@%@%@@%@@$&&",
|
||||
" .OOOOOOOOOOO#o+@%@@@%%@@@@%@$&&",
|
||||
" .oOOOOOOooooOO+@%@@@%@@@@@%@$&&",
|
||||
" .#oOOOOOo###oo+@%@@@%@@@%@%@$&&",
|
||||
" .*#oOOOOOo####+@%%%@%@@@@%@@$&&",
|
||||
" .**#oOOOOOo#==+@@@@@@@@@@@@@$&&",
|
||||
" .***#oOOOOOo#=@$$$$$$$$$$$$$$&&",
|
||||
" .****#oOOOOo#===&&&&&&&&-&&&&&&",
|
||||
" .****##oOOOOo#==&&&&&&&&-&&&&&&",
|
||||
" .****#X#oOOOOo#====#+#oO.&&&&&&",
|
||||
" .#**#XXX#oOOOOo#=###++#o.&& ",
|
||||
" .o##XXXXX#oOOOo#=#@@#++#.&& ",
|
||||
" .Oo#XXXXXX#oOOOo###@@#++.&& ",
|
||||
" .OOo#XXXXXX#oOOOo#$#@@#+.&& ",
|
||||
" .OoOo#XXXXXX#oOOOo#$#@@#.&& ",
|
||||
" .o#oOo###XXXX#oOOOo#$#@@.&& ",
|
||||
" .#@#oOooo###XX#oOOOo#$#@.&& ",
|
||||
" .@@@#oOOOooo##;#oOOOo#$#.&& ",
|
||||
" .@@#@#oOOOOOoo###oOOOo#$.&& ",
|
||||
" .@@@@@#oOOOOOOooo#oOOOo#.&& ",
|
||||
" .@@@@#@#oOOOOOOOOooOOOOo.&& ",
|
||||
" .@@@@@@@#oOOOOOOOOOOOOOO.&& ",
|
||||
" .........................&& ",
|
||||
" &&&&&&&&&&&&&&&&&&&&&&&&& "};
|
46
fvwm_icons/flow_chart.xpm
Normal file
46
fvwm_icons/flow_chart.xpm
Normal file
@ -0,0 +1,46 @@
|
||||
/* XPM */
|
||||
static char * icl8_15540_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 8 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #777777",
|
||||
"X c black",
|
||||
"o c wheat",
|
||||
"O c #0066FE",
|
||||
"+ c #9ACCFF",
|
||||
"@ c #FF9966",
|
||||
"# c #FFCC9A",
|
||||
/* pixels */
|
||||
".XXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
"XooooooooooooooooooooooooX ",
|
||||
"XooooooooooOOOOOoooooooooX ",
|
||||
"XooooooooooO+++OoooooooooX ",
|
||||
"XooooooooooO+++OoooooooooX ",
|
||||
"XooooooooooOOOOOoooooooooX ",
|
||||
"XooooooooooooOoooooooooooX ",
|
||||
"XooooooooooooOoooooooooooX ",
|
||||
"XoooooooooooO+OooooooooooX ",
|
||||
"XooooooooooO+++OoooooooooX ",
|
||||
"XooooOOOOOO+++++OOOOOooooX ",
|
||||
"XooooOoooooO+++OooooOooooX ",
|
||||
"XooOOOOOooooO+OoooOOOOOooX ",
|
||||
"XooO+++OoooooOooooO+++OooX ",
|
||||
"XooO+++OooooooooooO+++OooX ",
|
||||
"XooOOOOOooooooooooOOOOOooX ",
|
||||
"XooooOooooooooooooooOooooX ",
|
||||
"XooooOoooXXXooooooooOooooX ",
|
||||
"XooooOoooXXXXXXXXXoooooooX ",
|
||||
"XoooO+OooXX@@@@@@@XoXXXXXX ",
|
||||
"XooO+++OoXX#######@X@@@@@X ",
|
||||
"XoO+++++OXX#######X@#####@X ",
|
||||
"XooO+++OoXX######X@##XX###@X ",
|
||||
"XoooO+OooXXX#####X##X@@X###@XXXX",
|
||||
"XooooOooooooX####X##X##X####@@XX",
|
||||
"XooooOoooooooX###@XX@##X######XX",
|
||||
"XooOOOOOooooooX###@@##X@######XX",
|
||||
"XooO+++OoooooooX#####X@#######XX",
|
||||
"XooO+++OooooooooXXXXXoX#######XX",
|
||||
"XooOOOOOoooooooooooooooXXXXXXXXX",
|
||||
"XooooooooooooooooooooooooX XXX",
|
||||
".XXXXXXXXXXXXXXXXXXXXXXXX. "};
|
44
fvwm_icons/folder2.xpm
Normal file
44
fvwm_icons/folder2.xpm
Normal file
@ -0,0 +1,44 @@
|
||||
/* XPM */
|
||||
static char *noname[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 5 1",
|
||||
/* colors */
|
||||
"` c #000000",
|
||||
"a c #FFFE9A",
|
||||
"b c #FFCC9A",
|
||||
"c c none",
|
||||
"d c #FFCC66",
|
||||
/* pixels */
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"cccccccccccccccccccccccccccccccc",
|
||||
"ccccc```````cccccccccccccccccccc",
|
||||
"cccc`ddddddd`ccccccccccccccccccc",
|
||||
"ccc`ddddddddd`cccccccccccccccccc",
|
||||
"cc`ddddddddddd`ccccccccccccccccc",
|
||||
"c`````````````````````````````cc",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`aaaaaaaaaaaaaaaaaaaaaaaaaaaaa`c",
|
||||
"`bbbbbbbbbbbbbbbbbbbbbbbbbbbbb`c",
|
||||
"```````````````````````````````c"
|
||||
};
|
58
fvwm_icons/folders.xpm
Normal file
58
fvwm_icons/folders.xpm
Normal file
@ -0,0 +1,58 @@
|
||||
/* XPM */
|
||||
static char * icl8_18139_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 20 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c tan",
|
||||
"o c wheat",
|
||||
"O c #FFCC9A",
|
||||
"+ c #FF9966",
|
||||
"@ c #DDDDDD",
|
||||
"# c #3399FF",
|
||||
"$ c #9A6633",
|
||||
"% c white",
|
||||
"& c #0033FE",
|
||||
"* c #FE0000",
|
||||
"= c #663300",
|
||||
"- c #888888",
|
||||
"; c #000077",
|
||||
": c #890000",
|
||||
"? c #111111",
|
||||
"> c #444444",
|
||||
", c #777777",
|
||||
"< c #BBBBBB",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ...... ",
|
||||
" .XXXXXX. ",
|
||||
"............... ",
|
||||
".ooooooooooooo. ",
|
||||
".ooooooooooooo. ",
|
||||
".ooooooooooooo. ",
|
||||
".oooooooooooooo ",
|
||||
".ooooooooooooo. ",
|
||||
".ooooooooooooOO ",
|
||||
".ooooooooooOO++++@#@ ",
|
||||
".......o.oO++$$$$%&%* ",
|
||||
" +$$$$$=-;-: ",
|
||||
" +$$$$== ",
|
||||
" +$$$$= ",
|
||||
" +$$$= ? ",
|
||||
" +$$$= > ",
|
||||
" +$$$= ? , ",
|
||||
" +$$= ?%> - ",
|
||||
" +$$= >%, < ",
|
||||
" @%- , X.X.X. ",
|
||||
" #&; ?> XXXXXXX. ",
|
||||
" @%- ,- XX.X.X.........",
|
||||
" *: <Xooooooooooooo.",
|
||||
" Xooooooooooooo.",
|
||||
" .ooooooooooooo.",
|
||||
" Xooooooooooooo.",
|
||||
" .ooooooooooooo.",
|
||||
" .ooooooooooooo.",
|
||||
" .ooooooooooooo.",
|
||||
" ...............",
|
||||
" "};
|
21
fvwm_icons/fvwm.bitmap
Normal file
21
fvwm_icons/fvwm.bitmap
Normal file
@ -0,0 +1,21 @@
|
||||
#define fvwm_width 58
|
||||
#define fvwm_height 26
|
||||
static char fvwm_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xfc, 0x1b, 0xd8, 0xc0, 0xc0, 0xe6, 0x38, 0x00, 0xfc, 0x1b, 0xcc, 0xe0,
|
||||
0x60, 0xf7, 0x7d, 0x00, 0x30, 0x18, 0xcc, 0xe0, 0x60, 0xb3, 0x6d, 0x00,
|
||||
0x30, 0x38, 0xc6, 0xf1, 0x31, 0x9b, 0x67, 0x00, 0x30, 0x30, 0x86, 0xb1,
|
||||
0x31, 0xcf, 0x73, 0x00, 0x38, 0x30, 0x83, 0x99, 0x99, 0xc7, 0x31, 0x00,
|
||||
0x38, 0x30, 0x83, 0x99, 0x99, 0xc3, 0x30, 0x00, 0x18, 0xb0, 0x81, 0x8d,
|
||||
0x8d, 0xc1, 0x30, 0x00, 0x18, 0xb0, 0x81, 0x8d, 0x8d, 0xc1, 0x30, 0x00,
|
||||
0x1c, 0xf0, 0x80, 0x87, 0xc7, 0xe0, 0x38, 0x00, 0x1c, 0x60, 0x00, 0x03,
|
||||
0xc3, 0x60, 0x18, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00};
|
44
fvwm_icons/fvwm.xpm
Normal file
44
fvwm_icons/fvwm.xpm
Normal file
@ -0,0 +1,44 @@
|
||||
/* XPM */
|
||||
static char *fvwm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"66 32 4 1",
|
||||
/* colors */
|
||||
"` c navy",
|
||||
"a c #60A0C0",
|
||||
"b c green",
|
||||
"c c red",
|
||||
/* pixels */
|
||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaaaaaa`````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaaaaa``````aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaaaa``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaaa``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaa```aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaa``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaa``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaa``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaa````````a``aaaaaa``a``aaaaaa``aaaaaa``a``aa```aaa```aaaaaaaa",
|
||||
"aaaaaa````````a``aaaaa``aa``aaaaa```aaaaa``a```a`````a`````aaaaaaa",
|
||||
"aaaaaaaa``aaaaa``aaaaa``aa``aaaaa```aaaaa``a``aa``a``a``a``aaaaaaa",
|
||||
"aaaaaaaa``aaaaa```aaa``aaa```aaa`````aaa``aa``a``aa````aa``aaaaaaa",
|
||||
"aaaaaaaa``aaaaaa``aaa``aaaa``aaa``a``aaa``aa````aa````aa```aaaaaaa",
|
||||
"aaaaaaa```aaaaaa``aa``aaaaa``aa``aa``aa``aa````aaa```aaa``aaaaaaaa",
|
||||
"aaaaaaa```aaaaaa``aa``aaaaa``aa``aa``aa``aa```aaaa``aaaa``aaaaaaaa",
|
||||
"aaaaaaa``aaaaaaa``a``aaaaaa``a``aaa``a``aaa``aaaaa``aaaa``aaaaaaaa",
|
||||
"aaaaaaa``aaaaaaa``a``aaaaaa``a``aaa``a``aaa``aaaaa``aaaa``aaaaaaaa",
|
||||
"aaaaaa```aaaaaaa````aaaaaaa````aaaa````aaa``aaaaa```aaa```aaaaaaaa",
|
||||
"aaaaaa```aaaaaaaa``aaaaaaaaa``aaaaaa``aaaa``aaaaa``aaaa``aaaaaaaaa",
|
||||
"aaaaaa``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaa``aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaccccccccccccccccaaaaaaa",
|
||||
"aaaaa```aaaaaaaaaaaaaaaaaaaaaaaaaaaaaccccccccccccccccccccccccccbaa",
|
||||
"aaaaa```aaaaaaaaaaaaaaaccccccccccccccccccccccccccccccbbbbbbbbbbaaa",
|
||||
"aaaaa``aaaaaaccccccccccccccccccccccccccccccbbbbbbbbbbaaaaaaaaaaaaa",
|
||||
"aaaaaccccccccccccccccccccccccccccbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaccccccccccccccccccccbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaccccccccccbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaabbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
};
|
||||
|
78
fvwm_icons/fvwm2.xpm
Normal file
78
fvwm_icons/fvwm2.xpm
Normal file
@ -0,0 +1,78 @@
|
||||
/* XPM */
|
||||
static char * fvwm2_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"132 64 7 1",
|
||||
/* colors */
|
||||
" s none c none",
|
||||
". c #fffa35 m #000000",
|
||||
"X c #b9a02b",
|
||||
"o c #8b6914",
|
||||
"O c #ff0000",
|
||||
"+ c #770000",
|
||||
"@ c #cc0000 m #ffffff",
|
||||
/* pixels */
|
||||
" .XXXo ",
|
||||
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOO .XXXo OOOOOOOOOO OOOOOOOOOO OOOOOOOOOO OOOOOOOOO ... OOOOOOOOO ",
|
||||
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO+ OOOOOOOOO+ ooo OOOOOOOOO+ OOOOOOOOO+ OOOOOOOOO+ OOOOOOOO+ .XXXo OOOOOOOO+ ",
|
||||
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO++ OOOOOOOO++ OOOOOOOO++ OOOOOOOO++ ... OOOOOOOO++ OOOOOOO+++ .XXXo OOOOOOOO++ ",
|
||||
" OOO@@@@@@@@@@@@@@@@@@@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ .XXX. OOO@@@@+++ OOO@@@@+++ .XXXo OOO@@@@+++ ",
|
||||
" OOO@@@@@@@@@@@@@@@@@@@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ .XXXXXo OOO@@@@+++ OOO@@@@@+++ ooo OOO@@@@@+++ ",
|
||||
" OOO@@@@@@@@@@@@@@@@@@@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ .XXXXXo OOO@@@@+++ OOO@@@@@+++ OOO@@@@@+++ ",
|
||||
" OOO@@@@@@@@@@@@@@@@@@@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ .XXXXXo OOO@@@@+++ OOO@@@@@@+++ OOO@@@@@@+++ ",
|
||||
" OOO@@@@++++++++++++++++++++++++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ oXXXo OOO@@@@+++ OOO@@@@@@+++ OOO@@@@@@+++ ",
|
||||
" OOO@@@@++++++++++++++++++++++++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ ooo OOO@@@@+++ OOO@@@@@@@+++ OOO@@@@@@@+++ ",
|
||||
" OOO@@@@++++++++++++++++++++++++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@@@@+++ OOO@@@@@@@+++ ",
|
||||
" OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@@@@@+++ OOO@@@@@@@@+++ ",
|
||||
" OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@@@@@+++ OOO@@@@@@@@+++ ",
|
||||
" OOO@@@@+++ ... OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+@@@@+++ OOO@@@@O@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXo OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+O@@@+++ OOO@@@+O@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXo OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+O@@@@++OOO@@@@+O@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXo . OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ . OOO@@@@+++ OOO@@@@+OO@@@++OOO@@@++O@@@@+++ ",
|
||||
" OOO@@@@+++ ooo .Xo OOO@@@@+++ ... OOO@@@@+++ OOO@@@@+++ .Xo OOO@@@@+++ OOO@@@@++O@@@@+OO@@@@+OO@@@@+++ ",
|
||||
" OOO@@@@+++ o OOO@@@@+++ .XXXo OOO@@@@+++ OOO@@@@+++ o OOO@@@@+++ OOO@@@@++OO@@@+OO@@@++OO@@@@+++ ",
|
||||
" OOO@@@@+++ OOO@@@@+++ .XXXo OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@++OO@@@@O@@@@++OO@@@@+++ ",
|
||||
" OOO@@@@+++ OOO@@@@+++ .XXXo OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@++OOO@@@O@@@+++OO@@@@+++ ",
|
||||
" OOO@@@@+++OOOOOOOOOOOOOOOO OOO@@@@+++ ooo OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++OO@@@@@@@++OOO@@@@+++ ",
|
||||
" OOO@@@@++OOOOOOOOOOOOOOOO+ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ O OOO@@@@+++ OOO@@@@+++OOO@@@@@+++OOO@@@@+++ ",
|
||||
" OOO@@@@+OOOOOOOOOOOOOOOO++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ O OOO@@@@+++ OOO@@@@+++OOO@@@@@+++OOO@@@@+++ ",
|
||||
" OOO@@@@@@@@@@@@@@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OO+ OOO@@@@+++ OOO@@@@+++ OOO@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@@@@@@@@@@@@@@@@@+++ OOO@@@+++ OOO@@@+++ OOO@@@@+++ OO+ OOO@@@@+++ OOO@@@@+++ OOO@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@@@@@@@@@@@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO++ OOO@@@@+++ OOO@@@@+++ OOO@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@@@@@@@@@@@@@@@@@+++ OOO@@@+++ OOO@@@+++ OOO@@@@+++ OOO++ OOO@@@@+++ OOO@@@@+++ OOO@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++++++++++++++++++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@+++ OOO@@@@+++ OOO@@@@+++ OOO++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++++++++++++++++++ OOO@@@+++ OOO@@@+++ OOO@@@@+++ OOO@+++ OOO@@@@+++ OOO@@@@+++ OOO++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++++++++++++++++++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@+++ OOO@@@@+++ OOO@@@@+++ OO+ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ OOO@@@+++ OOO@@@+++ OOO@@@@+++ OOO@@@+++ OOO@@@@+++ OOO@@@@+++ OO+ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++OOO@@@@@+++OOO@@@@+++ OOO@@@@+++ O OOO@@@@+++ ",
|
||||
" OOO@@@@+++ OOO@@@+++ OOO@@@+++ OOO@@@@+++OOO@@@@@+++OOO@@@@+++ OOO@@@@+++ O OOO@@@@+++ ",
|
||||
" OOO@@@@+++ ... OOO@@@@+++ OOO@@@@+++ OOO@@@@+++OO@@@@@@@++OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXo OOO@@@+++ OOO@@@+++ OOO@@@@++OOO@@@O@@@+++OO@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXo OOO@@@@++OOO@@@@+++ OOO@@@@++OO@@@@O@@@@++OO@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXo OOO@@@++OOO@@@+++ OOO@@@@++OO@@@+OO@@@++OO@@@@+++ OOO@@@@+++ ... OOO@@@@+++ ",
|
||||
" OOO@@@@+++ ooo ... OOO@@@@+OO@@@@+++ OOO@@@@++O@@@@+OO@@@@+OO@@@@+++ OOO@@@@+++ .XXXo OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXo OOO@@@+OO@@@+++ OOO@@@@+OO@@@++OOO@@@++O@@@@+++ OOO@@@@+++ .XXXo OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXo OOO@@@@O@@@@+++ OOO@@@@+O@@@@++OOO@@@@+O@@@@+++ OOO@@@@+++ .XXXo OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXo OOO@@@O@@@+++ OOO@@@@+O@@@+++ OOO@@@+O@@@@+++ OOO@@@@+++ ooo OOO@@@@+++ ",
|
||||
" OOO@@@@+++ ... ooo OOO@@@@@@@+++ OOO@@@@+@@@@+++ OOO@@@@O@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ ..XXX.. OOO@@@@@+++ OOO@@@@@@@@+++ OOO@@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXXXXXo OOO@@@@@+++ OOO@@@@@@@@+++ OOO@@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXXXXXXXo OOO@@@+++ . OOO@@@@@@@+++ OOO@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXXXXXXXo OOO@@@+++ ..X.. OOO@@@@@@@+++ OOO@@@@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXXXXXXXo OOO@+++ .XXXo OOO@@@@@@+++ OOO@@@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXXXXXXXo OOO@+++ .XXXXXo OOO@@@@@@+++ OOO@@@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXXXXXXXo OOO++ .XXXo OOO@@@@@+++ OOO@@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ .XXXXXXXo OOO++ ooXoo OOO@@@@@+++ OOO@@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO@@@@+++ ooXXXoo OO+ o OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ OOO@@@@+++ ",
|
||||
" OOO+++++++ ooo OO+ OOO+++++++ OOO+++++++ OOO+++++++ OOO+++++++ ",
|
||||
" OO++++++++ O OO+++++++ O++++++++ OO++++++++ OO++++++++ ",
|
||||
" O+++++++++ ....... O O++++++++ ..... +++++++++ O+++++++++ O+++++++++ ",
|
||||
" ..XXXXXXX.. . ..XXXXX.. ... ",
|
||||
" .XXXXXXXXXXXo ...X... .XXXXXXXXXo ..XXX.. ",
|
||||
" ... .XXXXXXXXXXXXXo .XXXXXXXo .XXXXXXXXXXXo .XXXXXXXXXo ",
|
||||
" ..XXXoo .XXXXXXXXXXXXXXXo .XXXXXXXo .XXXXXXXXXXXXXo ... .XXXXXXXXXo . ",
|
||||
"... .XXXXXXXo .XXXXXXXXXXXXXXXXXo .XXXXXXXo .XXXXXXXXXXXXXo .XXXo .XXXXXXXXXXXo ...X...",
|
||||
"XXXo .XXXXXXXXXo .XXXXXXXXXXXXXXXXXo .XXXXXXXXXo .XXXXXXXXXXXXXXXo .XXXo .XXXXXXXXXXXo .XXXXXXX",
|
||||
"XXXXo .XXXXXXXXXo .XXXXXXXXXXXXXXXXXo .XXXXXXXo .XXXXXXXXXXXXXXXo .XXXo .XXXXXXXXXXXXXoXXXXXXXX",
|
||||
"XXXXo .XXXXXXXXXo .XXXXXXXXXXXXXXXXXo .XXXXXXXo .XXXXXXXXXXXXXXXo ooo .XXXXXXXXXXXXXXXXXXXXXX",
|
||||
"XXXXo .XXXXXXXXXo .XXXXXXXXXXXXXXXXXo .XXXXXXXo .XXXXXXXXXXXXXXXo .XXXXXXXXXXXXXXXXXXXXXX"};
|
||||
|
52
fvwm_icons/graphs.xpm
Normal file
52
fvwm_icons/graphs.xpm
Normal file
@ -0,0 +1,52 @@
|
||||
/* XPM */
|
||||
static char * icl8_15303_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 14 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #CBFFCB",
|
||||
"X c #9AFFCC",
|
||||
"o c #326532",
|
||||
"O c #009865",
|
||||
"+ c #659865",
|
||||
"@ c #EEEEEE",
|
||||
"# c #BBBBBB",
|
||||
"$ c #FF33FE",
|
||||
"% c #777777",
|
||||
"& c #00FE00",
|
||||
"* c #9A6633",
|
||||
"= c #FE0000",
|
||||
"- c #66CC99",
|
||||
/* pixels */
|
||||
" ......................... ",
|
||||
" .XXoXXXoXXXoXXXoXXXoXXXo.X ",
|
||||
" .XXoXXXoXXXoXXXoXXXoXXXo.OX ",
|
||||
" .ooooooooooooooooooooooo.OOX ",
|
||||
" .XXoXXX+XXX+XXX+XXX+XXX+.OOOX ",
|
||||
" .XXoXXX+XXX+XXX+XXX+XXX++++++X ",
|
||||
" .oooX@@@@@@@@@@@@@@@@@@#X+++++ ",
|
||||
" .XXoX@############$###$%O+++++ ",
|
||||
" .XXoX@###########$&$#$&%OXX+X+ ",
|
||||
" .ooo+@######$###$&&&$&&%++++++ ",
|
||||
" .XXoX@#####$&$#$&&&&&&&%OXX+X+ ",
|
||||
" .XXoX@##$#$&&&$&&&&&&&&%OXX+X+ ",
|
||||
" .ooo+@#$&$&&&&&&&&&&&&&%++++++ ",
|
||||
" .XXoX@$&&&&&&&&&&&&&&&&%OXX+X+ ",
|
||||
" .XXoX#%%%%%%%%%%%%%%%%%%OXX+X+ ",
|
||||
" .ooo++ooooooooooooooooooo+++++ ",
|
||||
" .XXoXXX+XXX+XXX+XXX+XXX+XXX+X+ ",
|
||||
" .XXoXXX+XXX+XXX+XXX+XXX+XXX+X+ ",
|
||||
" .ooo++++++++++++++++++++++++++ ",
|
||||
" .XXoXXX+XXX+XXX+XXX+XXX+XXX+X+ ",
|
||||
" .XXoX*==*X*==*X+XXX+XXX+XXX+X+ ",
|
||||
" .ooo+=X+=+=++=++++++++++++++++ ",
|
||||
" .XXoX=X+XX=+XXX+XXX+XXoooooooo ",
|
||||
" .XXoX*==*X*==*X+XXX+XXo-----+o ",
|
||||
" .ooo++++=++++=++++++++o----+oo ",
|
||||
" .XXoXXX+=XX+X=X+XXX+XXo---+ooo ",
|
||||
" .XXoX=X+=X=+X=X+XXX+XXo--+oooo ",
|
||||
" .ooo+*==*+*==*++++++++o-+ooooo ",
|
||||
" .XXoXXX+XXX+XXX+XXX+XXo+oooooo ",
|
||||
" X+++++++++++++++++++++oooooooo ",
|
||||
" o----------------------------o ",
|
||||
" -ooooooooooooooooooooooooooooo "};
|
17
fvwm_icons/hcode.icon
Normal file
17
fvwm_icons/hcode.icon
Normal file
@ -0,0 +1,17 @@
|
||||
/* This X bitmap is designed for use with the X Desktop Manager.
|
||||
* it was designed by Edward Groenendaal, April 1991.
|
||||
*/
|
||||
#define hcode_width 32
|
||||
#define hcode_height 32
|
||||
static char hcode_bits[] = {
|
||||
0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0x0f, 0x40, 0x01,
|
||||
0x10, 0x0e, 0x40, 0x02, 0x10, 0x0e, 0x40, 0x04, 0x10, 0x0e, 0xc0, 0x0f,
|
||||
0x10, 0xee, 0x01, 0x08, 0x10, 0xfe, 0x07, 0x08, 0x10, 0x1e, 0x07, 0x08,
|
||||
0x10, 0x0e, 0x0e, 0x08, 0x10, 0x0e, 0x0e, 0x08, 0x10, 0x0e, 0x0e, 0x08,
|
||||
0x10, 0x0e, 0x0e, 0x08, 0x10, 0x0e, 0x0e, 0x08, 0x10, 0x1f, 0x1f, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x90, 0xdf, 0x0a, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x10, 0xb7, 0x03, 0x08, 0x10, 0x00, 0x00, 0x08, 0x90, 0xbd, 0xb7, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0x10, 0x6c, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
||||
0x90, 0xdd, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x08,
|
||||
0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
|
47
fvwm_icons/mag_glass.xpm
Normal file
47
fvwm_icons/mag_glass.xpm
Normal file
@ -0,0 +1,47 @@
|
||||
/* XPM */
|
||||
static char * icl8_30030_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 9 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c blue",
|
||||
"X c black",
|
||||
"o c tan",
|
||||
"O c wheat",
|
||||
"@ c red",
|
||||
"& c #99CCCC",
|
||||
"= c gray50",
|
||||
"? c white",
|
||||
/* pixels */
|
||||
" .............XXXXXX ",
|
||||
" .............ooOOOXX ",
|
||||
" .............ooOOOX@X ",
|
||||
" .............ooOOOX@@X ",
|
||||
" .............ooOOOX@@@X ",
|
||||
" XOoooooooooooooOOOX@@@@X ",
|
||||
" XOoooooooooooooOOOXXXXXXX ",
|
||||
" XOOOOOOOO@@@@@@@OOOoooooX ",
|
||||
" XOOOOOOOO@@@@@@@OOOoooooX ",
|
||||
" XOOOOOOOO@@@@@@@XXXXXXXXX ",
|
||||
" XOOOOOOOO@@@@@@@ooOOOOOOX ",
|
||||
" XOOOOOOOO@@@@@@@ooooooooX ",
|
||||
" XOOOOOOOXOOoooooXXXXXXOOX ",
|
||||
" XOOOOOOXOOOoooXXOOOOOOXXX ",
|
||||
" XOOOOOXOOOoooXOOOOOOOOOOX ",
|
||||
" XOOOOXOOOoOOXO===========X ",
|
||||
" XOOOXOOOoOOOXO=&&&&&&&&&&X ",
|
||||
" X...OOOoOOOXOO=&XX=X&XX=&&X ",
|
||||
" X==.OOoOOOOXXX=&&&&&&&&&&&X ",
|
||||
" X==.XXXXXXXXOO=&XX&=XX&XX&X ",
|
||||
" X==.ooOOOOOXOO=&&&&&&&&&&&X ",
|
||||
" X==.oooooooXOO=&XX=X&X&X=&X ",
|
||||
" X...ooOOOOOOXO=&&&&&&&&&&X ",
|
||||
" XoooooOOOOOOXO===========X ",
|
||||
" XoooooOOOOOOOXOOooooooooX ",
|
||||
" XOOOOOOOOOOOOOXXooooooXX=X ",
|
||||
" XOOOOOOOOOOOOOOOXXXXXXOXX=X ",
|
||||
" XOOOOOOOOOOOOOOOOOOOOOOOXX=X ",
|
||||
" XOOOOOOOOOOOOOOOOOOOOOOOX X=X ",
|
||||
" XOOOOOOOOOOOOOOOOOOOOOOOX X=X ",
|
||||
" XXXXXXXXXXXXXXXXXXXXXXXXX X=X",
|
||||
" X?"};
|
50
fvwm_icons/mail1.xpm
Normal file
50
fvwm_icons/mail1.xpm
Normal file
@ -0,0 +1,50 @@
|
||||
/* XPM */
|
||||
static char * mail1_xpm[] = {
|
||||
"64 38 9 1",
|
||||
" s None c None",
|
||||
". c gray70",
|
||||
"X c white",
|
||||
"o c #727277778585",
|
||||
"O c yellow",
|
||||
"+ c tan",
|
||||
"@ c gray50",
|
||||
"# c gray30",
|
||||
"$ c black",
|
||||
" .XX.XXX.. ",
|
||||
" .XXXX.XXXX.. ",
|
||||
" .XXXX.XXXXXX.. ",
|
||||
" .XXXXXX.XXXXXXX.. ",
|
||||
" .XXXXXX.XXXXXXXXX.. ",
|
||||
" .XXXXXXXX.XXXXXXXXXX... ",
|
||||
" .XXXXXXXX.XXXXXXXXXXXXX.. ",
|
||||
" .XXXXXXXXXX.XXXXXXXXXXXXXX.. ",
|
||||
" .XXXXXXXXXXX.XXXXXXXXXXXXXXXX..ooooooooo ",
|
||||
" .XXXXXXXXXXXX.XXXXXXXXXXXXXXXXX..OOOOOOOo ",
|
||||
" .XXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXX..OOOOOo ",
|
||||
" .XXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXX...OOo ",
|
||||
" .XXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXX..o ",
|
||||
" .XXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXX.. ",
|
||||
" .XXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXX.. ",
|
||||
" .....................XXXXXXXXXXXXXXXXXXXXXXXXXXX.. ",
|
||||
" ooo ..XXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.. ",
|
||||
" o+++ooo..XXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXXXXX..... @@@@ ",
|
||||
" o++++++++..XXXXXXXXXXXXXX.XXXXXXXXXXXXXXX..........XXX. @@@@@ ",
|
||||
" o++++++++++..XXXXXXXXXXXXX.XXXX..........XXXXXXXXXXXXX. @@@@@. ",
|
||||
" o++++++++++++..XXXXXXXXXXX.....XXX.XXXXXXXXXXXXXXXXXX.@@@@.@@. ",
|
||||
" o+++ooooooo++++..XXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXX.@@@@@... ",
|
||||
" o+++oo###ooo+++++..XXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXX.@....... ",
|
||||
" o++o###$##oo++++++o..XXXXXXXXXXXXXXX.XXXXXXXXXXXXXX.@@...@@@ ",
|
||||
" ooo##$$$$$#oo+++++oOO..XXXXXXXXXXXXXX.XXXXXXXXXXXXX.@..@@@@ ",
|
||||
" oo##$$$.$$$##o++++oOOOO..XXXXXXXXXXXX.XXXXXXXXXXXXX.@@@@.@@ ",
|
||||
" $$...$$#########ooooo.XXXXXXXXXXXX.XXXXXXXXXXX.@@@@@@@. ",
|
||||
" $$$.$$$ ..XXXXXXXXXXX.XXXXXXXXX.@@...@.. ",
|
||||
" @@@@@$$$$$ .@@@@@@@@@@@...@XXXXXXXX.XXXXXXXXX.@@@@@@@ ",
|
||||
".....@.$$$.@@@@@@@@....@@@@@@@@..XXXXXXXX.XXXXXXX.@@@@@@@ ",
|
||||
" .@@@@@@@@@@@@@@@@@@....@@@@@@..XXXXXXX.XXXXXX.@@ ",
|
||||
" @@@@@@@@@@@@@@@..XXXXX.XXXXX.@@ ",
|
||||
" @@@..XXXX.XXXX.@ ",
|
||||
" ..XXX.XX. ",
|
||||
" ..X.XX. ",
|
||||
" .... ",
|
||||
" . ",
|
||||
" "};
|
46
fvwm_icons/mail2.xpm
Normal file
46
fvwm_icons/mail2.xpm
Normal file
@ -0,0 +1,46 @@
|
||||
/* XPM */
|
||||
static char *noname[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 7 1",
|
||||
/* colors */
|
||||
"` c black",
|
||||
"a c gray40",
|
||||
"b c red",
|
||||
"c c gray58"
|
||||
"e c #6699CC",
|
||||
"f s None c None",
|
||||
"g c gray85",
|
||||
/* pixels */
|
||||
"fffffff`````````````````````````",
|
||||
"fffffff`aaaaaaaaaaaaaaaaaaaaaaa`",
|
||||
"fffff`````````````````````````a`",
|
||||
"fffff`ccccccccccccccccccccccc`a`",
|
||||
"fff```````````````````ccccccc`a`",
|
||||
"fff`ggggggggggggggggg``cccccc`a`",
|
||||
"fff`ggggggggggggggggg`c`ccccc`a`",
|
||||
"fff`ggggggggggggggggg`cc`cccc`a`",
|
||||
"fff`ggggggggggggggggg`ccc`ccc`a`",
|
||||
"fff`ggggggggggggggggg`cccc`cc`a`",
|
||||
"fff`ggggggggggggggggg```````c`a`",
|
||||
"fff`ggggggggggggggggggccccc`c`a`",
|
||||
"fff`ccccccccccccccccccaaaaa`c`a`",
|
||||
"fff`aaaaaaaaaaaaaaaaaaaaaaa`c`a`",
|
||||
"````````````````````````````c`a`",
|
||||
"`gggggggggggggggggggggggggg`c`a`",
|
||||
"`ggegeeeeggggggggggggggbbbg`c`a`",
|
||||
"`ggggggggggggggggggggggbbbg`c`a`",
|
||||
"`ggeeegeeggggggggggggggbbbg`c`a`",
|
||||
"`ggggggggggggggggggggggbbbg`c`a`",
|
||||
"`gggggggggggggggggggggggggg`c`a`",
|
||||
"`gggggggggggggggggggggggggg`c`a`",
|
||||
"`gggggggggggggggggggggggggg`c`a`",
|
||||
"`ggggggeeeggeegeeeeeegggggg`c`a`",
|
||||
"`gggggggggggggggggggggggggg`c`a`",
|
||||
"`ggggggeeeeegeeegeeeegggggg`c`a`",
|
||||
"`gggggggggggggggggggggggggg`c`a`",
|
||||
"`ggggggeeegeeegeeeeeegggggg`c`a`",
|
||||
"`gggggggggggggggggggggggggg`c`a`",
|
||||
"`gggggggggggggggggggggggggg`c`a`",
|
||||
"`gggggggggggggggggggggggggg`c`a`",
|
||||
"````````````````````````````````"
|
||||
};
|
48
fvwm_icons/map.xpm
Normal file
48
fvwm_icons/map.xpm
Normal file
@ -0,0 +1,48 @@
|
||||
/* XPM */
|
||||
static char * icl8_10593_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 10 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c #009ACD",
|
||||
"o c wheat",
|
||||
"O c #003298",
|
||||
"+ c tan",
|
||||
"@ c #FF3333",
|
||||
"# c #CC9966",
|
||||
"$ c #980065",
|
||||
"% c #555555",
|
||||
/* pixels */
|
||||
" . ",
|
||||
" . ",
|
||||
" .X. ",
|
||||
" ........X.......... ",
|
||||
" .oooooo.X.oooooooo.. ",
|
||||
" .ooooo.OXX.oooooo+.o. ",
|
||||
" .ooooo.OXX.oooooo+.oo. ",
|
||||
" .ooooo.OXX.oooooo+.ooo. ",
|
||||
" .oo.....X......oo+...... ",
|
||||
" .oo.@@@.X.@@@@.oo+++++++. ",
|
||||
" .ooo.@@@.X.@@.oooooooooo. ",
|
||||
" .....@@@@..@@....ooooooo. ",
|
||||
" ...XXX.@@@@@.@@.OOO...oooo. ",
|
||||
"..XXXXXX.@@@@@@@@.XXXXXX..oo. ",
|
||||
" ..OOOO.@@.@@@@@.XXX...oooo. ",
|
||||
" .....@@..@@@@....ooooooo. ",
|
||||
" .ooo.@@.O.@@@.oooooooooo. ",
|
||||
" .oo.@@@@.O.@@.o.............",
|
||||
" .oo......O....o.ooooooooooo.",
|
||||
" .ooooo.XXO.ooo+.ooo.....ooo.",
|
||||
" .ooooo.XXO.ooo+.oo.#####.oo.",
|
||||
" .ooooo.XXO.ooo+.o.#X###X#.o.",
|
||||
" .oooooo.X.oooo+.o.###$###.o.",
|
||||
" .oooooo.X.oooo+.o.#$###$#.o.",
|
||||
" .oooooo.X.oooo+.o.##$$$##.o.",
|
||||
" .ooooooo.ooooo+.oo.#####.oo.",
|
||||
" .ooooooo.ooooo+.ooo.....ooo.",
|
||||
" .ooooooooooooo+.ooooooooooo.",
|
||||
" .ooooooooooooo+.............",
|
||||
" .ooooooooooooo++++++++++%++ ",
|
||||
" .ooooooooooooooooooooooo. ",
|
||||
" ......................... "};
|
44
fvwm_icons/math4.xpm
Normal file
44
fvwm_icons/math4.xpm
Normal file
@ -0,0 +1,44 @@
|
||||
/* XPM */
|
||||
static char * icl8_30350_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 6 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #60C080",
|
||||
"X c gray58",
|
||||
"O c #99CCCC",
|
||||
"+ c black",
|
||||
"@ c #FFCBFE",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ........... ",
|
||||
" ........... ",
|
||||
" ...........X ",
|
||||
" ..+++.++...X ",
|
||||
" ...+++.++..X ",
|
||||
" ...++..++..X ",
|
||||
" ...++..++..X ",
|
||||
" OOOOOOOOOOOOOOO ...++..++..X ",
|
||||
" OOOOOOOOOOOOOOO ..++..++...X ",
|
||||
" OO+++++++++++OOX ..++..++...X ",
|
||||
" OOO+++OOOOOO+OOX ..++..+++..X ",
|
||||
" OOOO+++OOOOOOOOX ...........X ",
|
||||
" OOOOO+++OOOOOOOX ...........X ",
|
||||
" OOOOOO+++OOOOOOX ...........X ",
|
||||
" OOOOOOO+++OOOOOX XXXXXXXXXX ",
|
||||
" OOOOOOOO++OOOOOX ",
|
||||
" OOOOOOO++OOOOOOX @@@@@@@@@@ ",
|
||||
" OOOOOO++OOOOOOOX @@@@@@@@@@ ",
|
||||
" OOOOO++OOOOOOOOX @@@@@@@@@@X ",
|
||||
" OOOO++OOOOOO+OOX @@+++@++@@X ",
|
||||
" OOO++++++++++OOX @@@++@++@@X ",
|
||||
" OO+++++++++++OOX @@@+++@+@@X ",
|
||||
" OOOOOOOOOOOOOOOX @@@++@@@@@X ",
|
||||
" OOOOOOOOOOOOOOOX @@@++@@@@@X ",
|
||||
" XXXXXXXXXXXXXX @@++@@@@@@X ",
|
||||
" @@++@@@@@@X ",
|
||||
" @@++@@@@@@X ",
|
||||
" @@@@@@@@@@X ",
|
||||
" @@@@@@@@@@X ",
|
||||
" @@@@@@@@@@X ",
|
||||
" XXXXXXXXX "};
|
17
fvwm_icons/ocode.icon
Normal file
17
fvwm_icons/ocode.icon
Normal file
@ -0,0 +1,17 @@
|
||||
/* This X bitmap is designed for use with the X Desktop Manager.
|
||||
* it was designed by Edward Groenendaal, April 1991.
|
||||
*/
|
||||
#define ocode_width 32
|
||||
#define ocode_height 32
|
||||
static char ocode_bits[] = {
|
||||
0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0xe0, 0x41, 0x01,
|
||||
0xd0, 0xf9, 0x47, 0x02, 0x10, 0x3c, 0x4f, 0x04, 0x50, 0x1c, 0xce, 0x0f,
|
||||
0x10, 0x1e, 0x1e, 0x08, 0xd0, 0x0e, 0xdc, 0x09, 0x10, 0x0e, 0x1c, 0x08,
|
||||
0xd0, 0x0e, 0x5c, 0x0b, 0x10, 0x0e, 0x1c, 0x08, 0xd0, 0x1e, 0xde, 0x0a,
|
||||
0x10, 0x1c, 0x0e, 0x08, 0xd0, 0x3c, 0xaf, 0x0b, 0x10, 0xf8, 0x07, 0x08,
|
||||
0xd0, 0xe3, 0xd1, 0x0b, 0x10, 0x00, 0x00, 0x08, 0xd0, 0xdf, 0xbd, 0x0b,
|
||||
0x10, 0x00, 0x00, 0x08, 0xd0, 0xff, 0x6f, 0x0b, 0x10, 0x00, 0x00, 0x08,
|
||||
0xd0, 0xb7, 0x77, 0x0b, 0x10, 0x00, 0x00, 0x08, 0xd0, 0xbd, 0xb7, 0x0a,
|
||||
0x10, 0x00, 0x00, 0x08, 0xd0, 0x6c, 0x77, 0x0b, 0x10, 0x00, 0x00, 0x08,
|
||||
0xd0, 0xdd, 0x6e, 0x0b, 0x10, 0x00, 0x00, 0x08, 0xd0, 0xdf, 0xb6, 0x0b,
|
||||
0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
|
46
fvwm_icons/page.xpm
Normal file
46
fvwm_icons/page.xpm
Normal file
@ -0,0 +1,46 @@
|
||||
/* XPM */
|
||||
static char * icl8_25724_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 8 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #99CCCC",
|
||||
"X c #CBFFFF",
|
||||
"o c #111111",
|
||||
"O c #444444",
|
||||
"+ c #777777",
|
||||
"@ c #659898",
|
||||
"# c #326565",
|
||||
/* pixels */
|
||||
" ................... ",
|
||||
" .XXXXXXXXXXXXXXXXX.. ",
|
||||
" .XXXXXXXXXXXXXXXXX... ",
|
||||
" .XXoO+XOo+XXXXXXXX.... ",
|
||||
" .XXXXXXXXXXXXXXXXX..... ",
|
||||
" .XXXo+oOo+X+XXXXXX...... ",
|
||||
" .XXXXXXXXXXXXXXXXX....... ",
|
||||
" .XXXXXoXoO+oX+oXXXX@@@@@@ ",
|
||||
" .XXXXXXXXXXXXXXXXXX@@@@@@ ",
|
||||
" .XXoOXoO+X+oXXXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXXXO++o+oX+OXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXXXXOoXo+oOXXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXXXoO+oXOoXXXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXooXOXoOoo+XXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXXX+oOooXOoXXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXXXXXOoX+oOOoXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXoo+XoOoXoXXXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXXX+o+Xo+OOoXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXXXXXOo+oOXOo+XXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX# ",
|
||||
" .######################## "};
|
43
fvwm_icons/page2.xpm
Normal file
43
fvwm_icons/page2.xpm
Normal file
@ -0,0 +1,43 @@
|
||||
/* XPM */
|
||||
static char * icl8_11201_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 5 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c wheat",
|
||||
"o c tan",
|
||||
"O c #6699FF",
|
||||
/* pixels */
|
||||
" ................... ",
|
||||
" .XXXXXXXXXXXXXXXXX.. ",
|
||||
" .XXXXXXXXXXXXXXXXX.o. ",
|
||||
" .XXXXXXXXXXXXXXXXX.oo. ",
|
||||
" .XXXXXXXXXXXXXXXXX.ooo. ",
|
||||
" .XXXXXXXXXXXXXXXXX.oooo. ",
|
||||
" .XXXXXXXXXXXXXXXXX....... ",
|
||||
" .XXXXXOOOOOOOOOOXXXooooo. ",
|
||||
" .XXXXXXXXXXXXXXXXXXooooo. ",
|
||||
" .XXXXXOOOOOOOOOOXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXOOOOOOOOOXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXOOOOOOOOOOXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXOOOOOOOOOOXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXOOOOOOOOOXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXOOOOOOOOOOXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXOOOOOOOOOOXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXOOOOOOOOOOXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXOOOOOOOXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" ......................... "};
|
17
fvwm_icons/prog.icon
Normal file
17
fvwm_icons/prog.icon
Normal file
@ -0,0 +1,17 @@
|
||||
/* This X bitmap is designed for use with the X Desktop Manager.
|
||||
* it was designed by Edward Groenendaal, April 1991.
|
||||
*/
|
||||
#define prog_width 32
|
||||
#define prog_height 32
|
||||
static char prog_bits[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03,
|
||||
0x04, 0x00, 0x00, 0x06, 0xf4, 0xff, 0xff, 0x1a, 0x14, 0x20, 0x90, 0x22,
|
||||
0xd4, 0xa6, 0x95, 0x22, 0x14, 0x20, 0xf0, 0x22, 0x54, 0xad, 0x93, 0x22,
|
||||
0x14, 0x20, 0xf0, 0x22, 0xf4, 0xbf, 0x95, 0x22, 0x14, 0x20, 0xf0, 0x22,
|
||||
0x54, 0xa5, 0x95, 0x22, 0x14, 0x20, 0xf0, 0x22, 0x54, 0xa0, 0xf6, 0x22,
|
||||
0x14, 0x20, 0xf0, 0x22, 0xf4, 0xff, 0xff, 0x22, 0x14, 0x00, 0xe0, 0x22,
|
||||
0xf4, 0xff, 0xff, 0x22, 0x04, 0x00, 0x00, 0x1a, 0xfc, 0xff, 0xff, 0x7f,
|
||||
0xc0, 0x01, 0xe0, 0x71, 0x30, 0xff, 0x7f, 0x4c, 0x0c, 0x00, 0x00, 0x43,
|
||||
0xfe, 0xff, 0xff, 0x40, 0x02, 0x00, 0x80, 0x30, 0x1a, 0x00, 0x80, 0x0c,
|
||||
0x02, 0x00, 0x80, 0x03, 0xfe, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
51
fvwm_icons/ps.xpm
Normal file
51
fvwm_icons/ps.xpm
Normal file
@ -0,0 +1,51 @@
|
||||
/* XPM */
|
||||
static char * icl8_16143_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 13 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c #CBFFCB",
|
||||
"o c #00CBFE",
|
||||
"O c #0066FE",
|
||||
"+ c #0098FE",
|
||||
"@ c #659865",
|
||||
"# c #009865",
|
||||
"$ c #0000AB",
|
||||
"% c #0000DC",
|
||||
"& c #000077",
|
||||
"* c #000044",
|
||||
"= c #980000",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ................... ",
|
||||
" .XXXXXoXXXXXXXXXXX.. ",
|
||||
" .XXXXO+O@XXXXXXXXX.#. ",
|
||||
" .XXX$%O%$@XXXXXXXX.##. ",
|
||||
" XXXXX$%$@@@XXXXXXX.###. ",
|
||||
" XXoXXX$@@@+XXXXXXX.####. ",
|
||||
" XO+O@XXX@%O%@XXXXX....... ",
|
||||
" $%O%$@XX&$%$&@XXXXX@@@@@. ",
|
||||
" X$%$@@@XX&$&@@@XXXX@@@@@. ",
|
||||
" o XX$@@@+XXX&@@@OXXXXXXXXX. ",
|
||||
" O+O@XXX@%O%@XXX@$%$@XXXXXXX. ",
|
||||
" $%O%$@XX&$%$&@XX*&$&*@XXXXXX. ",
|
||||
" $%$@@@XX&$&@@@XX*&*@@@XXXXX. ",
|
||||
" $ @@+XXX&@@@OXXX*@@@XXXXXX. ",
|
||||
" @%O%@XXX@$%$@XXX@XXXXXXX. ",
|
||||
" &$%$&@XX*&$&*@XXXXXXXXXX. ",
|
||||
" X&$&@@@XX*&*@@@XXXXXXXXX. ",
|
||||
" XX&@@@OXXX*@@@XXXXXXXXXX. ",
|
||||
" XXXX@$%$@XXX@XXXXXXXXXXX. ",
|
||||
" .XXX*&$&*@XXXXXXXXXXXXXX. ",
|
||||
" .XXXX*&*@@@XXXXXXXXXXXXX. ",
|
||||
" .XXXXX*@@@XX======XX===X. ",
|
||||
" .XXXXXXX@XX=XX=XX=X=XX=X. ",
|
||||
" .XXXXXXXXXX=X=XX=XX=XXXX. ",
|
||||
" .XXXXXXXXXXXX===XXXX=XXX. ",
|
||||
" .XXXXXXXXXXXX=XXXXXXX=XX. ",
|
||||
" .XXXXXXXXXXX=XXXX=XXX=XX. ",
|
||||
" .XXXXXXXXXX===XXXX===XXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" ......................... "};
|
42
fvwm_icons/question.xpm
Normal file
42
fvwm_icons/question.xpm
Normal file
@ -0,0 +1,42 @@
|
||||
/* XPM */
|
||||
static char * question_xpm[] = {
|
||||
/**/
|
||||
"23 33 4 1",
|
||||
/**/
|
||||
" s None c none",
|
||||
". c black",
|
||||
"X c yellow",
|
||||
"O c midnightblue",
|
||||
" ..... ",
|
||||
" ..XXXX.. ",
|
||||
" ..XXX....... ",
|
||||
" .XXX.......... ",
|
||||
" .XX... ..... ",
|
||||
" .XX... ..... ",
|
||||
" .XX... ..... ",
|
||||
" .XX.. ..... ",
|
||||
" .X... .....",
|
||||
" ..... OOOO .....",
|
||||
" ... OO OO .....",
|
||||
" OO .....",
|
||||
" O .X...",
|
||||
" .X... ",
|
||||
" O .X... ",
|
||||
" O .XX.. ",
|
||||
" .XX.. ",
|
||||
" .XX.. ",
|
||||
" .XX.. ",
|
||||
" .XX.. ",
|
||||
" .XX.. ",
|
||||
" .XX.. ",
|
||||
" .X... ",
|
||||
" .X... ",
|
||||
" .X... ",
|
||||
" .X... ",
|
||||
" .. ..... ",
|
||||
" . . ... ",
|
||||
" . ",
|
||||
" . ... ",
|
||||
" .X... ",
|
||||
" . .X... ",
|
||||
" ... "};
|
43
fvwm_icons/rbomb.xpm
Normal file
43
fvwm_icons/rbomb.xpm
Normal file
@ -0,0 +1,43 @@
|
||||
/* XPM */
|
||||
static char * icl8_11432_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 5 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
"o c gray50",
|
||||
"O c black",
|
||||
"$ c wheat",
|
||||
"% c gray85",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" oOoOo ",
|
||||
" O Oo ",
|
||||
" o O ",
|
||||
" O o ",
|
||||
" OOOOO O ",
|
||||
" OOOOO o ",
|
||||
" OOOOOOO O ",
|
||||
" OOOOOOOOOOO o $ $",
|
||||
" OOOOOOOOOOOOO O $ $ ",
|
||||
" OOOOOOOOOOOOOOO o $ ",
|
||||
" OOOOOOOO%ooOOOO O $ $ ",
|
||||
" OOOOOOOOOO%ooOOOO o ",
|
||||
" OOOOOOOOOOOOOOOOO OoO $ $ $",
|
||||
" OOOOOOOOOOO%ooOOO ",
|
||||
" OOOOOOOOOOO%ooOOO $ $ ",
|
||||
" OOOOOOOOOOO%ooOOO $ $ ",
|
||||
" OOOOOOOOOO%ooOOOO $ ",
|
||||
" OOOOOOOOOO%ooOOOO $ $ $",
|
||||
" OOOOOOOO%ooOOOO ",
|
||||
" OOOOOOOOOOOOOOO $ ",
|
||||
" OOOOOOOOOOOOO ",
|
||||
" OOOOOOOOOOO ",
|
||||
" OOOOOOO ",
|
||||
" "};
|
49
fvwm_icons/rcalc.xpm
Normal file
49
fvwm_icons/rcalc.xpm
Normal file
@ -0,0 +1,49 @@
|
||||
/* XPM */
|
||||
static char * xcalc_xpm[] = {
|
||||
/*tan*/
|
||||
"44 34 11 1",
|
||||
" s None c None",
|
||||
"X c white",
|
||||
"o c black",
|
||||
"O c gray50",
|
||||
"+ c gray85",
|
||||
"# c green",
|
||||
"% c peachpuff4",
|
||||
"& c tan",
|
||||
"* c #908090",
|
||||
"= c blue",
|
||||
"- c gray",
|
||||
" oooooooooooo ",
|
||||
" ooXXXXXXXXXXXXXo ",
|
||||
" oXXXXXXXXXoXX Xo ",
|
||||
" OoXXXXXXXXo ooooo ",
|
||||
" O+oXXXXXXXoO oo ",
|
||||
" O+-ooooXXXXo+OOOOOO ",
|
||||
" OO--ooo#ooooooo++++++OOOOO ",
|
||||
" O+-oooo#oo####oooooo+++++++OO ",
|
||||
" O+-oooo#ooooo##oo###ooooo+++++OO ",
|
||||
" O+-oooo#oooo##ooooooo#ooooooo+++%O ",
|
||||
" O+-ooo#oo###oooooo###oooooooo++%%O ",
|
||||
" OO+++++oooooo##oooooo#oooooooo+++%%O ",
|
||||
"OOOOOOOOOO++++++++oooooo##oo#ooooooo+++%%%O ",
|
||||
"&&&&&&&&&OOOOOO++++++++ooo##ooooooo+++%%%%O ",
|
||||
"&&&&&&&&&&&&&&&OO++++++++ooooooooo+++%%%%%O ",
|
||||
"&&&&&OOOOOOOOO&&&O+*+++++===+++++++++%%%%O ",
|
||||
"&&&&OO&OO-----OOO+*O++**+++====+++++%%%%%O ",
|
||||
"&&&OO&&&O***---O**O++*++*+++++==+++%%%%%O ",
|
||||
"&&&OOOOOO+*--***OO++*++*O+++++++++%%%%%O ",
|
||||
"&&OOO&&O**--*++*++++O**O+++++++++%%%%%O ",
|
||||
"&OOO&&&O---*++*O++**+OO+++++++++%%%%OO ",
|
||||
"&OO&&&&O--+O**O++*++*++++++++++%%%%O ",
|
||||
"&&&&&&&O+**+OO++*++*O+++++++++%%%%O ",
|
||||
"&&&&&&O+*++*++++O**O+++++++++%%%%O ",
|
||||
"&&&&OOO*++*O++**+OO++++++++++%%%O ",
|
||||
"&&&OO++O**O++*++*++***++++++%%%O ",
|
||||
"OOOO++++OO++*++*O+*+++*++++%%%O ",
|
||||
"---+++++++++O**O+*+++*O+++%%%O ",
|
||||
"OOO---+++++++OO+*+++*O+++%%%O ",
|
||||
" OOO---+++++++O***O+++%%OO ",
|
||||
" OOO---+++++OOO+++%%O ",
|
||||
" OOO----++++++%%O ",
|
||||
" OOOO---++%%O ",
|
||||
" OOOOOO "};
|
50
fvwm_icons/rterm.xpm
Normal file
50
fvwm_icons/rterm.xpm
Normal file
@ -0,0 +1,50 @@
|
||||
/* XPM */
|
||||
/*****************************************************************************/
|
||||
/** This pixmap is kindly offered by Ion Cionca - 1992 - **/
|
||||
/** Swiss Federal Institute of Technology **/
|
||||
/** Central Computing Service **/
|
||||
/*****************************************************************************/
|
||||
static char * image_name [] = {
|
||||
/**/
|
||||
"44 34 6 1",
|
||||
/**/
|
||||
" s mask c none",
|
||||
"X c gray85",
|
||||
"o c gray50",
|
||||
"+ c #326565",
|
||||
"@ c white",
|
||||
"# c black",
|
||||
" XXXXXXXXXXXXXXXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
|
||||
" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ",
|
||||
" XXXX++++++++++++++++++++++XXXXoo ",
|
||||
" XXX++++++++++++++++++++++++XXXooo ",
|
||||
" XXX++@@+@++@+@@@@++@+++++++XXXooo ",
|
||||
" XXX++++++++++++++++++++++++XXXoooo ",
|
||||
" XXX++@@@@+@@+@@@+++++++++++XXXoooo ",
|
||||
" XXX++++++++++++++++++++++++XXXooooo ",
|
||||
" XXX++@@@@@@@@@@+@@@@@++++++XXXooooo ",
|
||||
" XXX++++++++++++++++++++++++XXXooooo ",
|
||||
" XXX++@@@+@@@@+@@++@@@++++++XXXooooo ",
|
||||
" XXX++++++++++++++++++++++++XXXooooo ",
|
||||
" XXX++@+++++++++++++++++++++XXXooooo ",
|
||||
" XXX++++++++++++++++++++++++XXXooooo ",
|
||||
" XXX++@@@@+@+@@@+@++++++++++XXXooooo ",
|
||||
" XXX++++++++++++++++++++++++XXXooooo ",
|
||||
" XXX++@+@@@@++++++++++++++++XXXooooo ",
|
||||
" XXXX++++++++++++++++++++++XXXXoooo ",
|
||||
" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" oooooooooooooooooooooooooXXXoo ",
|
||||
" XXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" oooooooooooooooooooooooooooooo ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXXooooXX XX ",
|
||||
" oXXXXXXXXXXXXXXXXXX#######XXoooo X X",
|
||||
" oooooooooooooooooooooooooooXXXooo X ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo X ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo oooooXXXo ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXooXXo ",
|
||||
"oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXXXXo ",
|
||||
"XXXXXXXXXXXXXXXXXXXXXXXXXXoo oXXXXXoo ",
|
||||
"ooooooooooooooooooooooooooo ooooooo "};
|
48
fvwm_icons/term.xpm
Normal file
48
fvwm_icons/term.xpm
Normal file
@ -0,0 +1,48 @@
|
||||
/* XPM */
|
||||
static char * term [] = {
|
||||
"64 38 7 1",
|
||||
" c none s mask",
|
||||
". c black",
|
||||
"X c gray85",
|
||||
"o c gray70",
|
||||
"O c blue",
|
||||
"+ c gray100",
|
||||
"@ c gray50",
|
||||
" ",
|
||||
" ....................... ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXX.. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXX.X. ",
|
||||
" .oooooooooooooooooooooo.XX. ",
|
||||
" ......................o.oXX. ",
|
||||
" .........................oXX. ",
|
||||
" ...OOOOOOOOOOOOOOOOOOOO...oXX. ",
|
||||
" ..OOOOOOOOOOOOOOOOOOOOOO..oXX. ",
|
||||
" ..OO+++++++++++OOOOOOOOO..oXX. ",
|
||||
" ..OOOOOOOOOOOOOOOOOOOOOO..oXX. ",
|
||||
" ..OO++++++++++++++++OOOO..oXX. ",
|
||||
" ..OOOOOOOOOOOOOOOOOOOOOO..oXX. ",
|
||||
" ..OO+++OOOOOOOOOOOOOOOOO..oXX. ",
|
||||
" ..OOOOOOOOOOOOOOOOOOOOOO..oXX. ",
|
||||
" ..OO++++++++O++OO+OOOOOO..oXX. ",
|
||||
" ..OOOOOOOOOOOOOOOOOOOOOO..oXX. ",
|
||||
" ..OO+++++++++OOOOOOOOOOO..oXX. ",
|
||||
" ..OOOOOOOOOOOOOOOOOOOOOO..oXX. ",
|
||||
" ..OO++++OOOO+++OOO++++OO..oX. ",
|
||||
" ..OOOOOOOOOOOOOOOOOOOOOO..o.. ",
|
||||
" ..OO+OOOOOOOOOOOOOOOOOOO... . ",
|
||||
" ...OOOOOOOOOOOOOOOOOOOO... . ",
|
||||
" ........................ . ",
|
||||
" ...................... . ",
|
||||
" ooooooo . ",
|
||||
" oooooooooooooooooooooooooooooo . ",
|
||||
" ooo.....ooooooooo.....oo...ooo . ",
|
||||
" ooooooooooooooooooooooo.ooo.oo . ",
|
||||
" ..............................oo.o . ",
|
||||
" .+@+@+@+@+@+@+@+@+@+@+@+@+@@@.oooo.. ",
|
||||
" .@@@@@@@@@@@@@@@@@@@@@@@@@@@@. ",
|
||||
" .@@+@+@+@+@+@+@+@+@+@+@+@+@@@. ",
|
||||
" .@@@@@@@@@@@@@@@@@@@@@@@@@@@@. ",
|
||||
" .@@@@@@@@@@@@@@@@@@@@@@@@@@@@. ",
|
||||
" ............................. ",
|
||||
" ",
|
||||
" "};
|
61
fvwm_icons/tiff2.xpm
Normal file
61
fvwm_icons/tiff2.xpm
Normal file
@ -0,0 +1,61 @@
|
||||
/* XPM */
|
||||
static char *noname[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 22 1",
|
||||
/* colors */
|
||||
"` c #220000",
|
||||
"a c #986500",
|
||||
"b c #FF9A9A",
|
||||
"c c #440000",
|
||||
"d c #EF0000",
|
||||
"e c #550000",
|
||||
"f c #555555",
|
||||
"g c #CC9966",
|
||||
"h c #111111",
|
||||
"i c #000077",
|
||||
"j c #888888",
|
||||
"k c #000055",
|
||||
"l c #663300",
|
||||
"m c #FFCBCB",
|
||||
"n c #000044",
|
||||
"o c none",
|
||||
"p c #444444",
|
||||
"q c #000089",
|
||||
"r c #000022",
|
||||
"s c #222222",
|
||||
"t c #CC6666",
|
||||
"u c #653232",
|
||||
/* pixels */
|
||||
"ooobbbbbbbbbbbbbbbbbbtoooooooooo",
|
||||
"ooobmmmmmmmmmmmmmmmmmtuooooooooo",
|
||||
"ooobmmmmmmmmmmmpsmmmmtbuoooooooo",
|
||||
"ooobmmmmmmmmmmmpsmmmmtbbuooooooo",
|
||||
"ooobmmdmmmmmmmmpsbbmmtbbbuoooooo",
|
||||
"ooobmddmmmmmmmmpsbbmmtbbbbuooooo",
|
||||
"ooobmddmbmmmmmpppsbmmtuuuuuuoooo",
|
||||
"ooobmdddbmmmmppmmpsmmmttttteoooo",
|
||||
"ooobmddccmmmmpmmbbsbmmttttteoooo",
|
||||
"ooobmdcoccmmmpmbbmsbbmmmmmmuoooo",
|
||||
"ooobmdccccbmmppbmssmbmmmmmmuoooo",
|
||||
"ooobmdccccjbmmppppmmbmmmmmmuoooo",
|
||||
"ooobmmcccoojmmppppmbbmmmmmmuoooo",
|
||||
"ooobmmmbhfoojhpmbppbmmmmmmmuoooo",
|
||||
"ooobmmmmbhfohasmbppbmmmmmmmuoooo",
|
||||
"ooobmmmmmmhhglabbppbbmmmmmmuoooo",
|
||||
"ooobmmmmmmm`lglabpppbmmmmmmuoooo",
|
||||
"ooobmmmmmmmm`lglamppbmmmmmmuoooo",
|
||||
"ooobmmmmmmmms`lglaspbbmmmmmuoooo",
|
||||
"ooobmmmmmmmpps`lglaspbmmmmmuoooo",
|
||||
"ooobmmmmmmmppmb`lglasbmmmmmuoooo",
|
||||
"ooobmmmmmmmppbbs`lglabbmmmmuoooo",
|
||||
"ooobmmmmmmmmmbbbmbbbbbbmmmmuoooo",
|
||||
"ooobmmmmmmmmmbbmmbbbbbbmmmmuoooo",
|
||||
"ooobmmmmmmmmmmmmmmmmmmmmmmmuoooo",
|
||||
"ooobmmmmmqqqmqmqqqmqqqmmmmmuoooo",
|
||||
"ooobmmmmmmimmimimmmimmmmmmmuoooo",
|
||||
"ooobmmmmmmkmmkmkkmmkkmmmmmmuoooo",
|
||||
"ooobmmmmmmnmmnmnmmmnmmmmmmmuoooo",
|
||||
"ooobmmmmmmrmmrmrmmmrmmmmmmmuoooo",
|
||||
"ooobmmmmmmmmmmmmmmmmmmmmmmmuoooo",
|
||||
"oootuuuuuuuuuuuuuuuuuuuuuuuuoooo"
|
||||
};
|
48
fvwm_icons/toolbox.xpm
Normal file
48
fvwm_icons/toolbox.xpm
Normal file
@ -0,0 +1,48 @@
|
||||
/* XPM */
|
||||
static char * icl8_3052_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 10 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c #440000",
|
||||
"o c #FFCC9A",
|
||||
"O c #9A6633",
|
||||
"+ c #CC9966",
|
||||
"@ c #BBBBBB",
|
||||
"# c #888888",
|
||||
"$ c #444444",
|
||||
"% c #111111",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ...... ",
|
||||
" .XXXXXX. ",
|
||||
" .........X......X.......... ",
|
||||
" .oooooooo.X.oooo.X.oooooooo..",
|
||||
" .ooooooooo...oooo...ooooooo.O.",
|
||||
" .oooooooooooooooooooooooooo.OO.",
|
||||
" ...........................OOO.",
|
||||
".++++++++++++++++++++++++++.OOO.",
|
||||
".++++++++++++++++++++++++++.OOO.",
|
||||
".++++++++++++@@@@@+++++++++.OOO.",
|
||||
".+++++++++++++@++@+++++++++.OOO.",
|
||||
".+++++++++++++@OOOOO+++++++.OOO.",
|
||||
".+++++++++++++@@@++O+++++++.OOO.",
|
||||
".+++++++++++++@+O++++++++++.OOO.",
|
||||
".+++++++++++++@+OOO++++++++.OOO.",
|
||||
".+++++++++++++@+O++++++++++.OOO.",
|
||||
".+++++++++++#+@+$++++++++++.OOO.",
|
||||
".++++++++++#$$$$$$+++++++++.OOO.",
|
||||
".+++++++++#$++%+O$%++++++++.OOO.",
|
||||
".+++++++++#$+OOOO$%O+++++++.OOO.",
|
||||
".++++++++++$$O$+$%++O++++++.OOO.",
|
||||
".+++++++++++$$$$%+++O++++++.OO. ",
|
||||
".++++++++++++O++O++O+++++++.O. ",
|
||||
".+++++++++++++OOOOO++++++++.. ",
|
||||
" ........................... "};
|
59
fvwm_icons/unknown1.xpm
Normal file
59
fvwm_icons/unknown1.xpm
Normal file
@ -0,0 +1,59 @@
|
||||
/* XPM */
|
||||
static char * unknown_xpm[] = {
|
||||
"48 48 8 1",
|
||||
" s None c none",
|
||||
". c black",
|
||||
"X c yellow",
|
||||
"o c deeppink",
|
||||
"O c midnightblue",
|
||||
"+ c deepskyblue3",
|
||||
"@ c firebrick",
|
||||
"# c tan",
|
||||
" ",
|
||||
" ",
|
||||
" ........ ",
|
||||
" ....XXXXXX... ",
|
||||
" ..XXXX.......... ",
|
||||
" ..XX............... ooo ",
|
||||
" ..XX................. o o ",
|
||||
" ..XX................... o ",
|
||||
" . ..XX...... ........ o ",
|
||||
" ... ..XX..... ....... o ",
|
||||
" . .XX..... ...... o ",
|
||||
" .X..... ...... ",
|
||||
" ... .X..... OO ...... o ",
|
||||
" ... ..X... OOOO ...... ",
|
||||
" ... .... OO O ...... ",
|
||||
" ... OO ...... ",
|
||||
" ... OO ....... ",
|
||||
" ... OO ........ ",
|
||||
"... ..X..... +++ ",
|
||||
".. OO ..XX..... + + ",
|
||||
".. .. OO ..XX..... + ",
|
||||
".. .. ..XX...... + ",
|
||||
"... .. ..XX...... + ",
|
||||
"... ... ...XX...... + ",
|
||||
" ........ ..XXX...... ",
|
||||
" ...... ..XX....... + ",
|
||||
" ... ..XX....... @ ",
|
||||
" .XX...... @@@ ",
|
||||
" ..X..... @ ",
|
||||
" .XX.... ",
|
||||
" .X.... ",
|
||||
" ### .X.... @@@ ",
|
||||
" # # .X.... @@@ ",
|
||||
" # .X.... @@@ ",
|
||||
" # .X.... @@@ ",
|
||||
" # .X.... @@@ ",
|
||||
" ... # ...... @@@ ",
|
||||
" . . .... @@@ ",
|
||||
" . # @@ ",
|
||||
" . @@ @@ ",
|
||||
" . .... @@ @@ ",
|
||||
" . .XX... @@@ @@ ",
|
||||
" .X.... @@@ @@@ ",
|
||||
" . .X.... @@@@@@@@ ",
|
||||
" ...... @@@@@@ ",
|
||||
" .... @@@ ",
|
||||
" ",
|
||||
" "};
|
52
fvwm_icons/wierd_page3.xpm
Normal file
52
fvwm_icons/wierd_page3.xpm
Normal file
@ -0,0 +1,52 @@
|
||||
/* XPM */
|
||||
static char *noname[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 13 1",
|
||||
/* colors */
|
||||
"` c #000000",
|
||||
"a c #CBFFFF",
|
||||
"b c #99CCCC",
|
||||
"c c #659898",
|
||||
"d c #0098FE",
|
||||
"e c #000077",
|
||||
"f c #0066FE",
|
||||
"g c #0000AB",
|
||||
"h c #000044",
|
||||
"i c #0000DC",
|
||||
"j c none",
|
||||
"k c #CBFFCB",
|
||||
"l c #00CBFE",
|
||||
/* pixels */
|
||||
"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj",
|
||||
"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj",
|
||||
"jjjjj```````````````````jjjjjjjj",
|
||||
"jjjjj`aaaaalaaaaaaaaaaa``jjjjjjj",
|
||||
"jjjjj`aaaafdfcaaaaaaaaa`b`jjjjjj",
|
||||
"jjjjj`aaagifigcaaaaaaaa`bb`jjjjj",
|
||||
"jjjjjaaaaagigcccaaaaaaa`bbb`jjjj",
|
||||
"jjjjjaalaaagcccdaaaaaaa`bbbb`jjj",
|
||||
"jjjjjafdfcaaacificaaaaa```````jj",
|
||||
"jjjjjgifigcaaegigecaaaaaccccc`jj",
|
||||
"jjjjjagigcccaaegecccaaaaccccc`jj",
|
||||
"jjjljaagcccdaaaecccfaaaaaaaaa`jj",
|
||||
"jjfdfcaaacificaaacgigcaaaaaaa`jj",
|
||||
"jgifigcaaegigecaahegehcaaaaaa`jj",
|
||||
"jjgigcccaaegecccaahehcccaaaaa`jj",
|
||||
"jjjgjccdaaaecccfaaahcccaaaaaa`jj",
|
||||
"jjjjjcificaaacgigcaaacaaaaaaa`jj",
|
||||
"jjjjjegigecaahegehcaaaaaaaaaa`jj",
|
||||
"jjjjjaegecccaahehcccaaaaaaaaa`jj",
|
||||
"jjjjjaaecccfaaahcccaaaaaaaaaa`jj",
|
||||
"jjjjjaaaacgigcaaacaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaahegehcaaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaaahehcccaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaaaahccckaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaaaaaackkaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaaaaaaaaaaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaaaaaaaaaaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaaaaaaaaaaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaaaaaaaaaaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaaaaaaaaaaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`aaaaaaaaaaaaaaaaaaaaaaa`jj",
|
||||
"jjjjj`````````````````````````jj"
|
||||
};
|
45
fvwm_icons/word_processor.xpm
Normal file
45
fvwm_icons/word_processor.xpm
Normal file
@ -0,0 +1,45 @@
|
||||
/* XPM */
|
||||
static char * icl8_15467_xpm[] = {
|
||||
/* width height ncolors chars_per_pixel */
|
||||
"32 32 7 1",
|
||||
/* colors */
|
||||
" s None c None",
|
||||
". c #989878786767",
|
||||
"X c tan",
|
||||
"o c wheat",
|
||||
"O c #000089",
|
||||
"+ c white",
|
||||
"@ c black",
|
||||
/* pixels */
|
||||
" ...................... ",
|
||||
" ...................... ",
|
||||
" XXXXXXXXXXXXXXXXXXXXXX.. ",
|
||||
" XXXXXXXXXXXXXXXXXXXXXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" ooOOOOOOOOOOOoooooooooXX.. ",
|
||||
" ooOOOOOOOOOOOoooooooooXX.. ",
|
||||
" ooO+++OO+OO+OoooooooooXX.. ",
|
||||
" ooOOO+OO+OO+OoooooooooXX.. ",
|
||||
" ooOOO+OO+O+OOoooooooooXX.. ",
|
||||
" ooOOO+O++O+OOoooooooooXX.. ",
|
||||
" ooOOO++O++OOOoooooooooXX.. ",
|
||||
" ooOOO+OO+OOOOoooooooooXX.. ",
|
||||
" ooOOOOOOOOOOOoooooooooXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" oo@@o@@@@@@o@@@o@@@oooXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" oo@@@o@@@@o@@@o@@oooooXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" oo@@@@@o@@@o@@@@@oooooXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" oo@@@@o@@@@o@@@o@@@oooXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" oo@@@@o@@@@@o@@@@oooooXX.. ",
|
||||
" ooooooooooooooooooooooXX.. ",
|
||||
" oo@@@@@o@@@o@@@@o@@oooXX ",
|
||||
" ooooooooooooooooooooooXX ",
|
||||
" oooooooooooooooooooooo ",
|
||||
" oooooooooooooooooooooo "};
|
56
fvwm_icons/xcalc.xpm
Normal file
56
fvwm_icons/xcalc.xpm
Normal file
@ -0,0 +1,56 @@
|
||||
/* XPM */
|
||||
static char * xcalc_xpm[] = {
|
||||
/*tan*/
|
||||
"64 38 14 1",
|
||||
" s None c None",
|
||||
". c dark slate grey",
|
||||
"X c white",
|
||||
"o c black",
|
||||
"O c #727277778585",
|
||||
"+ c light yellow",
|
||||
"@ c gray70",
|
||||
"# c green",
|
||||
"$ c gray85",
|
||||
"% c peachpuff4",
|
||||
"& c tan",
|
||||
"* c #8B8B5B5B7A7A",
|
||||
"= c blue",
|
||||
"- c gray",
|
||||
" .......... ",
|
||||
" ...XXXXXXXXXo ",
|
||||
" ..XXXXXXXXXXooo ",
|
||||
" ..XXXXXXXXXooXXo ",
|
||||
" .XXXXXXXXXoXX Xo ",
|
||||
" O.XXXXXXXXo ..... ",
|
||||
" O+.XXXXXXXoO .. ",
|
||||
" O+@....XXXXo+OOOOOO ",
|
||||
" OO@@...#.......++++++OOOOO ",
|
||||
" O+@....#..####......+++++++OO ",
|
||||
" O+@....#.....##..###.....+++++OO ",
|
||||
" O+@....#....##.......#.......++$%O ",
|
||||
" O+@...#..###......###........+$%%O ",
|
||||
" OOOO OO+++++......##......#........++$%%O ",
|
||||
" O&&&&OOOOOOOOOOO++++++++......##..#.......++$%%%O ",
|
||||
" OO&&&&&O&&&&&&&&&OOOOOO++++++++...##.......++$%%%%O ",
|
||||
" O&&&&&&&&&&&&&&&&&&&&&&&OO++++++++.........++$%%%%%O ",
|
||||
" O&&&&&&&&&&&&&&&&&&&&&&&&&&O**+++++++++....+++$%%%%%O ",
|
||||
" O&&&&&&&&&&&&&&&&OOOOOOOOO&&&O+*+++++===++++++++$%%%%O ",
|
||||
" O&&&&&&&&&&&&&&&&OO&OO@@@@@OOO+*O++**+++====++++$%%%%%O ",
|
||||
" OO&&&&&&&&&&&&&&&&OO&&&O***@@@O**O++*++*+++++==++$%%%%%O ",
|
||||
" O&&&&&&&&&&&&&&&&&&OOOOOO+*@@***OO++*++*O++++++++$%%%%%O ",
|
||||
" OOOO&&&&&&&&&&&&&&&&&OOO&&O**@@*++*++++O**O++++++++$%%%%%O ",
|
||||
"OXXXXO&&&&&&&&&&&&&&&OOO&&&O@@@*++*O++**+OO++++++++$%%%%OO ",
|
||||
"oooXXXO&&&&&&&&&&&&&&OO&&&&O@@+O**O++*++*+++++++++$%%%%O ",
|
||||
"ooooXXX&&&&&&&&&&&&&&&&&&&&O+**+OO++*++*O++++++++$%%%%O ",
|
||||
"oooooXXO&&&&&&&&&&&&&&&&&&O+*++*++++O**O++++++++$%%%%O ",
|
||||
"ooooooXX&&&&&&&&&&&&&&&&OOO*++*O++**+OO+++++++++$%%%O ",
|
||||
"ooooooXXO&&&&&&&&&&&&&&OO++O**O++*++*++***+++++$%%%O ",
|
||||
"oooooooXXO&&&&&&&&&&OOOO++++OO++*++*O+*+++*+++$%%%O ",
|
||||
"oooooooXXO&&&&OOOOOO---$$$++++++O**O+*+++*O++$%%%O ",
|
||||
"ooooooooXXOOOOO OOO---$$$++++OO+*+++*O++$%%%O ",
|
||||
"ooooooooXXO OOO---$$$++++O***O++$%%OO ",
|
||||
"ooooooooXXO OOO---$$$$+OOO++$%%O ",
|
||||
"ooooooooXXO OOO----$$$++$%%O ",
|
||||
"ooooooooXXO OOOO---$$%%O ",
|
||||
"ooooooooXO OOO-%%O ",
|
||||
"ooooooooO OOO "};
|
55
fvwm_icons/xman.xpm
Normal file
55
fvwm_icons/xman.xpm
Normal file
@ -0,0 +1,55 @@
|
||||
/* XPM */
|
||||
/*****************************************************************************/
|
||||
/** This pixmap is kindly offered by Ion Cionca - 1992 - **/
|
||||
/** Swiss Federal Institute of Technology **/
|
||||
/** Central Computing Service **/
|
||||
/*****************************************************************************/
|
||||
static char * image_name [] = {
|
||||
"64 38 8 1",
|
||||
/**/
|
||||
" s None c None",
|
||||
". c black",
|
||||
"X c green",
|
||||
"o c lightyellow",
|
||||
"O c gray70",
|
||||
"+ c tan",
|
||||
"@ c red",
|
||||
"# c maroon",
|
||||
" ........ ",
|
||||
" ..XXXXXXXX. .. ",
|
||||
" .XXXXXXXXXXX. ...o. ",
|
||||
" ..XXXXXXXXXXXX.......ooo.. ",
|
||||
" .. ......XXXXX....XXXXX.ooooooooo. ",
|
||||
" .. ....ooo.XXXXX.oooo.XXXXX.oooooOOoo. ",
|
||||
" .o.. ..oooooo.XXXXX.oooo.XXXXX.OOOOOOooo. ",
|
||||
" ...oo......ooooooo.XXXXX.oOOo.XXXXX.Oooooooooo. ",
|
||||
" ...ooooooooooooooo.XXXXX.oooo.XXXXX.ooooooOOoo.. ",
|
||||
" .+.ooooooooooOOOoo........ooo.XXXXX.ooOOOOOoooo. ",
|
||||
" ......oooooooOOOooooooooooo..o.XXXXX.oOOooooooooo.. ",
|
||||
" ..+.+.oOOOOOOOoooooOOooooooo..XXXXX.oOooooooOOoooo. ",
|
||||
"..+..+.oooooooooOOOoooooooooo.XXXXX.ooooOOOOOOoooooo. ",
|
||||
"...+.+..ooooooOOOooooOOOOOooo.XXXX.oooOOOoooooooooooo. ",
|
||||
"@.+..++.oooOOOOoooooOOoooooo.XXXX.ooOOoooooooooooooooo.. ",
|
||||
"@.+..++.ooooooooooOOoooooooo.XXX.ooOOooooooooooooooooooo.. ",
|
||||
" @.++.++.ooooooOOOOoooooooo.XXXX..ooooOOOOoooooooooOooooo.. ",
|
||||
" @..+.+...oooOOoooooOoooooo.XXXX..oooOooooooooOOOOOOooooo. ",
|
||||
" @@.+.+.+..ooooooOOOoooOOoo.XXXX...oOOooooOOOOoooooooooo.. ",
|
||||
" @.++.+.+..oooOOOoooOOoooo.XXXX.o.ooooOOOoooooooooooo..+.... ",
|
||||
" @@.+.+..+..ooooooOOoooooo.XXXX.o.ooooOooooooooooooo..+++... ",
|
||||
" @.+.++..+..oooOOooooOOoo......oo.ooOOooooooooooo...+++.. ",
|
||||
" @+.+.++..+..oooooooOOooooooooooo.ooOooooo.......++++..+...@@ ",
|
||||
" @@.+.+++.++..ooooOOoooooooo.oooo..ooooo...+++++++...+++++.@@ ",
|
||||
" @@.+.++..++..oooOooooooo..X..ooo.oooo..++++++....+++++.@@@ ",
|
||||
" @.+..++.+++.oooooooooo.XXXXX.oo..oo..+.......++++...@@@ ",
|
||||
" @@.+..++.+++.ooooo....XXXXXXX.oo.o...............@@@@ ",
|
||||
" @.++.+++.++.oo...+++.XXXXXXX.........@@@@@@@@@@@ ",
|
||||
" @@.++.++.++.o..++++++.XXXXXX........@@ ",
|
||||
" @.++..++.+...++......XXXXX.######..@ ",
|
||||
" @@@++.+++.+.+...++..@..X..@####...@ ",
|
||||
" @.++.+++...+....@@@ . @@.....@@ ",
|
||||
" @@.+.....+...+@@@ @@@@@@ ",
|
||||
" @@.++....+@@@@ ",
|
||||
" @@....+@@@ ",
|
||||
" @@+@@@@ ",
|
||||
" @@@ ",
|
||||
" "};
|
51
fvwm_icons/xterm-axp.xpm
Normal file
51
fvwm_icons/xterm-axp.xpm
Normal file
@ -0,0 +1,51 @@
|
||||
/* XPM */
|
||||
static char * image_name [] = {
|
||||
/**/
|
||||
"64 38 8 1",
|
||||
/**/
|
||||
" s mask c none",
|
||||
". c gray70",
|
||||
"X c gray85",
|
||||
"o c gray50",
|
||||
"O c #bb0000",
|
||||
"+ c darkolivegreen",
|
||||
"@ c white",
|
||||
"# c black",
|
||||
" ",
|
||||
" ",
|
||||
" ........................... ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ",
|
||||
" OO OOOOOO OOOOOOOOO+++++++++++++++++++++++XXXXoo ",
|
||||
" OO OO OO OOOO OOOO OOOOOO+++++++++++++++++++++++XXXooo ",
|
||||
" OOO OOO OOOOOOO OO.XOO+@@+@++@+@@@@++@+++++++XXXooo ",
|
||||
" OOO OOO OOOOO OO.XOO+++++++++++++++++++++++XXXoooo ",
|
||||
" OOO OO OOO OOOOOO+@@@@+@@+@@@+++++++++++XXXoooo ",
|
||||
" OOO OO OOOOO OOOOO++++++++++++++++++++++++XXXooooo ",
|
||||
" OOO OOO OOOOOOO OO.XX++@@@@@@@@@@+@@@@@++++++XXXooooo ",
|
||||
" OO OO OO OOOO OOOO OO.XX++++++++++++++++++++++++XXXooooo ",
|
||||
" OOO O OOOO OOOOOO.XX++@@@+@@@@+@@++@@@++++++XXXooooo ",
|
||||
" OOOOOO .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" OOO .XX++@+++++++++++++++++++++XXXooooo ",
|
||||
" .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" .XX++@@@@+@+@@@+@++++++++++XXXooooo ",
|
||||
" .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" .XX++@+@@@@++++++++++++++++XXXooooo ",
|
||||
" .XXX++++++++++++++++++++++XXXXoooo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" ooooooooooooooooooooooooo...oo ",
|
||||
" ..........................ooo ",
|
||||
" oooooooooooooooooooooooooooooo ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ",
|
||||
" oXXXXXXXXXXXXXXXXXX#######XXoooo . .",
|
||||
" oooooooooooooooooooooooooooXXXooo . ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ",
|
||||
" oooooooooooooooooooooooooooo ooooooo ",
|
||||
" ",
|
||||
" "};
|
56
fvwm_icons/xterm-blank.xpm
Normal file
56
fvwm_icons/xterm-blank.xpm
Normal file
@ -0,0 +1,56 @@
|
||||
/* XPM */
|
||||
/*****************************************************************************/
|
||||
/** This pixmap is kindly offered by Ion Cionca - 1992 - **/
|
||||
/** Swiss Federal Institute of Technology **/
|
||||
/** Central Computing Service **/
|
||||
/*****************************************************************************/
|
||||
static char * image_name [] = {
|
||||
/**/
|
||||
"64 38 8 1",
|
||||
/**/
|
||||
" s mask c none",
|
||||
". c gray70",
|
||||
"X c gray85",
|
||||
"o c gray50",
|
||||
"O c red",
|
||||
"+ c darkolivegreen",
|
||||
"@ c white",
|
||||
"# c black",
|
||||
" ",
|
||||
" ",
|
||||
" ........................... ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ",
|
||||
" .XX+++++++++++++++++++++++XXXXoo ",
|
||||
" .XX++++++++++++++++++++++++XXXooo ",
|
||||
" .XX++@@+@++@+@@@@++@+++++++XXXooo ",
|
||||
" .XX++++++++++++++++++++++++XXXoooo ",
|
||||
" .XX++@@@@+@@+@@@+++++++++++XXXoooo ",
|
||||
" .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" .XX++@@@@@@@@@@+@@@@@++++++XXXooooo ",
|
||||
" .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" .XX++@@@+@@@@+@@++@@@++++++XXXooooo ",
|
||||
" .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" .XX++@+++++++++++++++++++++XXXooooo ",
|
||||
" .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" .XX++@@@@+@+@@@+@++++++++++XXXooooo ",
|
||||
" .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" .XX++@+@@@@++++++++++++++++XXXooooo ",
|
||||
" .XXX++++++++++++++++++++++XXXXoooo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" ooooooooooooooooooooooooo...oo ",
|
||||
" ..........................ooo ",
|
||||
" oooooooooooooooooooooooooooooo ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ",
|
||||
" oXXXXXXXXXXXXXXXXXX#######XXoooo . .",
|
||||
" oooooooooooooooooooooooooooXXXooo . ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ",
|
||||
" oooooooooooooooooooooooooooo ooooooo ",
|
||||
" ",
|
||||
" "};
|
57
fvwm_icons/xterm-dec.xpm
Normal file
57
fvwm_icons/xterm-dec.xpm
Normal file
@ -0,0 +1,57 @@
|
||||
/* XPM */
|
||||
/*****************************************************************************/
|
||||
/** This pixmap is kindly offered by Ion Cionca - 1992 - **/
|
||||
/** Swiss Federal Institute of Technology **/
|
||||
/** Central Computing Service **/
|
||||
/*****************************************************************************/
|
||||
static char * image_name [] = {
|
||||
/**/
|
||||
"64 38 9 1",
|
||||
/**/
|
||||
" s mask c none",
|
||||
". c gray70",
|
||||
"X c gray85",
|
||||
"o c gray50",
|
||||
"- c #a00000",
|
||||
"O c white",
|
||||
"+ c darkolivegreen",
|
||||
"@ c white",
|
||||
"# c black",
|
||||
" ",
|
||||
" ",
|
||||
" ........................... ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ",
|
||||
" .XX+++++++++++++++++++++++XXXXoo ",
|
||||
" .XX++++++++++++++++++++++++XXXooo ",
|
||||
"-----------------------------------@+@@@@++@+++++++XXXooo ",
|
||||
"----OO-OO--------OO---O---------OO-++++++++++++++++XXXoooo ",
|
||||
"----OO-OO--------OO--OO---------OO-@+@@@+++++++++++XXXoooo ",
|
||||
"----OO---------------OO---------OO-++++++++++++++++XXXooooo ",
|
||||
"-OOOOO-OO--OOO-O-OO-OOOO-XOOO-O-OO-@@@@+@@@@@++++++XXXooooo ",
|
||||
"OOOOOO-OO-OOOOOO-OO-OOOO-OOOOOO-OO-++++++++++++++++XXXooooo ",
|
||||
"OO--OO-OO-OO--OO-OO--OO--OO--OO-OO-@@+@@++@@@++++++XXXooooo ",
|
||||
"OO--OO-OO-OO--OO-OO--OO--OO--OO-OO-++++++++++++++++XXXooooo ",
|
||||
"OO--OO-OO-OO--OO-OO--OO--OO--OO-OO-++++++++++++++++XXXooooo ",
|
||||
"OO--OO-OO-OOOOOO-OO--OOO-OOOOOO-OO-++++++++++++++++XXXooooo ",
|
||||
"-OOOOO-OO--OOOOO-OO---OO-XOOOOO-OO-+@@@+@++++++++++XXXooooo ",
|
||||
"--------------OO-------------------++++++++++++++++XXXooooo ",
|
||||
"----------OOOOOO-------------------++++++++++++++++XXXooooo ",
|
||||
"-----------OOOO--------------------+++++++++++++++XXXXoooo ",
|
||||
"-----------------------------------XXXXXXXXXXXXXXXXXXXooo ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" ooooooooooooooooooooooooo...oo ",
|
||||
" ..........................ooo ",
|
||||
" oooooooooooooooooooooooooooooo ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ",
|
||||
" oXXXXXXXXXXXXXXXXXX#######XXoooo . .",
|
||||
" oooooooooooooooooooooooooooXXXooo . ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ",
|
||||
" oooooooooooooooooooooooooooo ooooooo ",
|
||||
" ",
|
||||
" "};
|
49
fvwm_icons/xterm-sgi.xpm
Normal file
49
fvwm_icons/xterm-sgi.xpm
Normal file
@ -0,0 +1,49 @@
|
||||
/* XPM */
|
||||
static char * xterm-sgi_xpm[] = {
|
||||
"64 38 8 1",
|
||||
" s None c None",
|
||||
". c gray70",
|
||||
"X c #71717171C6C6",
|
||||
"o c gray85",
|
||||
"O c gray50",
|
||||
"+ c darkolivegreen",
|
||||
"@ c white",
|
||||
"# c black",
|
||||
" ",
|
||||
" ",
|
||||
" ........................... ",
|
||||
" XX XX .ooooooooooooooooooooooooooo. ",
|
||||
" XXX XXX.oooooooooooooooooooooooooooooOO ",
|
||||
" XX X X XXoo+++++++++++++++++++++++ooooOO ",
|
||||
" XX X X XXo++++++++++++++++++++++++oooOOO ",
|
||||
" XX X X XXo++@@+@++@+@@@@++@+++++++oooOOO ",
|
||||
" XX XX X X XXoXX+++++++++++++++++++++++oooOOOO ",
|
||||
" XXXX XXX XXX.XXXX@@@@+@@+@@@+++++++++++oooOOOO ",
|
||||
" XX XX XXXXX XXoXX++++++++++++++++++++++oooOOOOO ",
|
||||
" XX XXXXXXXXXooXX@@@@@@@@@@+@@@@@++++++oooOOOOO ",
|
||||
" XX XXXXXXXXXooXX++++++++++++++++++++++oooOOOOO ",
|
||||
" XX XX XXXXX XXoXX@@@+@@@@+@@++@@@++++++oooOOOOO ",
|
||||
" XXXX XXX XXX.XXXX++++++++++++++++++++++oooOOOOO ",
|
||||
" XX XX X X XXoXX+@+++++++++++++++++++++oooOOOOO ",
|
||||
" XX X X XXo++++++++++++++++++++++++oooOOOOO ",
|
||||
" XX X X XXo++@@@@+@+@@@+@++++++++++oooOOOOO ",
|
||||
" XX X X XXoo++++++++++++++++++++++++oooOOOOO ",
|
||||
" XXX XXX.oo++@+@@@@++++++++++++++++oooOOOOO ",
|
||||
" XX XX .ooo++++++++++++++++++++++ooooOOOO ",
|
||||
" .oooooooooooooooooooooooooooooOOO ",
|
||||
" .oooooooooooooooooooooooooooOOO ",
|
||||
" OOOOOOOOOOOOOOOOOOOOOOOOO...OO ",
|
||||
" ..........................OOO ",
|
||||
" OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO ",
|
||||
" OoooooooooooooooooooooooooooOOOO.. .. ",
|
||||
" Ooooooooooooooooooo#######ooOOOO . .",
|
||||
" OOOOOOOOOOOOOOOOOOOOOOOOOOOoooOOO . ",
|
||||
" OooooooooooooooooooooooooooOOOOO . ",
|
||||
" OooooooooooooooooooooooooooOO OOOOOO ",
|
||||
" Ooo@@@@@@@@@@@@@@@@@@@oooooOO OOOOO...O ",
|
||||
" OooooooooooooooooooooooooooOO OOoooOO..O ",
|
||||
" Ooo@@@@@@@@@@@@@@@@@@@@ooooOO Oooooo..O ",
|
||||
" OooooooooooooooooooooooooooOO O.....OO ",
|
||||
" OOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOO ",
|
||||
" ",
|
||||
" "};
|
49
fvwm_icons/xterm-sol.xpm
Normal file
49
fvwm_icons/xterm-sol.xpm
Normal file
@ -0,0 +1,49 @@
|
||||
/* XPM */
|
||||
static char * xterm-sol_xpm[] = {
|
||||
"64 38 8 1",
|
||||
" s None c None",
|
||||
". c gray70",
|
||||
"X c white",
|
||||
"o c red",
|
||||
"O c black",
|
||||
"+ c gray85",
|
||||
"@ c gray50",
|
||||
"# c darkolivegreen",
|
||||
" ",
|
||||
" . ",
|
||||
" XXXXoOO.OOO.. ........................... ",
|
||||
" oXXXXXoOO.OOO.O .+++++++++++++++++++++++++++. ",
|
||||
" XXoXXXXXOO.OOO.OOO+++++++++++++++++++++++++++++@@ ",
|
||||
" XXXXXXXXXO...O...O.O+#######################++++@@ ",
|
||||
" XXXXXXXXXX.......O..O+#.######################+++@@@ ",
|
||||
" XXXXXXXXXXX.........O.O.#XX#X##X#XXXX##X#######+++@@@ ",
|
||||
" XoXXXXXXXXXXooooooooo...O#######################+++@@@@ ",
|
||||
" XXoXXXXXXX..XXooooooo..OO#XXXX#XX#XXX###########+++@@@@ ",
|
||||
" XXXXXXXX.....XXXXXoooo...OO######################+++@@@@@ ",
|
||||
" XXXXXXX......XXXXXXooo.....XXXXXXXXXX#XXXXX######+++@@@@@ ",
|
||||
" XXXXXX.......XXXXXXXoo...OO######################+++@@@@@ ",
|
||||
" XXXXXX.......XXXXXXXoo..OOO..X#XXXX#XX##XXX######+++@@@@@ ",
|
||||
" ooXXXX.......XXXXXXXoo.....######################+++@@@@@ ",
|
||||
" XXXXXXX.......XXXXXXXoo.....X#####################+++@@@@@ ",
|
||||
" XXXXXX.......XXXXXXXoo...OO######################+++@@@@@ ",
|
||||
" XXXXXX.......XXXXXXXoo..OOOXXXX#X#XXX#X##########+++@@@@@ ",
|
||||
" XXXXXX.......XXXXXXXoo....O######################+++@@@@@ ",
|
||||
" XXXXXXX......XXXXXXooo.....X#XXXX################+++@@@@@ ",
|
||||
" XXOXXXXX.....XXXXXoooo....O#####################++++@@@@ ",
|
||||
" OXXXXXXXXX..XXooooooo.O.O++++++++++++++++++++++++++@@@ ",
|
||||
" XXXXXXXXXXXXooooooooo..OO+++++++++++++++++++++++++@@@ ",
|
||||
" XXXXXXXXXXX...........O @@@@@@@@@@@@@@@@@@@@@@@@@...@@ ",
|
||||
" XXXOXXXXXX........................................@@@ ",
|
||||
" XOXXXXXXX....O...O.O @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ",
|
||||
" XXXXXXXX...OOO..OO @+++++++++++++++++++++++++++@@@@.. .. ",
|
||||
" XXXOXXXO.OOOO.. @++++++++++++++++++OOOOOOO++@@@@ . .",
|
||||
" XOXXXO.OOO . @@@@@@@@@@@@@@@@@@@@@@@@@@@+++@@@ . ",
|
||||
" .++++++++++++++++++++++++++@@@@@ . ",
|
||||
" @++++++++++++++++++++++++++@@ @@@@@@ ",
|
||||
" @++XXXXXXXXXXXXXXXXXXX+++++@@ @@@@@...@ ",
|
||||
" @++++++++++++++++++++++++++@@ @@+++@@..@ ",
|
||||
" @++XXXXXXXXXXXXXXXXXXXX++++@@ @+++++..@ ",
|
||||
" @++++++++++++++++++++++++++@@ @.....@@ ",
|
||||
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@ ",
|
||||
" ",
|
||||
" "};
|
56
fvwm_icons/xterm-sun.xpm
Normal file
56
fvwm_icons/xterm-sun.xpm
Normal file
@ -0,0 +1,56 @@
|
||||
/* XPM */
|
||||
/*****************************************************************************/
|
||||
/** This pixmap is kindly offered by Ion Cionca - 1992 - **/
|
||||
/** Swiss Federal Institute of Technology **/
|
||||
/** Central Computing Service **/
|
||||
/*****************************************************************************/
|
||||
static char * image_name [] = {
|
||||
/**/
|
||||
"64 38 8 1",
|
||||
/**/
|
||||
" s mask c none",
|
||||
". c gray70",
|
||||
"X c gray85",
|
||||
"o c gray50",
|
||||
"O c #4000bf",
|
||||
"+ c darkolivegreen",
|
||||
"@ c white",
|
||||
"# c black",
|
||||
" ",
|
||||
" OOO ",
|
||||
" OOOOO ........................... ",
|
||||
" OO OOO .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" O OOO OOO .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ",
|
||||
" OOO OOO OOO .XX+++++++++++++++++++++++XXXXoo ",
|
||||
" O OOO OOO OOO .XX++++++++++++++++++++++++XXXooo ",
|
||||
" OOO OOO OOO OOO.XX++@@+@++@+@@@@++@+++++++XXXooo ",
|
||||
" O OOO OOO OOO O OXX++++++++++++++++++++++++XXXoooo ",
|
||||
" OOO OOO OOO OOO OOOX++@@@@+@@+@@@+++++++++++XXXoooo ",
|
||||
" OOO O OOO OOO O OOOXO++++++++++++++++++++++++XXXooooo ",
|
||||
" OOO OOO OOO OO OOO.OOO+@@@@@@@@@@+@@@@@++++++XXXooooo ",
|
||||
" OOO OOO OOOOO OOO OOO++++++++++++++++++++++++XXXooooo ",
|
||||
" OOO OOO OOO OOO OOO OOOXOOO@@+@@@@+@@++@@@++++++XXXooooo ",
|
||||
" OOO OOO OOOOO OOO OOOXOOOOO++++++++++++++++++++XXXooooo ",
|
||||
" OO OOO OOO OO OO OOO.OOO+OO++++++++++++++++++++XXXooooo ",
|
||||
" OOOOO OOO OOO OOOOO OOO+OOO++++++++++++++++++++XXXooooo ",
|
||||
" OOO OOO OOO OOO OOO OOOXOOO@@@+@+@@@+@++++++++++XXXooooo ",
|
||||
" OOO OOO OOOOO OOOXOOO++++++++++++++++++++++XXXooooo ",
|
||||
" OOO OOO OO OOO OOO.OOO+@+@@@@++++++++++++++++XXXooooo ",
|
||||
" O OOO O OOO OOO O OOOX++++++++++++++++++++++XXXXoooo ",
|
||||
" OOO OOO OOO OOO OOOXXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" O O OOO OOO OOO O.XXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" OOO OOO OOO OOO ooooooooooooooooooooooooo...oo ",
|
||||
" OOO OOO OOO O ..........................ooo ",
|
||||
" OOO OOO OOO oooooooooooooooooooooooooooooo ",
|
||||
" OOO OOO O oXXXXXXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ",
|
||||
" OOO OO oXXXXXXXXXXXXXXXXXX#######XXoooo . .",
|
||||
" OOOOO oooooooooooooooooooooooooooXXXooo . ",
|
||||
" OOO oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ",
|
||||
" oooooooooooooooooooooooooooo ooooooo ",
|
||||
" ",
|
||||
" "};
|
56
fvwm_icons/xterm.xpm
Normal file
56
fvwm_icons/xterm.xpm
Normal file
@ -0,0 +1,56 @@
|
||||
/* XPM */
|
||||
/*****************************************************************************/
|
||||
/** This pixmap is kindly offered by Ion Cionca - 1992 - **/
|
||||
/** Swiss Federal Institute of Technology **/
|
||||
/** Central Computing Service **/
|
||||
/*****************************************************************************/
|
||||
static char * image_name [] = {
|
||||
/**/
|
||||
"64 38 8 1",
|
||||
/**/
|
||||
" s mask c none",
|
||||
". c gray70",
|
||||
"X c gray85",
|
||||
"o c gray50",
|
||||
"O c red",
|
||||
"+ c darkolivegreen",
|
||||
"@ c white",
|
||||
"# c black",
|
||||
" ",
|
||||
" ",
|
||||
" ........................... ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
|
||||
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo ",
|
||||
" OOOOOOOOOO .XXOOO++++++++++++++++++++XXXXoo ",
|
||||
" OOOOOOOOOO .XOOO++++++++++++++++++++++XXXooo ",
|
||||
" OOOOOOOOOO .OOO+@@+@++@+@@@@++@+++++++XXXooo ",
|
||||
" OOOOOOOOOO OOO++++++++++++++++++++++++XXXoooo ",
|
||||
" OOOOOOOOOO OOOX++@@@@+@@+@@@+++++++++++XXXoooo ",
|
||||
" OOOOOOOOOO OOOXX++++++++++++++++++++++++XXXooooo ",
|
||||
" OOOOOOOOOO OOO.XX++@@@@@@@@@@+@@@@@++++++XXXooooo ",
|
||||
" OOOOOOOOOO OOO .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" OOOOOOOOO OOO .XX++@@@+@@@@+@@++@@@++++++XXXooooo ",
|
||||
" OOOOOOO OOO .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" OOOOO OOOO .XX++@+++++++++++++++++++++XXXooooo ",
|
||||
" OOO OOOOOO .XX++++++++++++++++++++++++XXXooooo ",
|
||||
" OOO OOOOOOOO .XX++@@@@+@+@@@+@++++++++++XXXooooo ",
|
||||
" OOO OOOOOOOOOO.XX++++++++++++++++++++++++XXXooooo ",
|
||||
" OOO OOOOOOOOOOXX++@+@@@@++++++++++++++++XXXooooo ",
|
||||
" OOO OOOOOOOOOOXX++++++++++++++++++++++XXXXoooo ",
|
||||
" OOO OOOOOOOOOOXXXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" OOO OOOOOOOOOOXXXXXXXXXXXXXXXXXXXXXXXXXooo ",
|
||||
" OOO OOOOOOOOOOoooooooooooooooooooooooo...oo ",
|
||||
" OOO OOOOOOOOOO.........................ooo ",
|
||||
" OOO OOOOOOOOOOooooooooooooooooooooooooooo ",
|
||||
" OOO OOOOOOOOOOXXXXXXXXXXXXXXXXXXXXXXoooo.. .. ",
|
||||
" OOO oXXXXXXXXXXXXXXXXXX#######XXoooo . .",
|
||||
" oooooooooooooooooooooooooooXXXooo . ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXooooo . ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo oooooo ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@XXXXXoo ooooo...o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo ooXXXoo..o ",
|
||||
" oXX@@@@@@@@@@@@@@@@@@@@XXXXoo oXXXXX..o ",
|
||||
" oXXXXXXXXXXXXXXXXXXXXXXXXXXoo o.....oo ",
|
||||
" oooooooooooooooooooooooooooo ooooooo ",
|
||||
" ",
|
||||
" "};
|
22
libs/CatString3.c
Normal file
22
libs/CatString3.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* Concatentates 3 strings
|
||||
*
|
||||
*************************************************************************/
|
||||
char CatS[256];
|
||||
|
||||
char *CatString3(char *a, char *b, char *c)
|
||||
{
|
||||
if (strlen(a)+strlen(b)+strlen(c) > 255)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
strcpy(CatS, a);
|
||||
strcat(CatS, b);
|
||||
strcat(CatS, c);
|
||||
return CatS;
|
||||
}
|
38
libs/CopyString.c
Normal file
38
libs/CopyString.c
Normal file
@ -0,0 +1,38 @@
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "fvwmlib.h"
|
||||
/***************************************************************************
|
||||
*
|
||||
* A simple routine to copy a string, stripping spaces and mallocing
|
||||
* space for the new string
|
||||
***************************************************************************/
|
||||
void CopyString(char **dest, char *source)
|
||||
{
|
||||
int len;
|
||||
char *start;
|
||||
|
||||
while(((isspace(*source))&&(*source != '\n'))&&(*source != 0))
|
||||
{
|
||||
source++;
|
||||
}
|
||||
len = 0;
|
||||
start = source;
|
||||
while((*source != '\n')&&(*source != 0))
|
||||
{
|
||||
len++;
|
||||
source++;
|
||||
}
|
||||
|
||||
source--;
|
||||
while((isspace(*source))&&(*source != 0)&&(len >0))
|
||||
{
|
||||
len--;
|
||||
source--;
|
||||
}
|
||||
*dest = safemalloc(len+1);
|
||||
strncpy(*dest,start,len);
|
||||
(*dest)[len]=0;
|
||||
}
|
||||
|
||||
|
15
libs/GetFdWidth.c
Normal file
15
libs/GetFdWidth.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../configure.h"
|
||||
|
||||
|
||||
int GetFdWidth(void)
|
||||
{
|
||||
#ifdef HAVE_SYSCONF
|
||||
return sysconf(_SC_OPEN_MAX);
|
||||
#else
|
||||
return getdtablesize();
|
||||
#endif
|
||||
}
|
18
libs/Imakefile
Normal file
18
libs/Imakefile
Normal file
@ -0,0 +1,18 @@
|
||||
/* Imakefile for fvwm 1.18c */
|
||||
/* Thu Aug 5 11:21:36 MET DST 1993, mj@dfv.rwth-aachen.de */
|
||||
|
||||
/* setup is done entirely in configuration.h now! */
|
||||
/* You should need to do much in here, excpt maybe add libraries */
|
||||
|
||||
/* I need to get the #define XPM from configuration.h if its in there, */
|
||||
/* so that I can tell if I should include -lXpm */
|
||||
#include <../configure.h>
|
||||
|
||||
COMPILER
|
||||
|
||||
OBJS = CatString3.o SendInfo.o SendText.o wild.o safemalloc.o findIconFile.o \
|
||||
mystrcasecmp.o strncmp.o hostname.o ReadPacket.o \
|
||||
sleep.o CopyString.o mygetostype.o GetFdWidth.o
|
||||
|
||||
NormalLibraryTarget(fvwmlib, $(OBJS))
|
||||
|
57
libs/ReadPacket.c
Normal file
57
libs/ReadPacket.c
Normal file
@ -0,0 +1,57 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "fvwmlib.h"
|
||||
#include "../fvwm/module.h"
|
||||
|
||||
/************************************************************************
|
||||
*
|
||||
* Reads a single packet of info from fvwm. Prototype is:
|
||||
* unsigned long header[3];
|
||||
* unsigned long *body;
|
||||
* int fd[2];
|
||||
* void DeadPipe(int nonsense); /* Called if the pipe is no longer open
|
||||
*
|
||||
* ReadFvwmPacket(fd[1],header, &body);
|
||||
*
|
||||
* Returns:
|
||||
* > 0 everything is OK.
|
||||
* = 0 invalid packet.
|
||||
* < 0 pipe is dead. (Should never occur)
|
||||
*
|
||||
**************************************************************************/
|
||||
int ReadFvwmPacket(int fd, unsigned long *header, unsigned long **body)
|
||||
{
|
||||
int count,total,count2,body_length;
|
||||
char *cbody;
|
||||
extern void DeadPipe(int);
|
||||
|
||||
if((count = read(fd,header,3*sizeof(unsigned long))) >0)
|
||||
{
|
||||
if(header[0] == START_FLAG)
|
||||
{
|
||||
body_length = header[2]-3;
|
||||
*body = (unsigned long *)
|
||||
safemalloc(body_length * sizeof(unsigned long));
|
||||
cbody = (char *)(*body);
|
||||
total = 0;
|
||||
while(total < body_length*sizeof(unsigned long))
|
||||
{
|
||||
if((count2=
|
||||
read(fd,&cbody[total],
|
||||
body_length*sizeof(unsigned long)-total)) >0)
|
||||
{
|
||||
total += count2;
|
||||
}
|
||||
else if(count2 < 0)
|
||||
{
|
||||
DeadPipe(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
count = 0;
|
||||
}
|
||||
if(count <= 0)
|
||||
DeadPipe(1);
|
||||
return count;
|
||||
}
|
26
libs/SendInfo.c
Normal file
26
libs/SendInfo.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* SendInfo - send a command back to fvwm
|
||||
*
|
||||
***********************************************************************/
|
||||
void SendInfo(int *fd,char *message,unsigned long window)
|
||||
{
|
||||
int w;
|
||||
|
||||
if(message != NULL)
|
||||
{
|
||||
write(fd[0],&window, sizeof(unsigned long));
|
||||
w=strlen(message);
|
||||
write(fd[0],&w,sizeof(int));
|
||||
write(fd[0],message,w);
|
||||
|
||||
/* keep going */
|
||||
w=1;
|
||||
write(fd[0],&w,sizeof(int));
|
||||
}
|
||||
}
|
||||
|
24
libs/SendText.c
Normal file
24
libs/SendText.c
Normal file
@ -0,0 +1,24 @@
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
/************************************************************************
|
||||
*
|
||||
* Sends arbitrary text to fvwm
|
||||
*
|
||||
***********************************************************************/
|
||||
void SendText(int *fd,char *message,unsigned long window)
|
||||
{
|
||||
int w;
|
||||
|
||||
if(message != NULL)
|
||||
{
|
||||
write(fd[0],&window, sizeof(unsigned long));
|
||||
|
||||
w=strlen(message);
|
||||
write(fd[0],&w,sizeof(int));
|
||||
write(fd[0],message,w);
|
||||
|
||||
/* keep going */
|
||||
w = 1;
|
||||
write(fd[0],&w,sizeof(int));
|
||||
}
|
||||
}
|
81
libs/findIconFile.c
Normal file
81
libs/findIconFile.c
Normal file
@ -0,0 +1,81 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "fvwmlib.h"
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Find the specified icon file somewhere along the given path.
|
||||
*
|
||||
* There is a possible race condition here: We check the file and later
|
||||
* do something with it. By then, the file might not be accessible.
|
||||
* Oh well.
|
||||
*
|
||||
****************************************************************************/
|
||||
char *findIconFile(char *icon, char *pathlist, int type)
|
||||
{
|
||||
char *path;
|
||||
char *dir_end;
|
||||
int l1,l2;
|
||||
|
||||
if(icon != NULL)
|
||||
l1 = strlen(icon);
|
||||
else
|
||||
l1 = 0;
|
||||
|
||||
if(pathlist != NULL)
|
||||
l2 = strlen(pathlist);
|
||||
else
|
||||
l2 = 0;
|
||||
|
||||
path = safemalloc(l1 + l2 + 10);
|
||||
*path = '\0';
|
||||
if (*icon == '/')
|
||||
{
|
||||
/* No search if icon begins with a slash */
|
||||
strcpy(path, icon);
|
||||
return path;
|
||||
}
|
||||
|
||||
if ((pathlist == NULL) || (*pathlist == '\0'))
|
||||
{
|
||||
/* No search if pathlist is empty */
|
||||
strcpy(path, icon);
|
||||
return path;
|
||||
}
|
||||
|
||||
/* Search each element of the pathlist for the icon file */
|
||||
while ((pathlist)&&(*pathlist))
|
||||
{
|
||||
dir_end = strchr(pathlist, ':');
|
||||
if (dir_end != NULL)
|
||||
{
|
||||
strncpy(path, pathlist, dir_end - pathlist);
|
||||
path[dir_end - pathlist] = 0;
|
||||
}
|
||||
else
|
||||
strcpy(path, pathlist);
|
||||
|
||||
strcat(path, "/");
|
||||
strcat(path, icon);
|
||||
if (access(path, type) == 0)
|
||||
return path;
|
||||
strcat(path, ".gz");
|
||||
if (access(path, type) == 0)
|
||||
return path;
|
||||
|
||||
/* Point to next element of the path */
|
||||
if(dir_end == NULL)
|
||||
pathlist = NULL;
|
||||
else
|
||||
pathlist = dir_end + 1;
|
||||
}
|
||||
/* Hmm, couldn't find the file. Return NULL */
|
||||
free(path);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
12
libs/fvwmlib.h
Normal file
12
libs/fvwmlib.h
Normal file
@ -0,0 +1,12 @@
|
||||
int mystrcasecmp(char *a, char *b);
|
||||
int mystrncasecmp(char *a, char *b,int n);
|
||||
char *CatString3(char *a, char *b, char *c);
|
||||
int mygethostname(char *client, int namelen);
|
||||
void SendText(int *fd,char *message,unsigned long window);
|
||||
void SendInfo(int *fd,char *message,unsigned long window);
|
||||
char *safemalloc(int);
|
||||
char *findIconFile(char *icon, char *pathlist, int type);
|
||||
int ReadFvwmPacket(int fd, unsigned long *header, unsigned long **body);
|
||||
void CopyString(char **dest, char *source);
|
||||
void sleep_a_little(int n);
|
||||
int GetFdWidth(void);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user