home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
x
/
volume15
/
olvwm-3.0
/
part13
< prev
next >
Wrap
Text File
|
1992-02-03
|
57KB
|
1,781 lines
Newsgroups: comp.sources.x
Path: uunet!usc!elroy.jpl.nasa.gov!ames!pasteur!nntp
From: scott.oaks@East.Sun.COM (Scott Oaks)
Subject: v15i159: OpenLook Virtual Window Mgr (3.0), Part13/21
Message-ID: <1992Feb4.135833.7767@pasteur.Berkeley.EDU>
Sender: dcmartin@msi.com (David C. Martin - Moderator)
Nntp-Posting-Host: postgres.berkeley.edu
Organization: University of California, at Berkeley
References: <csx-15i147-olvwm-3.0@uunet.UU.NET>
Date: Tue, 4 Feb 1992 13:58:33 GMT
Approved: dcmartin@msi.com
Submitted-by: scott.oaks@East.Sun.COM (Scott Oaks)
Posting-number: Volume 15, Issue 159
Archive-name: olvwm-3.0/part13
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
# "End of archive 13 (of 21)."
# Contents: ollocale.h olvwm.man wincolor.c
# Wrapped by dcmartin@fascet on Tue Jan 14 05:54:45 1992
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'ollocale.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'ollocale.h'\"
else
echo shar: Extracting \"'ollocale.h'\" \(1230 characters\)
sed "s/^X//" >'ollocale.h' <<'END_OF_FILE'
X/*
X * (c) Copyright 1989, 1990 Sun Microsystems, Inc. Sun design patents
X * pending in the U.S. and foreign countries. See LEGAL_NOTICE
X * file for terms of the license.
X */
X
X#ident "@(#)ollocale.h 1.6 91/09/14 SMI"
X
X#ifndef _OLLOCALE_H
X#define _OLLOCALE_H
X
X
X#ifdef OW_I18N_L3
X
X#include <locale.h>
X/*
X * OPEN LOOK Locale Categories. Basic Locale must be first item
X * (least number).
X */
X#define OLLC_LC_BASIC_LOCALE 0
X#define OLLC_LC_DISPLAY_LANG 1
X#define OLLC_LC_INPUT_LANG 2
X#define OLLC_LC_NUMERIC 3
X#define OLLC_LC_DATE_FORMAT 4
X#define OLLC_LC_MAX 5
X
X/*
X * OPEN LOOK Locale priority (small number has higher priority).
X * Could not use enum data type, since we will do the comparison among
X * this numbers.
X */
X#define OLLC_SRC_PROGRAM 0
X#define OLLC_SRC_COMMAND_LINE 1
X#define OLLC_SRC_RESOURCE 2
X#define OLLC_SRC_POSIX 3
X
Xtypedef struct _OLLCItem {
X char *locale;
X int priority;
X int posix_category; /* Will initialize in InitGRVLV() */
X} OLLCItem;
X
X/*
X * This struct sometimes access as array. Watch out!
X */
Xtypedef struct _OLLC {
X OLLCItem BasicLocale;
X OLLCItem DisplayLang;
X OLLCItem InputLang;
X OLLCItem Numeric;
X OLLCItem DateFormat;
X} OLLC;
X
X#endif /* OW_I18N_L3 */
X
X#endif /* _OLLOCALE_H */
END_OF_FILE
if test 1230 -ne `wc -c <'ollocale.h'`; then
echo shar: \"'ollocale.h'\" unpacked with wrong size!
fi
# end of 'ollocale.h'
fi
if test -f 'olvwm.man' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'olvwm.man'\"
else
echo shar: Extracting \"'olvwm.man'\" \(29718 characters\)
sed "s/^X//" >'olvwm.man' <<'END_OF_FILE'
X.\" @(#)olvwm.man 1.1 olvwm version 1/3/92
X.TH OLVWM 1 "15 November 1991"
X.SH NAME
Xolvwm \- OPEN LOOK virtual window manager for OpenWindows
X.SH SYNOPSIS
X.B olvwm
X[
X.I options
X]
X.\" ========================================================================
X.SH DESCRIPTION
X.LP
X.B olvwm
Xis a virtual window manager for the X Window System that implements
Xparts of the OPEN LOOK graphical user interface.
X.B olvwm
Xdiffers from
X.B olwm
Xin that olvwm manages a virtual desktop which is larger than the actual
Xscreen. However,
X.B olvwm
Xis equivalent in all other respects to, and supports all the features of
X.B olwm.
XThis manual page discusses only the changes between
X.B olvwm
Xand
X.B olwm,
Xmost
Xof which deal specifically with the virtual desktop. For details on
Xhow
X.B olwm
Xoperates, including its host of options, see
X.B olwm(1).
X.\" ========================================================================
X.SH OPTIONS
X.LP
XThere are no new options to
X.B olvwm.
X.\" ========================================================================
X.SH TERMINOLOGY
XThroughout this manual, the following terms are used:
X.IP \fBScreen\fP:
XThis refers to a specific monitor; essentially, there is
Xone screen for every monitor run by your workstation. Each monitor has a
Xview into a particular desktop. In X terminology, this is the screen
Xcomponent of a particular display.
X.IP \fBDesktop\fP:
XThis refers to the entire area in which windows can reside on a given screen.
XIn non-virtual window managers, a desktop and a screen are the same size.
XIn a virtual window manager, though, a desktop is larger than the screen.
X.IP \fBVDM\fP
Xor \fBVirtual Desktop Manager\fP is the window which represents visually the
Xentire desktop: it provides a scaled-down version of the entire desktop.
X.IP \fBLogical\ Screen\fP:
XIf the desktop is running in default mode, it will display a grid, each
Xsquare of which maps to the size of the monitor. Each square is termed
Xa logical screen.
X.IP \fBCurrent\ View\fP:
Xis that part of the desktop which is currently displayed on the screen;
Xthis will usually (but need not always) correspond to a logical screen.
X.IP \fBVirtual\ Window\fP:
Xis a small rectangle displayed in the VDM; every window on the desktop has
Xa corresponding Virtual Window in the VDM.
X.\" ========================================================================
X.SH VIRTUAL DESKTOP MANAGER
X.LP
XWhen it is started,
X.B olvwm
Xdisplays a virtual desktop manager window.
XThe VDM is a reduced display of all windows active on the desktop at any
Xtime. The current view is outlined in the virtual desktop manager.
XThe VDM always appears on the monitor.
X.LP
XBy default, the VDM (and hence the desktop) is divided into a grid; each
Xsquare of the grid represents a screen size. The dividing lines between
Xeach logical screen are represented by dashed lines in the VDM. This
Xdivision into logical screens is purely informational: if you like,
Xwindows can straddle these boundaries, the current view into the desktop
Xcan straddle
Xthese boundaries, and window can be moved at will between these boundaries.
XHowever, by default, most actions in the VDM will keep the current view
Xalong these boundary lines.
X.\" ========================================================================
X.SH EVENTS IN THE VDM
X.LP
XThe processing of events within the VDM depends on whether the mouse is
Xpointing to the background area of the VDM or to a particular virtual window
Xwithin the VDM.
X.SH EVENTS ON VIRTUAL WINDOWS
X.LP
XEvents which occur in a particular virtual window behave just as if they
Xwere delivered to the corresponding application's frame. Thus, pressing
Xthe MENU button over a virtual window will bring up the frame menu and
Xallow the real (and virtual) windows to be opened, closed, resized, etc.
XPressing
Xthe SELECT button will select that real (and virtual) window; pressing the
XADJUST button will add (or subtract) that window from the selection list.
XPressing the FRONT or OPEN keys will raise/lower or open/close the real
X(and virtual) window.
X.LP
XSELECTing and dragging one or more virtual windows will move the real and
Xvirtual windows (just as in
X.B olwm
X). Note that if you drag the mouse outside of the VDM, the window can be
Xmoved onto to the screen. Conversely, when dragging
Xa window on the screen, if the mouse moves into the VDM, the window will then
Xbe moved to the location on the displayed within the VDM.
XHowever, if part of the VDM is
Xobscured, you cannot move a window into that part of the VDM.
X.LP
XNote that events are delivered ONLY to the real application's frame. Thus,
Xtyping characters or the COPY/CUT/PASTE keys has no effect.
X.LP
XIt is possible to drop something onto a virtual window as if it were dropped
Xonto the corresponding application; this allows you to, for example, drag
Xa file from the mailtool on the screen to a file manager on another part of the
Xdesktop.
X.SH EVENTS ON THE VDM BACKGROUND
X.LP
XEvents on the VDM background all work to change the current view, bringing
Xwindows which were formerly outside of the viewing area onto the screen (and
Xmoving windows which were on the screen outside of the viewing area).
XKeyboard events are described given the default Sun-4 keyboard mappings,
Xbut you can use xmodmap to set up your particular keyboard.
X.IP \fBKeyboard\ Events:\fP
XThe arrow keys (and other keys) can be used to shift the logical screen in
Xthe direction specified. See the section on ADDITIONAL KEY BINDINGS
Xbelow. Keyboard events are also active if they occur on the root window
Xin addition to the VDM background.
X.IP \fBSELECT\fP
Xmouse events:
XSELECTing on the VDM background allows you to drag the current view within
Xthe VDM. If the VirtualGrid resource is set to Visible or Invisible, movement
Xof the visible region will be constrained to logical screen boundaries
Xunless the CTRL button is pressed before and held while dragging the mouse.
XIf the VirtualGrid resource is set to None, movement of the visible region
Xwill be unconstrained unless the CTRL button is pressed before and held while
Xdragging the mouse.
X.IP \fBDOUBLE\ CLICK\fP
XSELECT events:
XDouble clicking the SELECT button on an area in the VDM background will move
Xthe current view
Xto the logical screen containing the point where the mouse was double-clicked.
X.IP \fBMENU\fP
Xmouse events:
XThe MENU button brings up a (pinnable) menu which will allow movement based
Xon full screen sizes in the direction indicated.
X.\" ========================================================================
X.SH RESIZING THE VIRTUAL DESKTOP
X.LP
XYou can use the resize corners on the VDM to resize
Xthe virtual desktop at will. If you make the virtual desktop smaller,
Xwindows which might be off the new virtual desktop will NOT be moved
X(though they will not be lost, either, and you can get them back by
Xresizing the desktop again). Space added or subtracted is always done so
Xfrom the right and bottom of the desktop (regardless of
Xwhich resize corner you used).
X.\" ========================================================================
X.SH STICKY WINDOWS
X.LP
XYou'll notice that the virtual desktop manager never moves on your
Xscreen if you change views into the desktop. That's because the VDM is
Xpermanently "sticky."
X.LP
XWindows which are "sticky" never move position on the screen when you
Xchange your view into the desktop. To set a particular window as
Xsticky, simply select "Stick" in its frame menu. You may similarly
Xunstick the window via its menu.
X.LP
X[Note: Only
Xbase frames--those which can be iconified, as opposed to those which have
Xa pushpin--are eligible to become sticky; other frames inherit the stickyness
Xof their base frames. Thus, for most applications, either
Xall windows are sticky or none of them are. The exception to this is
Xapplications which create two or more base frames; all base frames will
Xbe originally created as "unsticky" (but see the VirtualSticky resource below).]
X.\" ========================================================================
X.SH CHANGES TO THE WINDOW MENU
X.LP
XThe window menu of all windows has all the tools defined in
X.B olwm.
XIn addition, the menu of base windows has the following command
X.TP
X.B Stick/Unstick
XAffect the stickyness of the particular window. Windows which are sticky
Xwill always appear in the same place on the screen no matter which part
Xof the virtual desktop you're looking at. Windows which are not sticky
X(by default, all windows except the VDM) will move when you change the
Xview on the virtual desktop.
X.\" ========================================================================
X.SH CHANGES TO ROOT MENU
X.LP
XThe following additional keywords can be used in the command field of a
Xroot menu menu item:
X.IP COLUMNS
XThis specifies the number of columns you'd like the menu to have. Each column
Xwithin a menu will be filled in order of the items in the menu. The menu
Xname must appear before this keyword, but the keyword itself must appear
Xbefore the end of the menu.
X.IP STICK_UNSTICK_SELN
XThis specifies that the sticky state of the selected windows should
Xbe toggled.
X.IP WINMENU
Xbrings up a pull-right menu containing the name of every window on the
Xvirtual desktop. Windows which are iconified are preceded with a graphic
Xsymbol. Selecting one of these windows causes the view into the desktop
Xto shift so that the selected window is visible; the selected window will
Xbe opened if iconic and raised to the top of the stacking order. This
Xbehavior can be altered; see the
X.I olvwmrc(5)
Xfor more details. You may specify that the number of columns in the pull-right
Xmenu by using a number after the WINMENU keyword.
X.IP DIRMENU
Xbrings up a pull-right menu containing the name of every file given in the
Xnamed directory. This allow syou to use a local programs directory for a
Xtool repository; whenever tools are added to the directory, users will see
Xthe new choices.
X.IP X11\ Bitmaps
Xcan be specified in the menu by specifying a filename enclosed in <> brackets.
XThe filename specified must be in X11 bitmap form. You can mix bitmap and
Xstring entries within a menu, though perhaps menus look better if you do not.
X.LP
XHere is a version of the example
X.I olwm
Xroot menu specification: the programs menu will have 2 columns; there will
Xbe a way to find particular windows off the "Find" submenu (and that menu will
Xhave 3 columns); whatever local tools are available can be found in /usr/local;
Xand the cmdtool option will be displayed as an icon:
X.nf
X
X
X"My Custom Menu" TITLE
X.sp
XPrograms MENU
XPrograms COLUMNS 2
X <usr/openwin/include/X11/bitmaps/terminal> DEFAULT cmdtool
X "Text Editor" textedit
X Mail mailtool
X "File Manager" filemgr
X Other MENU
X "Other Tools" TITLE
X "Shell Tool" shelltool
X "Icon Editor" iconedit
X Clock clock
X "Perf Meter" DEFAULT perfmeter
X Other END
X "Local Tools" DIRMENU /usr/local
XPrograms END PIN
X.sp
X"Repaint Screen" REFRESH
X.sp
X"Properties ..." PROPERTIES
X.sp
X"Find" WINMENU 3
X.sp
XExit EXIT
X.fi
X.\" ========================================================================
X.SH RESOURCES TO CONTROL THE VIRTUAL DESKTOP
XSee the man page for
X.B olwm
Xfor a complete description of resources. All resources of class OpenWindows
Xand olwm described there are supported by
X.B olvwm.
XIn addition, for
X.B olvwm
Xonly, resources of instance "olvwm" are also read.
XYou can thus name the following resources as olvwm.<resource>, olwm.<resource>,
Xor as OpenWindows.<resource> depending on your naming preference.
X.LP
XResources marked with an * may be specified on a screen-by-screen basis;
Xe.g. olvwm.screen0.resource and olvwm.screen1.resource, following the pattern
Xin
X.B olwm.
X.TP
X.BI VirtualDesktop " (string)" *
XSpecifies the size of the virtual desktop. You can specify this in
Xterms of screen sizes, so that a virtual desktop of 3 screens across
Xand 2 screens high would appear as the string 3x2. You may also
Xspecify this in terms of absolute pixel sizes, e.g. 3800x1800 as
Xlong as the pixel size is greater than the size of your framebuffer.
X.I
XDefault value: 3x2
X.P
X.TP
X.BI PannerScale " (int)" *
XSets the scale in which the virtual desktop manager will be drawn.
X.I
XDefault value: 15.
X.P
X.TP
X.BI VirtualGeometry " (string)" *
XSpecifies the geometry string of the desktop manager in standard X11
Xformat (wxh+x+y). The width and height, if specified, are ignored,
Xbut the x and y can be used to specify the initial location of the
Xdesktop manager.
X.I
XDefault value: +0+0
X.TP
X.BI VirtualIconGeometry " (string)" *
XSpeficied the geometry string of the desktop manager icon in standard X11
Xformat (wxh+x+y). The width and height are ignored, but the x and y can
Xbe used to specify the initial location of the desktop manager icon.
X.I
XDefault value: +0+0
X.P
X.TP
X.BI VirtualIconic " (Boolean)"
XIf true, the virtual desk manager will come up iconic.
X.I
XDefault value: False
X.P
X.TP
X.BI AllowMoveIntoDesktop " (Boolean)"
XIf true, allows windows to be moved from the screen into the VDM
Xand vice versa. Otherwise, moving a window on the screen will
Xonly allow it to be placed in the visible screen; and moving a
Xwindow in the desktop manager will not let it be dragged onto the screen.
X.I
XDefault value: True
X.P
X.TP
X.BI ArrowInRoot " (Boolean)"
XIf true, then key events in the root window will affect the VDM and
Xthus move the view into the desktop (if the appropriate key is pressed).
XOtherwise, only key events when the VDM has the input event focus will
Xhave an effect.
X.I
XDefault value: True
X.P
X.TP
X.BI VirtualFont " (string)" *
XThe font name used to display title of windows within the virtual desktop
Xmanager.
X.I
XDefault value: 5x8
X.P
X.TP
X.BI VirtualFontColor " (color specification)" *
XThe color of the title within the virtual windows of the virtual desktop
Xmanager.
X.I
XDefault value: Black
X.P
X.TP
X.BI VirtualBackgroundColor " (color specification)" *
XThe color of the background of the virtual desktop manager.
X.I
XDefault value: Based on the frame color of your desktop.
X.P
X.TP
X.BI VirtualForegroundColor " (color specification)" *
XThe color of the virtual windows in the virtual desktop manager.
X.I
XDefault value: The frame color of your desktop.
X.P
X.TP
X.BI VirtualBackgroundMap " (Pixmap filename)" *
XThe name of a file containing a pixmap to use as the background of the
Xvirtual desktop manager. This will be drawn with the VirtualBackgroundColor
Xas its background color and the VirtualPixmapColor as its foreground color.
X.I
XDefault value: unused
X.P
X.TP
X.BI VirtualPixmapColor " (color specification)" *
XSee above.
X.I
XDefault value: white
X.P
X.TP
X.BI VirtualSticky " (list of strings)"
XThe list of windows which should be sticky by default. Like the olwm
XMinimalDecor, this should be the list windows which should be sticky when
Xthey are created. The matching of these strings is done by the first word
Xof the window's WM_NAME (string in it's title bar), or by its WM_CLASS
Xclass/instance variables.
X.I
XDefault value: Null
X.P
X.TP
X.BI RelativePosition " (Boolean)"
XIf true, then user-specified window co-ordinates are assumed to be relative
Xto the current view into the desktop; otherwise they are absolute with
Xrespect to the desktop. Setting to true will not allow you to bring up
Xwindows outside your current view (unless you specify very large or negative
Xnumbers), and setting to false will break some
Xprograms which save window states in an odd manner. You can defeat this
Xvariable on startup of applications by specifying which screen they should
Xstart on; see
X.I olvwmrc(5).
X.I
XDefault value: True
X.P
X.TP
X.BI VirtualGrid " (Visible, Invisible, or None)" *
XThis controls two aspects of the VDM: If it's visible or invisible, the
Xgrid is on (but it's only drawn if it's visible). If it's None, the grid
Xis off. If the grid is on, the VDM may only be resized in logical screen-sized
Xincrements. Otherwise, it may resized to arbitrary sizes. If the grid
Xis on, SELECT/dragging the mouse within the VDM will constrain the move to
Xlogical screens (unless the CTRL button is held down); if the grid is off,
Xmoving the visible screen region with SELECT/drag will be unconstrained
X(unless the CTRL button is held down).
X.I
XDefault value: Visible
X.TP
X.BI VirtualGridColor " (color specification)"
XIf the VirtualGrid is Visible, it will be drawn in this color.
X.I
XDefault value: Same as VirtualFontColor
X.P
X.TP
X.BI VirtualRaiseVDM " (Boolean)"
XIf this is true, the VDM will always appear on top of the stacking order,
Xnever to be obscured by other windows.
X.I
XDefault value: False
X.P
X.TP
X.BI VirtualMoveGroups " (Boolean)"
XIf true, then whenever a window is moved to a different logical screen,
Xthen all followers of that window will also be moved a similar
Xamount: this affects the window's icon and popups. In this way, icons
Xand popups will always appear on the same logical screen as their
Xcorresponding base frame. Otherwise, only the
Xselected windows will move when you move them, and related windows could
Xpossibly appear on different logical screens in the desktop. The trigger
Xfor changing between logical screens is the window's upper-left-hand corner;
Xsee VirtualGroupThreshold below.
X.I
XDefault value: True
X.P
X.TP
X.BI VirtualGroupThreshold " (Integer)"
XIf VirtualMoveGroups, this is the amount by which the upper-left-hand
Xcorner of a window must be moved off the monitor for
X.I olvwm
Xto consider the window to have switched logical screens. Setting this to
Xa positive value allows the left edge of windows to appear off the
Xmonitor without moving the window's popups.
X.I
XDefault value: 0
X.P
X.TP
X.BI UseImages " (UseNone, UseVDM, or UseAll)"
XIf set to UseNone, then window frame menus and the VDM motion menu
Xwill be text-based.
XIf set to UseVDM, the window frame menus will be text-based, but the VDM
Xmotion menu will be a graphic menu. If set to UseAll, the window frame
Xmenus will be text- and image-based, and the VDM motion menu will be
Ximage-based.
X.I
XDefault value: UseVDM
X.P
X.\" ========================================================================
X.SH ADDITIONAL MISCELLANEOUS RESOURCES
X.LP
XThese resources are not related specifically to the VDM, but are included
Xas new features within
X.B olvwm.
X.TP
X.BI InputFocusColor " (color specification)" *
XSpecifying this attribute means that the frame of the window which currently
Xhas the input focus should be drawn in the color specified instead of in
Xthe normal frame color. The appearance of the title bar (with lines or
Xindentation, depending on your input focus mode) will remain unchanged.
X.I
XDefault value: None (Use standard frame color)
X.P
X.TP
X.BI RaiseOnMove " (Boolean)"
XIf this is True, then whenever a window is moved, it is also raised to the
Xtop of the stacking order.
X.I
XDefault value: False
X.TP
X.BI AutoShowRootMenu " (Boolean)"
XIf true, the root menu will come up pinned at start up.
X.I
XDefault value: False
X.P
X.TP
X.BI AutoRootMenuX " (int)"
XIf AutoShowRootMenu is true, this is the X location where the menu will
Xcome up.
X.I
XDefault value: 0
X.P
X.TP
X.BI AutoRootMenuY " (int)"
XIf AutoShowRootMenu is true, this is the Y location where the menu will
Xcome up.
X.I
XDefault value: 0
X.P
X.TP
X.BI FullSizeZoomX " (Boolean)"
XIf this is set to True, then selecting Full Size from the window menu
Xwill zoom the window horizontally as well as vertically.
X.I
XDefault value: False
X.P
X.TP
X.BI NoDecor " (list of strings)"
XLike Minimal Decor, this attribute takes a list of windows on which to
Xoperate; these windows should not be decorated at all. There is a slight
Xdifference between this attribute and setting the override_redirect flag
Xon a window: the latter causes
X.I olvwm
Xto ignore completely the window, while this attribute does not adorn the
Xwindow or give it a menu, but still allows it to be manipulated via the
XWINMENU and Hot Key actions.
X.P
X.TP
X.BI ResizeMoveGeometry " (X geometry string or the word center)"
XThis resource only has an effect if ShowMoveGeometry and/or ShowResizeGeometry
Xis set to True. This string specifies the location of the geometry box
Xwhen it is displayed; it should be given as an X geometry string (wxh+x+y)
Xalthough the width and height are ignored if specified. If you want the
Xbox to be centered regardless of your monitor resolution, use the string
Xcenter instead of a geometry string.
X.I
XDefault value: +0+0
X.P
X.\" ========================================================================
X.SH ADDITIONAL KEY BINDINGS
X.LP
XLike
X.I olwm, olvwm
Xuses key bindings for certain actions: all actions specified in
X.I olwm
Xas well as an additional set of actions to control the view into the desktop.
XIn the following list, the key mentioned in parentheses is the default binding
Xfor the given action; items marked with a plus sign '+' are items which
Xexist in
X.I olwm;
Xthey are included here to describe what action they have when they occur
Xon the root window or within the VDM. All other bindings are specific to
X.I olvwm;
Xthose items marked with an asterisk '*' involve keyboard grabs. Bindings
Xwhich involve a keyboard grab (those with an asterisk) are always active,
Xno matter where the input focus is;
Xotherwise the action occurs only if the root window or the VDM has
Xthe input focus.
X.LP
XIt's possible to change each of these bindings, see the
X.B olwm
Xman page for more details.
X.TP
XUp \fI(up-arrow)\fP +
XMove the view up one screen.
X.TP
XJumpUp \fI(up-arrow+Ctrl)\fP +
XMove the view up ten screens.
X.TP
XHalfUp \fI(up-arrow+Shift)\fP
XMove the view up one-half screen.
X.TP
XVirtualUp \fI(up-arrow+Meta)\fP *
XMove the view up one screen.
X.TP
XVirtualJumpUp \fI(up-arrow+Ctrl+Meta)\fP *
XMove the view up ten screens.
X.TP
XVirtualHalfUp \fI(up-arrow+Shift+Meta)\fP *
XMove the view up one-half screen.
X
X.TP
XDown \fI(down-arrow)\fP +
XMove the view down one screen.
X.TP
XJumpDown \fI(down-arrow+Ctrl)\fP +
XMove the view down ten screens.
X.TP
XHalfDown \fI(down-arrow+Shift)\fP
XMove the view down one-half screen.
X.TP
XVirtualDown \fI(down-arrow+Meta)\fP *
XMove the view down one screen.
X.TP
XVirtualJumpDown \fI(down-arrow+Ctrl+Meta)\fP *
XMove the view down ten screens.
X.TP
XVirtualHalfDown \fI(down-arrow+Shift+Meta)\fP *
XMove the view down one-half screen.
X
X.TP
XLeft \fI(left-arrow)\fP +
XMove the view left one screen.
X.TP
XJumpLeft \fI(left-arrow+Ctrl)\fP +
XMove the view left ten screens.
X.TP
XHalfLeft \fI(left-arrow+Shift)\fP
XMove the view left one-half screen.
X.TP
XVirtualLeft \fI(left-arrow+Meta)\fP *
XMove the view left one screen.
X.TP
XVirtualJumpLeft \fI(left-arrow+Ctrl+Meta)\fP *
XMove the view left ten screens.
X.TP
XVirtualHalfLeft \fI(left-arrow+Shift+Meta)\fP *
XMove the view left one-half screen.
X
X.TP
XRight \fI(right-arrow)\fP +
XMove the view right one screen.
X.TP
XJumpRight \fI(right-arrow+ctrl)\fP +
XMove the view right ten screens.
X.TP
XHalfRight \fI(right-arrow+Shift)\fP
XMove the view right one-half screen.
X.TP
XVirtualRight \fI(right-arrow+Meta)\fP *
XMove the view right one screen.
X.TP
XVirtualJumpRight \fI(right-arrow+ctrl+Meta)\fP *
XMove the view right ten screens.
X.TP
XVirtualHalfRight \fI(right-arrow+Shift+Meta)\fP *
XMove the view right one-half screen.
X
X.TP
XGoHome \fI(R11)\fP
XMove the view to the upper left corner.
X.TP
XVirtualHome \fI(R11+Meta)\fP *
XMove the view to the upper left corner.
X
X.TP
XRowStart \fI(Home, R7)\fP +
XMove the view NorthWest one screen.
X.TP
XJumpUpLeft \fI(R7+Ctrl)\fP +
XMove the view NorthWest ten screens.
X.TP
XHalfUpLeft \fI(R7+Shift)\fP
XMove the view NorthWest one-half screen.
X.TP
XVirtualUpLeft \fI(R7+Meta)\fP *
XMove the view NorthWest one screen.
X.TP
XVirtualJumpUpLeft \fI(R7+Ctrl+Meta)\fP *
XMove the view NorthWest ten screens.
X.TP
XVirtualHalfUpLeft \fI(R7+Shift+Meta)\fP *
XMove the view NorthWest one-half screen.
X
X.TP
XRowEnd \fI(End, R13)\fP +
XMove the view SouthWest one screen.
X.TP
XJumpDownLeft \fI(R13+Ctrl)\fP +
XMove the view SouthWest ten screens.
X.TP
XHalfDownLeft \fI(R13+Shift)\fP
XMove the view SouthWest one-half screen.
X.TP
XVirtualDownLeft \fI(R13+Meta)\fP *
XMove the view SouthWest one screen.
X.TP
XVirtualJumpDownLeft \fI(R13+Ctrl+Meta)\fP *
XMove the view SouthWest ten screens.
X.TP
XVirtualHalfDownLeft \fI(R13+Shift+Meta)\fP *
XMove the view SouthWest one-half screen.
X
X.TP
XUpRight \fI(R9)\fP
XMove the view NorthEast one screen.
X.TP
XJumpUpRight \fI(R9+Ctrl)\fP +
XMove the view NorthEast ten screens.
X.TP
XHalfUpRight \fI(R9+Shift)\fP
XMove the view NorthEast one-half screen.
X.TP
XVirtualUpRight \fI(R9+Meta)\fP *
XMove the view NorthEast one screen.
X.TP
XVirtualJumpUpRight \fI(R9+Ctrl+Meta)\fP *
XMove the view NorthEast ten screens.
X.TP
XVirtualHalfUpRight \fI(R9+Shift+Meta)\fP *
XMove the view NorthEast one-half screen.
X
X.TP
XDownRight \fI(R15, PgDn)\fP
XMove the view SouthEast one screen.
X.TP
XJumpDownRight \fI(R15+Ctrl)\fP +
XMove the view SouthEast ten screens.
X.TP
XHalfDownRight \fI(R15+Shift)\fP
XMove the view SouthEast one-half screen.
X.TP
XVirtualDownRight \fI(R15+Meta)\fP *
XMove the view SouthEast one screen.
X.TP
XVirtualJumpDownRight \fI(R15+Ctrl+Meta)\fP *
XMove the view SouthEast ten screens.
X.TP
XVirtualHalfDownRight \fI(R15+Shift+Meta)\fP *
XMove the view SouthEast one-half screen.
X
X.TP
XScreen1 \fI(F1)\fP
XMove to the first logical screen in the desktop.
X.TP
XVirtualScreen1 \fI(F1+Meta)\fP *
XMove to the first logical screen in the desktop.
X.TP
XScreen2 \fI(F2)\fP
XMove to the second logical screen in the desktop.
X.TP
XVirtualScreen2 \fI(F2+Meta)\fP *
XMove to the second logical screen in the desktop.
X.TP
XScreen3 \fI(F3)\fP
XMove to the third logical screen in the desktop.
X.TP
XVirtualScreen3 \fI(F3+Meta)\fP *
XMove to the third logical screen in the desktop.
X.TP
XScreen4 \fI(F4)\fP
XMove to the fourth logical screen in the desktop.
X.TP
XVirtualScreen4 \fI(F4+Meta)\fP *
XMove to the fourth logical screen in the desktop.
X.TP
XScreen5 \fI(F5)\fP
XMove to the fifth logical screen in the desktop.
X.TP
XVirtualScreen5 \fI(F5+Meta)\fP *
XMove to the fifth logical screen in the desktop.
X.TP
XScreen6 \fI(F6)\fP
XMove to the sixth logical screen in the desktop.
X.TP
XVirtualScreen6 \fI(F6+Meta)\fP *
XMove to the sixth logical screen in the desktop.
X.TP
XScreen7 \fI(F7)\fP
XMove to the seventh logical screen in the desktop.
X.TP
XVirtualScreen7 \fI(F7+Meta)\fP *
XMove to the seventh logical screen in the desktop.
X.TP
XScreen8 \fI(F8)\fP
XMove to the eighth logical screen in the desktop.
X.TP
XVirtualScreen8 \fI(F8+Meta)\fP *
XMove to the eighth logical screen in the desktop.
X.TP
XScreen9 \fI(F9)\fP
XMove to the ninth logical screen in the desktop.
X.TP
XVirtualScreen9 \fI(F9+Meta)\fP *
XMove to the ninth logical screen in the desktop.
X.TP
XScreen10 \fI(F10)\fP
XMove to the tenth logical screen in the desktop.
X.TP
XVirtualScreen10 \fI(F10+Meta)\fP *
XMove to the tenth logical screen in the desktop.
X.\" ========================================================================
X.SH ADVANCED USAGE
X.I olvwm
Xwill read a resource file ($HOME/.olvwmrc) for special customizations.
XThese customizations allow the following:
X.IP HOT\ KEYS
XYou can specify that when a certain key (or, more likely, key in combination
Xwith modifiers) is pressed that certain actions are performed: you can
Xwarp to a particular application, open, raise, or close applications, execute
Xapplications, and quit applications.
X.IP SCREEN\ BINDINGS
XYou can specify that certain applications will always start on a particular
Xlogical screen.
X.IP MENU\ OPTIONS
XYou can alter the behaviour of WINMENU selections on a particular window.
X.LP
XPlease see
X.I olvwmrc(5)
Xfor details of these options.
X.\" ========================================================================
X.SH COPYRIGHTS
X.LP
XThe X Window system is a trademark of the Massachusetts Institute of
XTechnology.
X.br
XOPEN LOOK is a trademark of AT&T.
X.br
XOpenWindows is a trademark of Sun Microsystems, Inc.
X.br
XPortions (c) Copyright 1989-1991 Sun Microsystems, Inc. Sun design patents
Xpending in the U.S. and foreign countries. OPEN LOOK is a
Xtrademark of AT&T. Used by written permission of the owners.
X.br
XPortions (c) Copyright Bigelow & Holmes 1986, 1985. Lucida is a registered
Xtrademark of Bigelow & Holmes. Permission to use the Lucida
Xtrademark is hereby granted only in association with the images
Xand fonts described in this file.
X.br
XPortions may be (c) 1990 Solbourne Computers.
X.br
XPortions not covered under the above copyrights are (c) 1991 Scott Oaks.
X.br
XPlease see the LEGAL_NOTICES file for full disclosure of copyright
Xinformation.
X.\" =======================================================================
X.SH CREDITS
X.LP
XMost of the code in this application comes from release 3.0 of olwm,
Xauthored at Sun Microsystems and distributed in the contrib section
Xof MIT's X11R5. [Note that nothing in xview3 or release 3.0 requires
XR5; they will happily run on R4 and exist in R5 simply because that's
Xwhen they were released.]
X.br
XThe virtual desktop section was authored by Scott Oaks,
Xwho is responsible for its maintenance. Please direct any comments to
Xscott.oaks@sun.com. This code is not supported by Sun Microsystems in
Xany way.
X.br
XNotwithstanding the above, the staff at Sun Microsystems, and especially
XStuart Marks, deserve credit as original author of olwm for most of the
Xwork contained in this application.
X.br
XAddition fixes and enhancements have been provided by Rich Berlin,
XDavid Chase and David Plotkin at Sun, Ken West at Protocol Systems,
XRussel Kegley at General Dynamics, Chuck Musciano at Harris Systems,
XAlexander Dupuy at Columbia, David Boyd at Sterling Software and Duane
XGibson at Unify.
XIn addition, several people from the net are not mentioned here but
Xcontributed duplicate fixes.
END_OF_FILE
if test 29718 -ne `wc -c <'olvwm.man'`; then
echo shar: \"'olvwm.man'\" unpacked with wrong size!
fi
# end of 'olvwm.man'
fi
if test -f 'wincolor.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'wincolor.c'\"
else
echo shar: Extracting \"'wincolor.c'\" \(21460 characters\)
sed "s/^X//" >'wincolor.c' <<'END_OF_FILE'
X/*
X * (c) Copyright 1989, 1990 Sun Microsystems, Inc. Sun design patents
X * pending in the U.S. and foreign countries. See LEGAL_NOTICE
X * file for terms of the license.
X */
X
X#ident "@(#)wincolor.c 26.19 91/10/04 SMI"
X
X#include <errno.h>
X#include <stdio.h>
X#include <X11/Xos.h>
X#include <X11/Xlib.h>
X#include <X11/Xutil.h>
X#include <X11/Xatom.h>
X#include <olgx/olgx.h>
X
X#include "i18n.h"
X#include "ollocale.h"
X#include "mem.h"
X#include "olwm.h"
X#include "win.h"
X#include "globals.h"
X
X/***************************************************************************
X* global data
X***************************************************************************/
X
Xextern Atom AtomColorMapWindows;
X
X/*
X * ColorFocusLocked indicates the color focus mode. If it is false, we are in
X * "color-follows-mouse" mode. In this mode, colormaps are installed based on
X * the location of the mouse. The WM_COLORMAP_WINDOWS property determines the
X * list of windows that are eligible to have their colormaps installed, but
X * changes to this property do not necessarily cause colormap installation.
X * If ColorFocusLocked is true, we are in "color-locked" mode. In this mode,
X * a particular colormap is locked into the hardware, and colormaps do not
X * track the pointer location. If a particular client has the focus, this
X * client will be named by ColorFocusClient, and changes to its
X * WM_COLORMAP_WINDOWS property will cause colormap changes. If no client has
X * the focus (e.g. the colormap window is the root) then only user action can
X * cause the colormap to change. In this case the colorFocusClient will be
X * NULL.
X */
X
X/*
X * colorFocusWindow indicates the window that currently has the color focus.
X * This is updated regardless of the color focus mode.
X */
X
Xextern void WinAddColorClient();
Xextern void WinRemoveColorClient();
Xextern Bool PropGetWMColormapWindows();
X
Xvoid InstallDefaultColormap();
Xvoid ColormapChange();
X
X/***************************************************************************
X* private data
X***************************************************************************/
X
Xstatic ClassColormap classColormap;
X
X/***************************************************************************
X* private functions
X***************************************************************************/
X
X/*
X * eventDestroy - handle destroy events on the colormap window
X */
Xstatic int
XeventDestroy(dpy, event, winInfo)
XDisplay *dpy;
XXEvent *event;
XWinColormap *winInfo;
X{
X Client *cli;
X List *cli_list = winInfo->core.colormapClients;
X List **win_list;
X WinGeneric *newfocuswin;
X
X /*
X * For every client in this window's client list, search that client's
X * window list and remove this window from it.
X */
X for (cli = ListEnum(&cli_list); cli != NULL; cli = ListEnum(&cli_list)) {
X win_list = &(cli->colormapWins);
X while (*win_list != NULL) {
X if ((*win_list)->value == winInfo) {
X ListDestroyCell(win_list);
X break;
X }
X win_list = &((*win_list)->next);
X }
X if (ColorFocusLocked(winInfo) &&
X ColorFocusWindow(winInfo) == winInfo &&
X ColorFocusClient(winInfo) == cli) {
X if (cli->colormapWins)
X newfocuswin = cli->colormapWins->value;
X else
X newfocuswin = (WinGeneric *) PANEOFCLIENT(cli);
X InstallColormap(dpy, newfocuswin);
X }
X }
X
X ListDestroy(winInfo->core.colormapClients);
X winInfo->core.colormapClients = NULL_LIST;
X (WinFunc(winInfo,core.destroyfunc))(dpy, winInfo);
X}
X
X
X/*
X * eventEnterLeaveNotify - handle enter/leave notify events on the colormap window
X */
Xstatic int
XeventEnterLeaveNotify(dpy, event, winInfo)
XDisplay *dpy;
XXEvent *event;
XWinColormap *winInfo;
X{
X if (event->xany.type == EnterNotify)
X ColorWindowCrossing(dpy, event, winInfo);
X}
X
X
X/*
X * eventUnmapNotify - handle the unmapping of a colormap window
X */
Xstatic int
XeventUnmapNotify(dpy, event, winInfo)
XDisplay *dpy;
XXEvent *event;
XWinColormap *winInfo;
X{
X /*
X * If this is the window with the color focus, and the color focus is not
X * locked, then we must install the colormap of the window that is now
X * under the pointer. REMIND: there's a race condition here, because
X * calling InstallPointerColormap with an arg of None ends up calling
X * QueryPointer to find the pointer's location.
X */
X if (ColorFocusWindow(winInfo) == (WinGeneric *)winInfo &&
X !ColorFocusLocked(winInfo) ) {
X InstallPointerColormap(dpy, None, 0, 0, False);
X }
X}
X
X
X/*
X * eventColormapNotify
X *
X * Handle changes to this window's colormap attribute. If this window had the
X * colormap focus, install the new colormap.
X */
Xstatic int
XeventColormapNotify(dpy, event, winInfo)
X Display *dpy;
X XEvent *event;
X WinColormap *winInfo;
X{
X ColormapChange(dpy, event, (WinGeneric *)winInfo);
X}
X
X
X/*
X * destroyColormap -- destroy the colormap window resources and
X * free any allocated data.
X */
Xstatic int
XdestroyColormap(dpy, winInfo)
XDisplay *dpy;
XWinGeneric *winInfo;
X{
X#ifdef DEBUG
X if (winInfo->core.colormapClients != NULL_LIST)
X puts("warning: destroying cmap window with non-null client list");
X#endif /* DEBUG */
X
X /* free our data and throw away window */
X /* REMIND this test is here to avoid problems with changing
X * a colourmap window into a pane
X */
X if (WIGetInfo(winInfo->core.self) == winInfo)
X WIUninstallInfo(winInfo->core.self);
X MemFree(winInfo);
X}
X
X
X/***************************************************************************
X* global functions
X***************************************************************************/
X
X
X/*
X * Colormap Installation Inhibition.
X *
X * When colormap installation is inhibited, information about colormap
X * installation is stored in the ColormapInhibitRecord structure. If multiple
X * installations are requested while installation is inhibited, information
X * only from the last request is stored. When installation is uninhibited,
X * this information is used to install the colormap for real. Inhibiting
X * colormap installation prevents unnecessary colormap installation, thereby
X * reducing flashing.
X */
X
Xstatic struct ColormapInhibitRecord {
X Bool inhibited;
X WinGeneric *winInfo;
X} cir;
X
X
X/*
X * ColormapInhibit -- inhibit or uninhibit colormap installation.
X */
Xvoid
XColormapInhibit(inhibit)
X Bool inhibit;
X{
X if (inhibit) {
X cir.inhibited = True;
X cir.winInfo = NULL;
X } else {
X cir.inhibited = False;
X if (cir.winInfo != NULL) {
X InstallColormap(cir.winInfo->core.client->dpy, cir.winInfo);
X }
X cir.winInfo = NULL;
X }
X}
X
X
X/*
X * InstallColormap
X *
X * Install the colormap for the given window. If the window's colormap
X * attribute is None, install the default screen colormap instead.
X * This can occur if a client creates a window, sets its colormap
X * attribute to a particular colormap, and then destroys that colormap.
X */
Xvoid
XInstallColormap(dpy, winInfo)
X Display *dpy;
X WinGeneric *winInfo;
X{
X Colormap cmap = winInfo->core.colormap;
X
X if (cmap == None) {
X cmap = winInfo->core.client->scrInfo->colormap;
X }
X
X if (cir.inhibited) {
X cir.winInfo = winInfo;
X } else {
X XInstallColormap(dpy, cmap);
X ColorFocusWindow(winInfo) = winInfo;
X }
X}
X
X
X/*
X * InstallDefaultColormap
X *
X * Install the default colormap for the screen on which this window resides.
X * If `lock' is true, lock it in place as well as installing it.
X */
Xvoid
XInstallDefaultColormap(dpy,winInfo,lock)
X Display *dpy;
X WinGeneric *winInfo;
X Bool lock;
X{
X WinRoot *rootwin = winInfo->core.client->scrInfo->rootwin;
X
X InstallColormap(dpy, rootwin);
X if (lock) {
X ColorFocusClient(rootwin) = rootwin->core.client;
X ColorFocusLocked(rootwin) = True;
X }
X}
X
X
X/*
X * Give this client the colormap focus, and lock the colormap of winInfo into
X * the hardware. Doesn't actually check if winInfo is one of cli's colormap
X * windows. Note: cli can be NULL.
X */
Xvoid
XLockColormap(dpy, cli, winInfo)
X Display *dpy;
X Client *cli;
X WinGeneric *winInfo;
X{
X InstallColormap(dpy, winInfo);
X ColorFocusClient(winInfo) = cli;
X ColorFocusLocked(winInfo) = True;
X}
X
X
X/*
X * InstallPointerColormap
X *
X * Install the colormap for the leafmost window that we know about that
X * encloses the pointer. The boolean setfocusclient indicates whether to set
X * the colormap focus client to this window's client.
X *
X * If root is None, we do a QueryPointer to find out where the pointer is
X * instead of using the rootx and rooty values.
X */
Xvoid
XInstallPointerColormap(dpy, root, rootx, rooty, setfocusclient)
X Display *dpy;
X Window root;
X int rootx, rooty;
X Bool setfocusclient;
X{
X Window src;
X Window dest;
X Window child;
X int srcx;
X int srcy;
X int destx, desty;
X WinGeneric *wi = NULL;
X WinGeneric *t;
X Client *cli;
X
X if (root == None) {
X Window wjunk;
X int junk;
X unsigned int uijunk;
X
X /* We want only the root, rootx, and rooty; we throw the rest away */
X (void) XQueryPointer(dpy, DefaultRootWindow(dpy), &root, &wjunk,
X &rootx, &rooty, &junk, &junk, &uijunk);
X }
X
X src = root;
X dest = root;
X srcx = rootx;
X srcy = rooty;
X
X while (1) {
X (void) XTranslateCoordinates(dpy, src, dest, srcx, srcy,
X &destx, &desty, &child);
X t = WIGetInfo(dest);
X if (t != NULL)
X wi = t;
X if (child == None)
X break;
X src = dest;
X dest = child;
X srcx = destx;
X srcy = desty;
X }
X /*
X * At this point, dest contains the leafmost window that encloses the
X * pointer, and wi points to the window structure of the leafmost known
X * window that encloses the pointer.
X */
X
X /* if we didn't find a window we know about, use the root instead */
X
X if (wi == NULL) {
X wi = WIGetInfo(root);
X if (wi == NULL)
X return;
X }
X
X /*
X * If we are over a frame, its window button, or its resize corners,
X * use the head of the pane's colormap window list, or the pane itself if
X * it has no list.
X */
X switch (wi->core.kind) {
X case WIN_FRAME:
X case WIN_RESIZE:
X case WIN_PUSHPIN:
X case WIN_WINBUTTON:
X if (wi->core.client->colormapWins)
X wi = wi->core.client->colormapWins->value;
X else
X wi = (WinGeneric *) PANEOFCLIENT(wi->core.client);
X break;
X default:
X break;
X }
X
X if (setfocusclient) {
X if (wi->core.colormapClients)
X cli = (Client *) wi->core.colormapClients->value;
X else if (wi->core.client)
X cli = wi->core.client;
X else
X cli = NULL;
X LockColormap(dpy, cli, wi);
X } else {
X InstallColormap(dpy, wi);
X }
X}
X
X
X/*
X * UnlockColormap
X *
X * Turn off colormap-locked mode.
X */
Xvoid
XUnlockColormap(dpy, root, rootx, rooty)
X Display *dpy;
X{
X WinGeneric *rootinfo = WIGetInfo(root);
X
X /* REMIND: assert rootinfo != NULL */
X
X ColorFocusClient(rootinfo) = NULL;
X ColorFocusLocked(rootinfo) = False;
X InstallPointerColormap(dpy, root, rootx, rooty, False);
X}
X
X
X/*
X * ColormapChange
X *
X * Handle a change to a window's colormap attribute.
X */
Xvoid
XColormapChange(dpy, event, winInfo)
X Display *dpy;
X XEvent *event;
X WinGeneric *winInfo;
X{
X if (event->xcolormap.new) {
X winInfo->core.colormap = event->xcolormap.colormap;
X if (winInfo == ColorFocusWindow(winInfo))
X InstallColormap(dpy, winInfo);
X }
X}
X
X
X/*
X * ColorWindowCrossing
X *
X * Handle colormap installation on crossing events. If we are not in
X * colormap-locked mode, install the window's colormap.
X */
Xvoid
XColorWindowCrossing(dpy, event, winInfo)
X Display *dpy;
X XEvent *event;
X WinGeneric *winInfo;
X{
X if (!ColorFocusLocked(winInfo))
X InstallColormap(dpy, winInfo);
X}
X
X
X/* values for tag field */
X#define TAG_NEITHER 0
X#define TAG_OLDLIST 1
X#define TAG_NEWLIST 2
X
X/*
X * TrackSubwindows -- check for the WM_COLORMAP_WINDOWS prop
X * on a pane, if it exists, track the subwindows.
X */
Xvoid
XTrackSubwindows(cli)
X Client *cli;
X{
X Display *dpy = cli->dpy;
X Window pane = PANEWINOFCLIENT(cli);
X unsigned long nItems, remain;
X Window *cmapwindata;
X List **last;
X List *oldlist;
X List *l;
X WinGeneric *cmwi;
X int i;
X WinGenericPane *paneinfo = PANEOFCLIENT(cli);
X
X if (!PropGetWMColormapWindows(dpy,pane,&cmapwindata,&nItems))
X return;
X
X /*
X * Register all the windows on the new list, taking care to not touch any
X * window that was on the old list, while getting rid of windows not on
X * the new list, and ensuring that the new list has no duplicates. This
X * is a five-step process. (Note: the tag field is initialized to TAG_
X * NEITHER during window creation.)
X *
X * (1) Mark all windows on the old list as TAG_OLDLIST.
X *
X * (2) Run through the WM_COLORMAP_WINDOWS property. For each window ID
X * in this property, there are four cases: (a) we've never seen this
X * window ID before; (b) we've seen this ID before but it is on neither
X * list; (c) this ID is on the old list; (d) this ID already on the new
X * list. For case (a), a record for the window is created and this case
X * is subsumed by case (b).
X *
X * Cases (a) and (b) correspond to TAG_NEITHER. Add this window to the
X * new list, add this client to the window's client list, and mark the
X * window as TAG_NEWLIST. Case (c) corresponds to TAG_OLDLIST. Add this
X * window to the new list and mark it as TAG_NEWLIST. This client is
X * already on the window's client list. Case (d) corresponds to
X * TAG_NEWLIST. This window is already on the new list, so nothing more
X * need be done.
X *
X * (3) If we haven't encountered the pane window in the new property, add
X * it to the front of the list and mark it as TAG_NEWLIST (per ICCCM
X * section 4.1.8).
X *
X * (4) Run through the old list. Each window marked TAG_OLDLIST is no
X * longer on the new list, so remove this client from the window's client
X * list. Windows marked TAG_NEWLIST are already on the new list, so
X * nothing need be done. Reclaim the old list.
X *
X * (5) Reset tags of all windows on the new list to TAG_NEITHER.
X */
X
X oldlist = cli->colormapWins;
X cli->colormapWins = NULL_LIST;
X
X /* step (1) */
X
X l = oldlist;
X for (cmwi = ListEnum(&l); cmwi != NULL; cmwi = ListEnum(&l))
X cmwi->core.tag = TAG_OLDLIST;
X
X /* step (2) */
X
X last = &cli->colormapWins;
X for (i=0; i<nItems; ++i) {
X cmwi = WIGetInfo(cmapwindata[i]);
X
X /* Check for case (a), convert to case (b). */
X if (cmwi == NULL) {
X cmwi = MakeColormap(cli, cmapwindata[i]);
X if (cmwi == NULL)
X continue;
X }
X
X switch (cmwi->core.tag) {
X case TAG_NEITHER: /* case (b) */
X WinAddColorClient(cmwi, cli);
X /* FALL THRU */
X case TAG_OLDLIST: /* case (c) */
X (*last) = ListCons(cmwi, NULL_LIST);
X last = &((*last)->next);
X cmwi->core.tag = TAG_NEWLIST;
X break;
X case TAG_NEWLIST: /* case (d) */
X break;
X }
X }
X XFree((char *)cmapwindata);
X
X /* step (3) */
X
X switch (paneinfo->core.tag) {
X case TAG_NEITHER:
X WinAddColorClient(paneinfo, cli);
X /* FALL THRU */
X case TAG_OLDLIST:
X cli->colormapWins = ListCons(paneinfo, cli->colormapWins);
X paneinfo->core.tag = TAG_NEWLIST;
X break;
X case TAG_NEWLIST:
X /* it's on the new list, do nothing */
X break;
X }
X
X /* step (4) */
X
X l = oldlist;
X for (cmwi = ListEnum(&l); cmwi != NULL; cmwi = ListEnum(&l)) {
X if (cmwi->core.tag == TAG_OLDLIST)
X WinRemoveColorClient(dpy, cmwi, cli);
X cmwi->core.tag = TAG_NEITHER;
X }
X ListDestroy(oldlist);
X
X /* step (5) */
X
X l = cli->colormapWins;
X for (cmwi = ListEnum(&l); cmwi != NULL; cmwi = ListEnum(&l))
X cmwi->core.tag = TAG_NEITHER;
X
X /* install colormaps as necessary */
X
X if (!ColorFocusLocked(paneinfo)) {
X InstallPointerColormap(dpy, None, 0, 0, False);
X } else if (ColorFocusClient(paneinfo) == cli) {
X if (cli->colormapWins)
X InstallColormap(dpy, (WinGeneric *)cli->colormapWins->value);
X else
X InstallColormap(dpy, paneinfo);
X }
X}
X
X
X/*
X * UnTrackSubwindows -- stop tracking all subwindows. The Bool destroyed
X * indicates that this client is being destroyed. If so, this client loses
X * the colormap focus. If not, the color focus window is transferred to this
X * client's pane.
X */
Xvoid
XUnTrackSubwindows(cli, destroyed)
X Client *cli;
X Bool destroyed;
X{
X WinGeneric *wi;
X List *l;
X WinGenericPane *paneinfo = PANEOFCLIENT(cli);
X
X l = cli->colormapWins;
X for (wi = ListEnum(&l); wi != NULL; wi = ListEnum(&l))
X WinRemoveColorClient(cli->dpy, wi, cli);
X ListDestroy(cli->colormapWins);
X cli->colormapWins = NULL_LIST;
X
X if (ColorFocusClient(paneinfo) == cli) {
X if (destroyed) {
X ColorFocusClient(paneinfo) = NULL;
X if (GRV.ColorLocked) {
X /* lock in the root's colormap */
X InstallColormap(cli->dpy,cli->scrInfo->rootwin);
X } else {
X /* revert to follow-mouse */
X ColorFocusLocked(paneinfo) = False;
X InstallPointerColormap(cli->dpy, None, 0, 0, False);
X }
X } else {
X InstallColormap(cli->dpy,paneinfo);
X }
X }
X}
X
X/*
X * ColorUpdateColorMapWindows - handle the PropertyNotify on WM_COLORMAP_WINDOWS
X */
Xvoid
XColorUpdateColorMapWindows(cli,event)
X Client *cli;
X XPropertyEvent *event;
X{
X if (event->state == PropertyNewValue) {
X TrackSubwindows(cli);
X } else {
X UnTrackSubwindows(cli,False);
X }
X}
X
X
X/*
X * MakeColormap -- create the colormap window. Return a WinGeneric structure.
X */
XWinColormap *
XMakeColormap(cli,win)
XClient *cli;
XWindow win;
X{
X WinColormap *w;
X XWindowAttributes winAttr;
X
X /*
X * Select input before getting window attributes in order to avoid
X * race conditions with destruction and colormap changes.
X */
X
X XSelectInput(cli->dpy, win,
X EnterWindowMask | ColormapChangeMask |
X StructureNotifyMask);
X
X if (XGetWindowAttributes(cli->dpy, win, &winAttr) == 0)
X return NULL;
X
X /* create the associated structure */
X w = MemNew(WinColormap);
X w->class = &classColormap;
X w->core.self = win;
X w->core.kind = WIN_COLORMAP;
X w->core.client = cli;
X w->core.colormap = winAttr.colormap;
X w->core.colormapClients = NULL_LIST;
X w->core.helpstring = (char *)NULL; /* no help for colormaps */
X
X /* register the window */
X WIInstallInfo(w);
X
X return w;
X}
X
X
Xvoid
XColormapInit(dpy)
XDisplay *dpy;
X{
X classColormap.core.kind = WIN_COLORMAP;
X classColormap.core.xevents[DestroyNotify] = eventDestroy;
X classColormap.core.xevents[EnterNotify] = eventEnterLeaveNotify;
X classColormap.core.xevents[LeaveNotify] = eventEnterLeaveNotify;
X classColormap.core.xevents[UnmapNotify] = eventUnmapNotify;
X classColormap.core.xevents[ColormapNotify] = eventColormapNotify;
X classColormap.core.focusfunc = NULL;
X classColormap.core.drawfunc = NULL;
X classColormap.core.destroyfunc = destroyColormap;
X classColormap.core.selectfunc = NULL;
X classColormap.core.newconfigfunc = NULL;
X classColormap.core.newposfunc = NULL;
X classColormap.core.setconfigfunc = NULL;
X classColormap.core.createcallback = NULL;
X classColormap.core.heightfunc = NULL;
X classColormap.core.widthfunc = NULL;
X}
X
X
Xvoid
XColorFocusInit(dpy, root)
X Display *dpy;
X WinGeneric *root;
X{
X InstallColormap(dpy, root);
X ColorFocusClient(root) = (Client *)NULL;
X ColorFocusLocked(root) = GRV.ColorLocked;
X}
X
X/* The following two functions are used when a pane is being mapped, to
X * handle the possibility that a pane has already been named as a
X * colourmap window before it was mapped.
X */
X
X/* ColormapUnhook -- Given a window, if exists as a colourmap
X * window, remove it from the event dispatching lookup table
X * and return a pointer to the window structure.
X */
XWinColormap *
XColormapUnhook(w)
XWindow w;
X{
X WinColormap *win;
X
X win = WIGetInfo(w);
X if (win != NULL)
X {
X if (win->core.kind == WIN_COLORMAP)
X {
X WIUninstallInfo(w);
X }
X else
X {
X win = NULL;
X }
X }
X return win;
X}
X
X/* ColormapTransmogrify -- Take a previously-saved colourmap window
X * structure, which has been superceded by a pane window structure,
X * and patch up client-to-window references to point to the
X * pane window structure. When done, destroy the colourmap
X * window structure.
X */
Xvoid
XColormapTransmogrify(winc, winp)
XWinColormap *winc;
XWinPane *winp;
X{
X Client *cli;
X List *cli_list;
X List *win_list;
X
X if (winc == NULL)
X return;
X
X /*
X * For every client in the colourmap window's client list, search that
X * client's window list and change the reference.
X */
X cli_list = winc->core.colormapClients;
X for (cli = ListEnum(&cli_list); cli != NULL; cli = ListEnum(&cli_list)) {
X win_list = cli->colormapWins;
X while (win_list != NULL) {
X if (win_list->value == winc) {
X win_list->value = winp;
X break;
X }
X win_list = win_list->next;
X }
X }
X
X /* patch up other pointers */
X if (ColorFocusWindow(winc) == winc)
X ColorFocusWindow(winc) = (WinGeneric *)winp;
X#ifdef NOTDEF
X /* REMIND check that this next statement is correct */
X if (ColorFocusClient(winc) == winc->core.client)
X ColorFocusClient(winc) = winp->core.client;
X#endif
X
X winp->core.colormapClients = winc->core.colormapClients;
X winc->core.colormapClients = NULL_LIST;
X
X /* the colourmap window can now be destroyed since all references
X * to it have been removed.
X */
X (WinFunc(winc,core.destroyfunc))(winc->core.client->dpy, winc);
X}
END_OF_FILE
if test 21460 -ne `wc -c <'wincolor.c'`; then
echo shar: \"'wincolor.c'\" unpacked with wrong size!
fi
# end of 'wincolor.c'
fi
echo shar: End of archive 13 \(of 21\).
cp /dev/null ark13isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 21 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
--
Molecular Simulations, Inc. mail: dcmartin@postgres.berkeley.edu
796 N. Pastoria Avenue uucp: uwvax!ucbvax!dcmartin
Sunnyvale, California 94086 at&t: 408/522-9236