REPOST: v09i066: tvtwm Patch 3 Part01/01
Tom LaStrange
stan!toml at uunet.UU.NET
Wed Oct 17 06:57:32 AEST 1990
Submitted-by: stan!toml at uunet.UU.NET (Tom LaStrange)
Archive-Name: tvtwm/patch3/part01
Patch-To: tvtwm: Volume 9, Issues 2-10 (8/29/90)
Patch-To: tvtwm: Volume 9, Issue 11 (8/30/90: patch 1)
Patch-To: tvtwm: Volume 9, Issue 20 (9/6/90: patch 2)
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting test in a file
# 3. Execute the file with /bin/sh (not csh) to create the files:
#
#patch.3
#
# Created by toml () on Mon Oct 1 19:56:11 MDT 1990
#
if test -f 'patch.3'
then
echo shar: will not over-write existing file "patch.3"
else
echo extracting "patch.3"
sed 's/^X//' >patch.3 <<'SHAR_EOF'
Xtvtwm patch 3
X
XThis patch fixes the following problems:
X
X 1. f.scroll documented wrong in man page.
X 2. Icon manager sizing problems.
X 3. Negative offsets added for f.scroll command.
X J Greely <jgreely at cis.ohio-state.edu>
X 4. Border widths were ignored in the *.zoom commands.
X 5. f.forcemove now works if DontMoveOff is specified.
X 6. Couldn't drag out of the panner if DontMoveOff was specified.
X 7. New command called f.scrollback that scrolls the desktop
X 8 back to its previous location.
X 9. New keywords that enable displaying of the window name in
X the small virtual windows inside the panner.
X ShowVirtualNames
X VirtualFont "font" # default font is 5x8
X10. VirtualForeground and VirtualBackground control colors of the
X small virtual windows inside the panner.
X11. NoIconTitle and IconTitle control whether or not a title
X is displayed below the icon.
X
X
Xdiff -c ../old/README.tvtwm ./README.tvtwm
X*** ../old/README.tvtwm Tue Sep 4 23:56:43 1990
X--- ./README.tvtwm Mon Oct 1 19:53:26 1990
X***************
X*** 125,130 ****
X--- 125,143 ----
X VirtualDesktopForeground "color"
X This color is only used if VirtualDesktopBackgroundPixmap is set.
X
X+ VirtualForeground "color" [ { window list } ]
X+ Specifies the foreground color for the small virtual panner windows.
X+
X+ VirtualBackground "color" [ { window list } ]
X+ Specifies the background color for the small virtual panner windows.
X+
X+ VirtualFont "5x8"
X+ The font to use when ShowVirtualNames is specified.
X+
X+ ShowVirtualNames
X+ This causes the window name to be displayed in the small virtual
X+ panner window. The VirtualFont is used to display the name.
X+
X PannerGeometry "+-X+-Y"
X Specifies the geometry at which the panner is to be placed. The
X default is "-0-0".
X***************
X*** 155,160 ****
X--- 168,182 ----
X Sticky { window list }
X A list of windows that will come up in a sticky state.
X
X+ NoIconTitle [ { window list } ]
X+ Specifies that no titles should be displayed below icons. If the
X+ optional window list is present then only those clients will
X+ not have icon titles.
X+
X+ IconTitle { window list }
X+ Specifies a list of clients that will have icon titles. Useful
X+ when NoIconTitle has been specified alone.
X+
X New Commands:
X
X f.panner - toggle making the panner visible
X***************
X*** 164,169 ****
X--- 186,192 ----
X f.scrolldown - scroll the desktop down ScrollDistanceY
X f.scrollleft - scroll the desktop left ScrollDistanceX
X f.scrollright - scroll the desktop right ScrollDistanceX
X+ f.scrollback - scroll back to the previous location
X f.panup - same as f.scrollup
X f.pandown - same as f.scrolldown
X f.panleft - same as f.scrollleft
Xdiff -c ../old/add_window.c ./add_window.c
X*** ../old/add_window.c Tue Sep 4 23:56:43 1990
X--- ./add_window.c Mon Oct 1 19:53:26 1990
X***************
X*** 328,333 ****
X--- 328,339 ----
X if (LookInList(Scr->NoTitle, tmp_win->full_name, &tmp_win->class))
X tmp_win->title_height = 0;
X
X+ tmp_win->icon_title = !Scr->NoIconTitle;
X+ if (LookInList(Scr->NoIconTitleL, tmp_win->full_name, &tmp_win->class))
X+ tmp_win->icon_title = False;
X+ if (LookInList(Scr->IconTitleL, tmp_win->full_name, &tmp_win->class))
X+ tmp_win->icon_title = True;
X+
X /* if it is a transient window, don't put a title on it */
X if (tmp_win->transient && !Scr->DecorateTransients)
X tmp_win->title_height = 0;
X***************
X*** 414,420 ****
X--- 420,448 ----
X tmp_win->title.back = Scr->TitleC.back;
X tmp_win->iconc.fore = Scr->IconC.fore;
X tmp_win->iconc.back = Scr->IconC.back;
X+ /*
X+ * for compatibility reasons, let the virtual colors default
X+ * to the titlebar colors if no virtual colors have been specified.
X+ */
X+ if (Scr->VirtualC.fore != UNKNOWN_PIXEL)
X+ tmp_win->virtual.fore = Scr->VirtualC.fore;
X+ else
X+ tmp_win->virtual.fore = Scr->TitleC.fore;
X+ if (Scr->VirtualC.back != UNKNOWN_PIXEL)
X+ tmp_win->virtual.back = Scr->VirtualC.back;
X+ else
X+ tmp_win->virtual.back = Scr->TitleC.back;
X
X+ if (Scr->VirtualDesktop) {
X+ GetColorFromList(Scr->TitleForegroundL, tmp_win->full_name, &tmp_win->class,
X+ &tmp_win->virtual.fore);
X+ GetColorFromList(Scr->TitleBackgroundL, tmp_win->full_name, &tmp_win->class,
X+ &tmp_win->virtual.back);
X+ GetColorFromList(Scr->VirtualForegroundL, tmp_win->full_name, &tmp_win->class,
X+ &tmp_win->virtual.fore);
X+ GetColorFromList(Scr->VirtualBackgroundL, tmp_win->full_name, &tmp_win->class,
X+ &tmp_win->virtual.back);
X+ }
X GetColorFromList(Scr->BorderColorL, tmp_win->full_name, &tmp_win->class,
X &tmp_win->border);
X GetColorFromList(Scr->IconBorderColorL, tmp_win->full_name, &tmp_win->class,
X***************
X*** 459,465 ****
X tmp_win->virtualWindow = MakeVirtual(tmp_win,
X tmp_win->frame_x, tmp_win->frame_y,
X tmp_win->frame_width, tmp_win->frame_height,
X! tmp_win->title.back, tmp_win->border);
X }
X else
X tmp_win->root = Scr->Root;
X--- 487,493 ----
X tmp_win->virtualWindow = MakeVirtual(tmp_win,
X tmp_win->frame_x, tmp_win->frame_y,
X tmp_win->frame_width, tmp_win->frame_height,
X! tmp_win->virtual.back, tmp_win->border);
X }
X else
X tmp_win->root = Scr->Root;
Xdiff -c ../old/events.c ./events.c
X*** ../old/events.c Tue Sep 4 23:56:44 1990
X--- ./events.c Mon Oct 1 19:53:27 1990
X***************
X*** 722,727 ****
X--- 722,728 ----
X Tmp_win->frame_width, Tmp_win->frame_height, -1);
X
X if (Tmp_win->title_w) XClearArea(dpy, Tmp_win->title_w, 0,0,0,0, True);
X+ if (Tmp_win->virtualWindow) PaintVirtualWindow(Tmp_win);
X
X /*
X * if the icon name is NoName, set the name of the icon to be
X***************
X*** 894,903 ****
X if (Tmp_win->icon_not_ours)
X return;
X
X! Tmp_win->icon_w_width = XTextWidth(Scr->IconFont.font,
X! Tmp_win->icon_name, strlen(Tmp_win->icon_name));
X
X- Tmp_win->icon_w_width += 6;
X if (Tmp_win->icon_w_width < Tmp_win->icon_width)
X {
X Tmp_win->icon_x = (Tmp_win->icon_width - Tmp_win->icon_w_width)/2;
X--- 895,908 ----
X if (Tmp_win->icon_not_ours)
X return;
X
X! if (Tmp_win->icon_title) {
X! Tmp_win->icon_w_width = XTextWidth(Scr->IconFont.font,
X! Tmp_win->icon_name, strlen(Tmp_win->icon_name));
X! Tmp_win->icon_w_width += 6;
X! }
X! else
X! Tmp_win->icon_w_width = 0;
X
X if (Tmp_win->icon_w_width < Tmp_win->icon_width)
X {
X Tmp_win->icon_x = (Tmp_win->icon_width - Tmp_win->icon_w_width)/2;
X***************
X*** 916,922 ****
X
X y = 0;
X
X! Tmp_win->icon_w_height = Tmp_win->icon_height + Scr->IconFont.height + 4;
X Tmp_win->icon_y = Tmp_win->icon_height + Scr->IconFont.height;
X
X XResizeWindow(dpy, Tmp_win->icon_w, Tmp_win->icon_w_width,
X--- 921,929 ----
X
X y = 0;
X
X! Tmp_win->icon_w_height = Tmp_win->icon_height;
X! if (Tmp_win->icon_title)
X! Tmp_win->icon_w_height += Tmp_win->icon_height;
X Tmp_win->icon_y = Tmp_win->icon_height + Scr->IconFont.height;
X
X XResizeWindow(dpy, Tmp_win->icon_w, Tmp_win->icon_w_width,
X***************
X*** 1013,1020 ****
X }
X else if (Tmp_win != NULL)
X {
X! if (Event.xany.window == Tmp_win->title_w)
X {
X FBF(Tmp_win->title.fore, Tmp_win->title.back,
X Scr->TitleBarFont.font->fid);
X
X--- 1020,1032 ----
X }
X else if (Tmp_win != NULL)
X {
X! if (Event.xany.window == Tmp_win->virtualWindow)
X {
X+ PaintVirtualWindow(Tmp_win);
X+ flush_expose (Event.xany.window);
X+ }
X+ else if (Event.xany.window == Tmp_win->title_w)
X+ {
X FBF(Tmp_win->title.fore, Tmp_win->title.back,
X Scr->TitleBarFont.font->fid);
X
X***************
X*** 1025,1037 ****
X }
X else if (Event.xany.window == Tmp_win->icon_w)
X {
X! FBF(Tmp_win->iconc.fore, Tmp_win->iconc.back,
X! Scr->IconFont.font->fid);
X
X! XDrawString (dpy, Tmp_win->icon_w,
X! Scr->NormalGC,
X! Tmp_win->icon_x, Tmp_win->icon_y,
X! Tmp_win->icon_name, strlen(Tmp_win->icon_name));
X flush_expose (Event.xany.window);
X return;
X } else if (Tmp_win->titlebuttons) {
X--- 1037,1051 ----
X }
X else if (Event.xany.window == Tmp_win->icon_w)
X {
X! if (Tmp_win->icon_title) {
X! FBF(Tmp_win->iconc.fore, Tmp_win->iconc.back,
X! Scr->IconFont.font->fid);
X
X! XDrawString (dpy, Tmp_win->icon_w,
X! Scr->NormalGC,
X! Tmp_win->icon_x, Tmp_win->icon_y,
X! Tmp_win->icon_name, strlen(Tmp_win->icon_name));
X! }
X flush_expose (Event.xany.window);
X return;
X } else if (Tmp_win->titlebuttons) {
Xdiff -c ../old/gram.y ./gram.y
X*** ../old/gram.y Tue Sep 4 23:56:45 1990
X--- ./gram.y Mon Oct 1 19:53:28 1990
X***************
X*** 88,94 ****
X %token <num> MOVE RESIZE WAIT SELECT KILL LEFT_TITLEBUTTON RIGHT_TITLEBUTTON
X %token <num> NUMBER KEYWORD NKEYWORD CKEYWORD CLKEYWORD FKEYWORD FSKEYWORD
X %token <num> SKEYWORD DKEYWORD JKEYWORD WINDOW_RING WARP_CURSOR ERRORTOKEN
X! %token <num> NO_STACKMODE
X %token <ptr> STRING
X
X %type <ptr> string
X--- 88,94 ----
X %token <num> MOVE RESIZE WAIT SELECT KILL LEFT_TITLEBUTTON RIGHT_TITLEBUTTON
X %token <num> NUMBER KEYWORD NKEYWORD CKEYWORD CLKEYWORD FKEYWORD FSKEYWORD
X %token <num> SKEYWORD DKEYWORD JKEYWORD WINDOW_RING WARP_CURSOR ERRORTOKEN
X! %token <num> NO_STACKMODE ICON_TITLE NO_ICON_TITLE
X %token <ptr> STRING
X
X %type <ptr> string
X***************
X*** 187,192 ****
X--- 187,198 ----
X win_list
X | NO_TITLE { if (Scr->FirstTime)
X Scr->NoTitlebar = TRUE; }
X+ | NO_ICON_TITLE { list = &Scr->NoIconTitleL; }
X+ win_list
X+ | NO_ICON_TITLE { if (Scr->FirstTime)
X+ Scr->NoIconTitle = TRUE; }
X+ | ICON_TITLE { list = &Scr->IconTitleL; }
X+ win_list
X | MAKE_TITLE { list = &Scr->MakeTitle; }
X win_list
X | START_ICONIFIED { list = &Scr->StartIconified; }
Xdiff -c ../old/icons.c ./icons.c
X*** ../old/icons.c Tue Sep 4 23:56:45 1990
X--- ./icons.c Mon Oct 1 19:53:28 1990
X***************
X*** 128,133 ****
X--- 128,137 ----
X *final_x = ie->x + (ie->w - iconWidth (tmp_win)) / 2;
X *final_y = ie->y + (ie->h - iconHeight (tmp_win)) / 2;
X } else {
X+ if (tmp_win->root == Scr->VirtualDesktop) {
X+ def_x += Scr->vdtPositionX;
X+ def_y += Scr->vdtPositionY;
X+ }
X *final_x = def_x;
X *final_y = def_y;
X }
X***************
X*** 468,473 ****
X--- 472,478 ----
X {
X tmp_win->icon_height = 0;
X tmp_win->icon_width = 0;
X+ tmp_win->icon_title = True;
X valuemask = 0;
X }
X else
X***************
X*** 476,485 ****
X attributes.background_pixmap = pm;
X }
X
X! tmp_win->icon_w_width = XTextWidth(Scr->IconFont.font,
X! tmp_win->icon_name, strlen(tmp_win->icon_name));
X
X! tmp_win->icon_w_width += 6;
X if (tmp_win->icon_w_width < tmp_win->icon_width)
X {
X tmp_win->icon_x = (tmp_win->icon_width - tmp_win->icon_w_width)/2;
X--- 481,492 ----
X attributes.background_pixmap = pm;
X }
X
X! if (tmp_win->icon_title) {
X! tmp_win->icon_w_width = XTextWidth(Scr->IconFont.font,
X! tmp_win->icon_name, strlen(tmp_win->icon_name));
X
X! tmp_win->icon_w_width += 6;
X! }
X if (tmp_win->icon_w_width < tmp_win->icon_width)
X {
X tmp_win->icon_x = (tmp_win->icon_width - tmp_win->icon_w_width)/2;
X***************
X*** 491,497 ****
X tmp_win->icon_x = 3;
X }
X tmp_win->icon_y = tmp_win->icon_height + Scr->IconFont.height;
X! tmp_win->icon_w_height = tmp_win->icon_height + Scr->IconFont.height + 4;
X
X event_mask = 0;
X if (tmp_win->wmhints && tmp_win->wmhints->flags & IconWindowHint)
X--- 498,506 ----
X tmp_win->icon_x = 3;
X }
X tmp_win->icon_y = tmp_win->icon_height + Scr->IconFont.height;
X! tmp_win->icon_w_height = tmp_win->icon_height;
X! if (tmp_win->icon_title)
X! tmp_win->icon_w_height += Scr->IconFont.height + 4;
X
X event_mask = 0;
X if (tmp_win->wmhints && tmp_win->wmhints->flags & IconWindowHint)
X***************
X*** 527,533 ****
X if (Scr->VirtualDesktop) {
X tmp_win->virtualIcon = MakeVirtual(tmp_win,
X 0, 0, tmp_win->icon_w_width, tmp_win->icon_w_height,
X! tmp_win->iconc.back, tmp_win->icon_border);
X }
X XSelectInput (dpy, tmp_win->icon_w,
X KeyPressMask | ButtonPressMask | ButtonReleaseMask |
X--- 536,542 ----
X if (Scr->VirtualDesktop) {
X tmp_win->virtualIcon = MakeVirtual(tmp_win,
X 0, 0, tmp_win->icon_w_width, tmp_win->icon_w_height,
X! tmp_win->virtual.back, tmp_win->icon_border);
X }
X XSelectInput (dpy, tmp_win->icon_w,
X KeyPressMask | ButtonPressMask | ButtonReleaseMask |
X***************
X*** 568,580 ****
X PlaceIcon(tmp_win, def_x, def_y, &final_x, &final_y);
X }
X
X! if (final_x > Scr->MyDisplayWidth)
X! final_x = Scr->MyDisplayWidth - tmp_win->icon_w_width -
X! (2 * Scr->IconBorderWidth);
X
X! if (final_y > Scr->MyDisplayHeight)
X! final_y = Scr->MyDisplayHeight - tmp_win->icon_height -
X! Scr->IconFont.height - 4 - (2 * Scr->IconBorderWidth);
X
X MoveIcon(tmp_win, final_x, final_y);
X tmp_win->iconified = TRUE;
X--- 577,591 ----
X PlaceIcon(tmp_win, def_x, def_y, &final_x, &final_y);
X }
X
X! if (tmp_win->root == Scr->Root) {
X! if (final_x > Scr->MyDisplayWidth)
X! final_x = Scr->MyDisplayWidth - tmp_win->icon_w_width -
X! (2 * Scr->IconBorderWidth);
X
X! if (final_y > Scr->MyDisplayHeight)
X! final_y = Scr->MyDisplayHeight - tmp_win->icon_height -
X! Scr->IconFont.height - 4 - (2 * Scr->IconBorderWidth);
X! }
X
X MoveIcon(tmp_win, final_x, final_y);
X tmp_win->iconified = TRUE;
Xdiff -c ../old/menus.c ./menus.c
X*** ../old/menus.c Tue Sep 4 23:56:46 1990
X--- ./menus.c Mon Oct 1 19:53:30 1990
X***************
X*** 1188,1193 ****
X--- 1188,1194 ----
X case F_SCROLLRIGHT:
X case F_SCROLLUP:
X case F_SCROLLDOWN:
X+ case F_SCROLLBACK:
X ScrollDesktop(func, action);
X break;
X
X***************
X*** 1965,1970 ****
X--- 1966,1972 ----
X
X if (raisewin) {
X RaiseFrame (raiseFrame);
X+ ScrollToQuadrant(raiseFrame);
X XWarpPointer (dpy, None, iconwin, 0,0,0,0, 5, 5);
X } else {
X XBell (dpy, 0);
Xdiff -c ../old/move.c ./move.c
X*** ../old/move.c Tue Sep 4 23:56:46 1990
X--- ./move.c Mon Oct 1 19:53:30 1990
X***************
X*** 47,52 ****
X--- 47,53 ----
X #include "vdt.h"
X #include "move.h"
X #include "events.h"
X+ #include "parse.h"
X
X static int dragX;
X static int dragY;
X***************
X*** 351,358 ****
X deltax = xl - origX/scale;
X deltay = yt - origY/scale;
X
X! if (Scr->DontMoveOff && outlineWindow != Scr->Panner) {
X! if (tmp_win->root == Scr->VirtualDesktop) {
X vdtx = Scr->vdtPositionX;
X vdty = Scr->vdtPositionY;
X }
X--- 352,359 ----
X deltax = xl - origX/scale;
X deltay = yt - origY/scale;
X
X! if (MoveFunction != F_FORCEMOVE && Scr->DontMoveOff && outlineWindow != Scr->Panner) {
X! if (tmp_win->root == Scr->VirtualDesktop || tmp_win->root == Scr->Panner) {
X vdtx = Scr->vdtPositionX;
X vdty = Scr->vdtPositionY;
X }
Xdiff -c ../old/parse.c ./parse.c
X*** ../old/parse.c Tue Sep 4 23:56:47 1990
X--- ./parse.c Mon Oct 1 19:53:30 1990
X***************
X*** 340,345 ****
X--- 340,346 ----
X #define kw0_NoCaseSensitive 23
X #define kw0_NoRaiseOnWarp 24
X #define kw0_WarpUnmapped 25
X+ #define kw0_ShowVirtualNames 26
X
X #define kws_UsePPosition 1
X #define kws_IconFont 2
X***************
X*** 355,360 ****
X--- 356,362 ----
X #define kws_PannerGeometry 12
X #define kws_VirtualDesktopBackgroundPixmap 13
X #define kws_PannerBackgroundPixmap 14
X+ #define kws_VirtualFont 15
X
X #define kwn_ConstrainedMoveTime 1
X #define kwn_MoveDelta 2
X***************
X*** 380,385 ****
X--- 382,389 ----
X #define kwcl_IconBorderColor 9
X #define kwcl_IconManagerForeground 10
X #define kwcl_IconManagerBackground 11
X+ #define kwcl_VirtualForeground 12
X+ #define kwcl_VirtualBackground 13
X
X #define kwc_DefaultForeground 1
X #define kwc_DefaultBackground 2
X***************
X*** 477,482 ****
X--- 481,487 ----
X { "f.rightzoom", FKEYWORD, F_RIGHTZOOM },
X { "f.saveyourself", FKEYWORD, F_SAVEYOURSELF },
X { "f.scroll", FSKEYWORD, F_SCROLL },
X+ { "f.scrollback", FKEYWORD, F_SCROLLBACK },
X { "f.scrolldown", FKEYWORD, F_SCROLLDOWN },
X { "f.scrollhome", FKEYWORD, F_SCROLLHOME },
X { "f.scrollleft", FKEYWORD, F_SCROLLLEFT },
X***************
X*** 524,529 ****
X--- 529,535 ----
X { "iconmgr", ICONMGR, 0 },
X { "iconregion", ICON_REGION, 0 },
X { "icons", ICONS, 0 },
X+ { "icontitle", ICON_TITLE, 0 },
X { "interpolatemenucolors", KEYWORD, kw0_InterpolateMenuColors },
X { "l", LOCK, 0 },
X { "left", JKEYWORD, J_LEFT },
X***************
X*** 550,555 ****
X--- 556,562 ----
X { "nograbserver", KEYWORD, kw0_NoGrabServer },
X { "nohighlight", NO_HILITE, 0 },
X { "noiconmanagers", KEYWORD, kw0_NoIconManagers },
X+ { "noicontitle", NO_ICON_TITLE, 0 },
X { "nomenushadows", KEYWORD, kw0_NoMenuShadows },
X { "noraiseondeiconify", KEYWORD, kw0_NoRaiseOnDeiconify },
X { "noraiseonmove", KEYWORD, kw0_NoRaiseOnMove },
X***************
X*** 584,589 ****
X--- 591,597 ----
X { "select", SELECT, 0 },
X { "shift", SHIFT, 0 },
X { "showiconmanager", KEYWORD, kw0_ShowIconManager },
X+ { "showvirtualnames", KEYWORD, kw0_ShowVirtualNames },
X { "sorticonmanager", KEYWORD, kw0_SortIconManager },
X { "south", DKEYWORD, D_SOUTH },
X { "squeezetitle", SQUEEZE_TITLE, 0 },
X***************
X*** 599,609 ****
X--- 607,620 ----
X { "titlepadding", NKEYWORD, kwn_TitlePadding },
X { "unknownicon", SKEYWORD, kws_UnknownIcon },
X { "usepposition", SKEYWORD, kws_UsePPosition },
X+ { "virtualbackground", CLKEYWORD, kwcl_VirtualBackground },
X { "virtualdesktop", SKEYWORD, kws_VirtualDesktop },
X { "virtualdesktopbackground",CKEYWORD, kwc_VirtualDesktopBackground },
X { "virtualdesktopbackgroundpixmap",SKEYWORD,
X kws_VirtualDesktopBackgroundPixmap },
X { "virtualdesktopforeground",CKEYWORD, kwc_VirtualDesktopForeground },
X+ { "virtualfont", SKEYWORD, kws_VirtualFont },
X+ { "virtualforeground", CLKEYWORD, kwcl_VirtualForeground },
X { "w", WINDOW, 0 },
X { "wait", WAIT, 0 },
X { "warpcursor", WARP_CURSOR, 0 },
X***************
X*** 740,745 ****
X--- 751,760 ----
X Scr->ShowIconManager = TRUE;
X return 1;
X
X+ case kw0_ShowVirtualNames:
X+ Scr->ShowVirtualNames = TRUE;
X+ return 1;
X+
X case kw0_NoCaseSensitive:
X Scr->CaseSensitive = FALSE;
X return 1;
X***************
X*** 830,835 ****
X--- 845,854 ----
X return 1;
X }
X
X+ case kws_VirtualFont:
X+ if (!Scr->HaveFonts) Scr->VirtualFont.name = s;
X+ return 1;
X+
X case kws_IconFont:
X if (!Scr->HaveFonts) Scr->IconFont.name = s;
X return 1;
X***************
X*** 970,975 ****
X--- 989,1002 ----
X case kwcl_TitleBackground:
X GetColor (colormode, &Scr->TitleC.back, s);
X return &Scr->TitleBackgroundL;
X+
X+ case kwcl_VirtualForeground:
X+ GetColor (colormode, &Scr->VirtualC.fore, s);
X+ return &Scr->VirtualForegroundL;
X+
X+ case kwcl_VirtualBackground:
X+ GetColor (colormode, &Scr->VirtualC.back, s);
X+ return &Scr->VirtualBackgroundL;
X
X case kwcl_IconForeground:
X GetColor (colormode, &Scr->IconC.fore, s);
Xdiff -c ../old/parse.h ./parse.h
X*** ../old/parse.h Tue Sep 4 23:56:47 1990
X--- ./parse.h Mon Oct 1 19:53:31 1990
X***************
X*** 97,102 ****
X--- 97,103 ----
X #define F_SCROLLDOWN 50
X #define F_SCROLLUP 51
X #define F_PANNER 52
X+ #define F_SCROLLBACK 53
X
X #define F_MENU 101 /* string */
X #define F_WARPTO 102 /* string */
Xdiff -c ../old/patchlevel.h ./patchlevel.h
X*** ../old/patchlevel.h Tue Sep 4 23:56:47 1990
X--- ./patchlevel.h Mon Oct 1 19:53:31 1990
X***************
X*** 1 ****
X! #define PATCHLEVEL 2
X--- 1 ----
X! #define PATCHLEVEL 3
Xdiff -c ../old/resize.c ./resize.c
X*** ../old/resize.c Tue Sep 4 23:56:47 1990
X--- ./resize.c Mon Oct 1 19:53:31 1990
X***************
X*** 98,103 ****
X--- 98,107 ----
X &x, &y, &junkbw, &junkbw, &junkMask))
X return;
X }
X+ if (tmp_win->root == Scr->VirtualDesktop) {
X+ x += Scr->vdtPositionX;
X+ y += Scr->vdtPositionY;
X+ }
X
X h = ((x - dragx) / (dragWidth < 3 ? 1 : (dragWidth / 3)));
X v = ((y - dragy - tmp_win->title_height) /
X***************
X*** 948,953 ****
X--- 952,960 ----
X RaiseFrame(dpy, tmp_win);
X
X dragHeight -= tmp_win->title_height;
X+
X+ dragHeight -= 2*tmp_win->frame_bw;
X+ dragWidth -= 2*tmp_win->frame_bw;
X
X if (tmp_win->hints.flags&PMinSize && tmp_win->hints.flags & PResizeInc)
X {
Xdiff -c ../old/screen.h ./screen.h
X*** ../old/screen.h Tue Sep 4 23:56:47 1990
X--- ./screen.h Mon Oct 1 19:53:31 1990
X***************
X*** 78,85 ****
X--- 78,88 ----
X int vdtHeight; /* height of the virtual desktop */
X int vdtPositionX; /* where the virtual desktop is currently positioned */
X int vdtPositionY; /* where the virtual desktop is currently positioned */
X+ int vdtSaveX; /* saved position */
X+ int vdtSaveY; /* saved position */
X int vdtScrollDistanceX; /* fraction to pan by in the X direction */
X int vdtScrollDistanceY; /* fraction to pan by in the Y direction */
X+ short ShowVirtualNames; /* should we paint the names in the virtual windows? */
X
X name_list *Icons; /* list of icon pixmaps */
X TitlebarPixmaps tbpm; /* titlebar pixmaps */
X***************
X*** 137,142 ****
X--- 140,146 ----
X ColorPair DefaultC; /* default colors */
X ColorPair vdtC; /* virtual desktop colors */
X ColorPair PannerC; /* Panner colors */
X+ ColorPair VirtualC; /* Virtual window colors */
X Pixel BorderColor; /* color of window borders */
X Pixel MenuShadowColor; /* menu shadow color */
X Pixel IconBorderColor; /* icon border color */
X***************
X*** 183,188 ****
X--- 187,196 ----
X name_list *WindowRingL; /* windows in ring */
X name_list *WarpCursorL; /* windows to warp cursor to on deiconify */
X name_list *StickyL; /* windows that should be sticky */
X+ name_list *VirtualBackgroundL; /* virtual window colors */
X+ name_list *VirtualForegroundL; /* virtual window colors */
X+ name_list *NoIconTitleL; /* don't display icon names */
X+ name_list *IconTitleL; /* do display icon names */
X
X GC NormalGC; /* normal GC for everything */
X GC MenuGC; /* gc for menus */
X***************
X*** 198,203 ****
X--- 206,212 ----
X MyFont SizeFont; /* resize font structure */
X MyFont IconManagerFont; /* window list font structure */
X MyFont DefaultFont;
X+ MyFont VirtualFont; /* names in the small panner windows */
X IconMgr iconmgr; /* default icon manager */
X struct IconRegion *FirstRegion; /* pointer to icon regions */
X struct IconRegion *LastRegion; /* pointer to the last icon region */
X***************
X*** 215,220 ****
X--- 224,230 ----
X int TitlePadding; /* distance between items in titlebar */
X int ButtonIndent; /* amount to shrink buttons on each side */
X int NumAutoRaises; /* number of autoraise windows on screen */
X+ short NoIconTitle; /* don't display WM_ICON_NAME */
X short NoDefaults; /* do not add in default UI stuff */
X short UsePPosition; /* what do with PPosition, see values below */
X short AutoRelativeResize; /* start resize relative to position in quad */
Xdiff -c ../old/tvtwm.man ./tvtwm.man
X*** ../old/tvtwm.man Tue Sep 4 23:56:48 1990
X--- ./tvtwm.man Mon Oct 1 19:53:33 1990
X***************
X*** 333,338 ****
X--- 333,340 ----
X \fBIconBorderColor\fP,
X \fBIconManagerBackground\fP, and
X \fBIconManagerForeground\fP.
X+ \fBVirtualBackground\fP, and
X+ \fBVirtualForeground\fP.
X For example:
X .EX 0
X \fBColor\fP
X***************
X*** 555,560 ****
X--- 557,568 ----
X the icon bitmap in the file ``xterm.icon''. If \fBForceIcons\fP is
X specified, this bitmap will be used even if the client has requested its
X own icon pixmap.
X+ .IP "\fBIconTitle\fP { \fIwin-list\fP }" 8
X+ This variable specifies a list of clients that will have the icon
X+ name displayed below the icon
X+ and is used to request icon titles on specific windows when
X+ \fBNoIconTitle\fP has been
X+ set.
X .IP "\fBInterpolateMenuColors\fP" 8
X This variable indicates that menu entry colors should be interpolated between
X entry specified colors. In the example below:
X***************
X*** 638,643 ****
X--- 646,659 ----
X current \fBBorderTileForeground\fP and \fBBorderTileBackground\fP colors.
X .IP "\fBNoIconManagers\fP" 8
X This variable indicates that no icon manager should be created.
X+ .IP "\fBNoIconTitle\fP [{ \fIwin-list\fP }] " 8
X+ This variable indicates that icons should not display the icon name
X+ of the client. If the
X+ optional \fIwin-list\fP is given, only those clients will not have
X+ icon titles.
X+ \fBIconTitle\fP may be used with this option to force icon titles to
X+ be put on
X+ on specific clients
X .IP "\fBNoMenuShadows\fP" 8
X This variable indicates that menus should not have drop shadows drawn behind
X them. This is typically used with slower servers since it speeds up menu
X***************
X*** 745,750 ****
X--- 761,770 ----
X This variable indicates that the icon manager window should be displayed when
X \fItwm\fP is started. It can always be brought up using the
X \fBf.showiconmgr\fP function.
X+ .IP "\fBShowVirtualNames\fP" 8
X+ This variable causes client window names to be displayed in the
X+ small virtual windows inside the Virtual Desktop panner. The names
X+ will be displayed using the current \fBVirtualFont\fP.
X .IP "\fBSortIconManager\fP" 8
X This variable indicates that entries in the icon manager should be
X sorted alphabetically rather than by simply appending new windows to
X***************
X*** 850,855 ****
X--- 870,879 ----
X This variable indicates that the pointer should be warped into windows when
X they are deiconified. If the optional \fIwin-list\fP is given, the pointer
X will only be warped when those windows are deiconified.
X+ .IP "\fBVirtualFont\fP \fIfont\fP" 8
X+ This is the font used to display window names in the small windows inside
X+ the panner if the \fBShowVirtualNames\fP variable is specified. The default
X+ font is "5x8".
X .IP "\fBWindowRing\fP { \fIwin-list\fP }" 8
X This variable specifies a list of windows along which the \fBf.warpring\fP
X function cycles.
X***************
X*** 1144,1155 ****
X window and update the WM_COMMAND property as specified in the ICCCM. If
X the selected window has not selected for this message, the keyboard bell
X will be rung.
X! .IP "\fBf.scrolldown\fP \fIstring\fP" 8
X This function scrolls the Virtual Desktop to a specific logical screen
X quadrant. The \fIstring\fP parameter is a geometry specification
X indicating how to scroll the desktop. For example, "+0+0" would scroll
X the desktop to the home location and "+2+1" would scroll the desktop
X to the quadrant in the third logical column and the second row.
X .IP "\fBf.scrolldown\fP" 8
X This function scrolls the Virtual Desktop down a fraction of the height of
X the screen specified in ScrollDistanceY.
X--- 1168,1182 ----
X window and update the WM_COMMAND property as specified in the ICCCM. If
X the selected window has not selected for this message, the keyboard bell
X will be rung.
X! .IP "\fBf.scroll\fP \fIstring\fP" 8
X This function scrolls the Virtual Desktop to a specific logical screen
X quadrant. The \fIstring\fP parameter is a geometry specification
X indicating how to scroll the desktop. For example, "+0+0" would scroll
X the desktop to the home location and "+2+1" would scroll the desktop
X to the quadrant in the third logical column and the second row.
X+ .IP "\fBf.scrollback\fP
X+ This function scrolls the Virtual Desktop back to its previous
X+ location.
X .IP "\fBf.scrolldown\fP" 8
X This function scrolls the Virtual Desktop down a fraction of the height of
X the screen specified in ScrollDistanceY.
Xdiff -c ../old/twm.c ./twm.c
X*** ../old/twm.c Tue Sep 4 23:56:48 1990
X--- ./twm.c Mon Oct 1 19:53:33 1990
X***************
X*** 302,307 ****
X--- 302,311 ----
X Scr->WindowRingL = NULL;
X Scr->WarpCursorL = NULL;
X Scr->StickyL = NULL;
X+ Scr->VirtualBackgroundL = NULL;
X+ Scr->VirtualForegroundL = NULL;
X+ Scr->NoIconTitleL = NULL;
X+ Scr->IconTitleL = NULL;
X /* remember to put an initialization in InitVariables also
X */
X
X***************
X*** 570,575 ****
X--- 574,583 ----
X FreeList(&Scr->WindowRingL);
X FreeList(&Scr->WarpCursorL);
X FreeList(&Scr->StickyL);
X+ FreeList(&Scr->VirtualBackgroundL);
X+ FreeList(&Scr->VirtualForegroundL);
X+ FreeList(&Scr->NoIconTitleL);
X+ FreeList(&Scr->IconTitleL);
X
X NewFontCursor(&Scr->FrameCursor, "top_left_arrow");
X NewFontCursor(&Scr->TitleCursor, "top_left_arrow");
X***************
X*** 608,613 ****
X--- 616,623 ----
X Scr->IconManagerC.fore = black;
X Scr->IconManagerC.back = white;
X Scr->IconManagerHighlight = black;
X+ Scr->VirtualC.back = UNKNOWN_PIXEL;
X+ Scr->VirtualC.fore = UNKNOWN_PIXEL;
X
X Scr->FramePadding = 2; /* values that look "nice" on */
X Scr->TitlePadding = 8; /* 75 and 100dpi displays */
X***************
X*** 658,667 ****
X--- 668,679 ----
X Scr->HaveFonts = FALSE; /* i.e. not loaded yet */
X Scr->CaseSensitive = TRUE;
X Scr->WarpUnmapped = FALSE;
X+ Scr->NoIconTitle = FALSE;
X
X /* setup default fonts; overridden by defaults from system.twmrc */
X #define DEFAULT_NICE_FONT "variable"
X #define DEFAULT_FAST_FONT "fixed"
X+ #define DEFAULT_SMALL_FONT "5x8"
X
X Scr->TitleBarFont.font = NULL;
X Scr->TitleBarFont.name = DEFAULT_NICE_FONT;
X***************
X*** 673,678 ****
X--- 685,692 ----
X Scr->SizeFont.name = DEFAULT_FAST_FONT;
X Scr->IconManagerFont.font = NULL;
X Scr->IconManagerFont.name = DEFAULT_NICE_FONT;
X+ Scr->VirtualFont.font = NULL;
X+ Scr->VirtualFont.name = DEFAULT_SMALL_FONT;
X Scr->DefaultFont.font = NULL;
X Scr->DefaultFont.name = DEFAULT_FAST_FONT;
X
X***************
X*** 687,692 ****
X--- 701,707 ----
X GetFont(&Scr->SizeFont);
X GetFont(&Scr->IconManagerFont);
X GetFont(&Scr->DefaultFont);
X+ GetFont(&Scr->VirtualFont);
X Scr->HaveFonts = TRUE;
X }
X
Xdiff -c ../old/twm.h ./twm.h
X*** ../old/twm.h Tue Sep 4 23:56:48 1990
X--- ./twm.h Mon Oct 1 19:53:33 1990
X***************
X*** 108,113 ****
X--- 108,115 ----
X /* defines for zooming/unzooming */
X #define ZOOM_NONE 0
X
X+ #define UNKNOWN_PIXEL ((Pixel)-1)
X+
X #define FBF(fix_fore, fix_back, fix_font)\
X Gcv.foreground = fix_fore;\
X Gcv.background = fix_back;\
X***************
X*** 235,240 ****
X--- 237,243 ----
X int icon_w_height; /* height of the icon window */
X int icon_width; /* width of the icon bitmap */
X int icon_height; /* height of the icon bitmap */
X+ short icon_title; /* should we display the icon name */
X int title_height; /* height of the title bar */
X int title_width; /* width of the title bar */
X char *full_name; /* full name of the window */
X***************
X*** 257,262 ****
X--- 260,266 ----
X ColorPair border_tile;
X ColorPair title;
X ColorPair iconc;
X+ ColorPair virtual;
X short iconified; /* has the window ever been iconified? */
X short icon; /* is the window an icon now ? */
X short icon_on; /* is the icon visible */
Xdiff -c ../old/vdt.c ./vdt.c
X*** ../old/vdt.c Tue Sep 4 23:56:49 1990
X--- ./vdt.c Mon Oct 1 19:53:34 1990
X***************
X*** 189,195 ****
X XGrabButton(dpy, Button2, AnyModifier, virtual,
X True, ButtonPressMask | ButtonReleaseMask,
X GrabModeAsync, GrabModeAsync, Scr->Panner, None);
X! XSelectInput(dpy, virtual, KeyPressMask);
X XSaveContext(dpy, virtual, TwmContext, (caddr_t) tmp_win);
X XSaveContext(dpy, virtual, VirtualContext, (caddr_t) tmp_win);
X XSaveContext(dpy, virtual, ScreenContext, (caddr_t) Scr);
X--- 189,195 ----
X XGrabButton(dpy, Button2, AnyModifier, virtual,
X True, ButtonPressMask | ButtonReleaseMask,
X GrabModeAsync, GrabModeAsync, Scr->Panner, None);
X! XSelectInput(dpy, virtual, KeyPressMask | ExposureMask );
X XSaveContext(dpy, virtual, TwmContext, (caddr_t) tmp_win);
X XSaveContext(dpy, virtual, VirtualContext, (caddr_t) tmp_win);
X XSaveContext(dpy, virtual, ScreenContext, (caddr_t) Scr);
X***************
X*** 259,265 ****
X TwmWindow *tmp_win;
X {
X XUnmapWindow(dpy, tmp_win->frame);
X! XUnmapWindow(dpy, tmp_win->w);
X if (tmp_win->virtualWindow && !tmp_win->sticky)
X XUnmapWindow(dpy, tmp_win->virtualWindow);
X }
X--- 259,266 ----
X TwmWindow *tmp_win;
X {
X XUnmapWindow(dpy, tmp_win->frame);
X! if (!tmp_win->iconmgr)
X! XUnmapWindow(dpy, tmp_win->w);
X if (tmp_win->virtualWindow && !tmp_win->sticky)
X XUnmapWindow(dpy, tmp_win->virtualWindow);
X }
X***************
X*** 711,716 ****
X--- 712,719 ----
X XEvent ev;
X
X if (x != Scr->vdtPositionX || y != Scr->vdtPositionY) {
X+ Scr->vdtSaveX = Scr->vdtPositionX;
X+ Scr->vdtSaveY = Scr->vdtPositionY;
X if (x < 0) x = 0;
X if (y < 0) y = 0;
X if ((x + Scr->MyDisplayWidth) > Scr->vdtWidth)
X***************
X*** 758,763 ****
X--- 761,770 ----
X
X switch (func)
X {
X+ case F_SCROLLBACK:
X+ x = Scr->vdtSaveX;
X+ y = Scr->vdtSaveY;
X+ break;
X case F_SCROLL:
X status = XParseGeometry(pos, &x, &y, &width, &height);
X if ((status & (XValue & YValue)) != (XValue & YValue)) {
X***************
X*** 767,772 ****
X--- 774,783 ----
X }
X x = abs(x) * Scr->MyDisplayWidth;
X y = abs(y) * Scr->MyDisplayHeight;
X+ if (status & XNegative)
X+ x = Scr->vdtWidth - Scr->MyDisplayWidth - x;
X+ if (status & YNegative)
X+ y = Scr->vdtHeight - Scr->MyDisplayHeight - y;
X break;
X case F_SCROLLHOME:
X x = 0;
X***************
X*** 965,969 ****
X--- 976,1009 ----
X x = (tmp_win->frame_x / Scr->MyDisplayWidth) * Scr->MyDisplayWidth;
X y = (tmp_win->frame_y / Scr->MyDisplayHeight) * Scr->MyDisplayHeight;
X MoveDesktop(x, y);
X+ }
X+ }
X+
X+ /***********************************************************************
X+ *
X+ * Procedure:
X+ * PaintVirtualWindow - paint the window name in the virtual window
X+ *
X+ * Returned Value:
X+ * None
X+ *
X+ ***********************************************************************
X+ */
X+
X+ void
X+ PaintVirtualWindow(tmp_win)
X+ TwmWindow *tmp_win;
X+ {
X+ int x, y;
X+ int xr, yb;
X+
X+ if (Scr->ShowVirtualNames) {
X+ FBF(tmp_win->virtual.fore, tmp_win->virtual.back,
X+ Scr->VirtualFont.font->fid);
X+
X+ XClearArea(dpy, tmp_win->virtualWindow, 1, 1, 9999, Scr->VirtualFont.height, False);
X+ XDrawString (dpy, tmp_win->virtualWindow, Scr->NormalGC,
X+ 1, 1+Scr->VirtualFont.y,
X+ tmp_win->name, strlen(tmp_win->name));
X }
X }
Xdiff -c ../old/vdt.h ./vdt.h
X*** ../old/vdt.h Tue Sep 4 23:56:49 1990
X--- ./vdt.h Mon Oct 1 19:53:34 1990
X***************
X*** 64,69 ****
X--- 64,70 ----
X extern void ScrollDesktop();
X extern void ResizeDesktop();
X extern void ScrollTo();
X+ extern void PaintVirtualWindow();
X
X #endif /* _VDT_ */
X
Xdiff -c ../old/version.c ./version.c
X*** ../old/version.c Tue Sep 4 23:56:49 1990
X--- ./version.c Mon Oct 1 19:53:34 1990
X***************
X*** 26,30 ****
X /*****************************************************************************/
X
X /* char *Version = "MIT X Consortium, R4"; */
X! char *Version = "$Revision: 6.0 $";
X
X--- 26,30 ----
X /*****************************************************************************/
X
X /* char *Version = "MIT X Consortium, R4"; */
X! char *Version = "$Revision: 7.0 $";
X
SHAR_EOF
if test 35661 -ne "`wc -c < patch.3`"
then
echo shar: error transmitting "patch.3" '(should have been 35661 characters)'
fi
fi
# end of shell archive
exit 0
dan
----------------------------------------------------
O'Reilly && Associates argv at sun.com / argv at ora.com
Opinions expressed reflect those of the author only.
More information about the Comp.sources.x
mailing list