home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
x
/
volume12
/
tvtwm
/
patch5
/
patch.5
Wrap
Text File
|
1993-04-28
|
65KB
|
2,320 lines
tvtwm patch 5
This patch fixes the following problems:
1. Removed XSynchronize call from twm.c
2. The panner windows do not move during a move operation unless
the move is opaque.
3. StayUpMenus keyword allows menus to be displayed until the next
ButtonPress event. (Gregg Jensen uucigj@swbatl.sbc.com)
4. f.zoom commands now obey size hints.
5. Added PannerOpaqueScroll keyword
(Eric A. Anderson <uunet!andrew.cmu.edu!ea08+>
6. TWM Windows menu is now sorted based upon the state of the
SortIconManager variable. (Eric A. Anderson)
7. MenuTitleFont and TitleFontPadding variables added
(uunet!cstr.ed.ac.uk!rjc)
8. PannerBackgroundPixmap and VirtualDesktopBackgroundPixmap must now be
specified inside of the Pixmaps list. (uunet!cstr.ed.ac.uk!rjc)
8. Resize outlines now go away if a resize is cancelled in other than
the +0+0 quadrant.
9. Primitive include file support for .{tv}twmrc via:
include filename (Gregory Bond <uunet!bby.oz.au!gnb)
10. Panner interaction under OpenWindows 2.0 is fixed (bkm@eng.sun.com)
diff -c old/add_window.c new/add_window.c
*** old/add_window.c Thu Nov 15 20:13:07 1990
--- new/add_window.c Tue Apr 23 08:17:12 1991
***************
*** 1108,1113 ****
--- 1108,1114 ----
pm = None;
}
}
+
if (pm) {
valuemask = CWBackPixmap;
attributes.background_pixmap = pm;
***************
*** 1116,1127 ****
--- 1117,1133 ----
attributes.background_pixel = tmp_win->title.fore;
}
+ valuemask |= CWBackingStore;
+ attributes.backing_store= NotUseful;
+
w = XCreateWindow (dpy, tmp_win->title_w, 0, Scr->FramePadding,
(unsigned int) Scr->TBInfo.width, (unsigned int) h,
(unsigned int) 0,
Scr->d_depth, (unsigned int) CopyFromParent,
Scr->d_visual, valuemask, &attributes);
+
if (pm) XFreePixmap (dpy, pm);
+
return w;
}
***************
*** 1296,1317 ****
if (tmp_win->hilite_w)
XUnmapWindow(dpy, tmp_win->hilite_w);
return;
- }
-
-
- SetHighlightPixmap (filename)
- char *filename;
- {
- Pixmap pm = GetBitmap (filename);
-
- if (pm) {
- if (Scr->hilitePm) {
- XFreePixmap (dpy, Scr->hilitePm);
- }
- Scr->hilitePm = pm;
- Scr->hilite_pm_width = JunkWidth;
- Scr->hilite_pm_height = JunkHeight;
- }
}
--- 1302,1307 ----
diff -c old/events.c new/events.c
*** old/events.c Thu Nov 15 20:13:08 1990
--- new/events.c Tue Apr 23 08:17:12 1991
***************
*** 33,38 ****
--- 33,56 ----
* twm event handling
*
* $Log: events.c,v $
+ * Revision 9.0 91/04/23 07:40:32 toml
+ * Revision bump
+ *
+ * Revision 8.5 90/12/31 09:50:23 toml
+ * A better StayUpMenu fix
+ *
+ * Revision 8.4 90/12/31 09:45:03 toml
+ * Fixes a StayUpMenus crash
+ *
+ * Revision 8.3 90/12/29 16:39:30 toml
+ * RJC patches
+ *
+ * Revision 8.2 90/12/29 11:24:16 toml
+ * Added PannerOpaqueScroll
+ *
+ * Revision 8.1 90/12/29 10:13:10 toml
+ * StayUpMenus
+ *
* Revision 8.0 90/11/15 20:02:36 toml
* Revision bump
*
***************
*** 108,114 ****
--- 126,135 ----
ScreenInfo *FindScreenInfo();
int ButtonPressed = -1;
int Cancel = FALSE;
+ int GlobalFirstTime = True;
+ int GlobalMenuButton = False;
+
void HandleCreateNotify();
void HandleReparentNotify();
***************
*** 1077,1083 ****
}
flush_expose (Event.xany.window);
return;
! } else if (Tmp_win->titlebuttons) {
int i;
Window w = Event.xany.window;
register TBWindow *tbw;
--- 1098,1159 ----
}
flush_expose (Event.xany.window);
return;
!
! } else if (Event.xany.window == Tmp_win->hilite_w)
! {
! GC gc = None;
! XGCValues gcv;
! Window w= Event.xany.window;
!
! if (Scr->hiliteLeftPm)
! {
! gcv.foreground = Tmp_win->title.fore;
! gcv.background = Tmp_win->title.back;
! gcv.graphics_exposures = False;
! gc = XCreateGC (dpy, w,
! (GCForeground|GCBackground
! |GCGraphicsExposures),
! &gcv);
! if (gc)
! {
! XCopyPlane (dpy, Scr->hiliteLeftPm, w,
! gc,
! 0, 0,
! Scr->hilite_left_pm_width,
! Scr->hilite_left_pm_height,
! 0, 0, 1);
! XFreeGC (dpy, gc);
! }
! }
!
! if (Scr->hiliteRightPm)
! {
! if ( gc==None )
! {
! gcv.foreground = Tmp_win->title.fore;
! gcv.background = Tmp_win->title.back;
! gcv.graphics_exposures = False;
! gc = XCreateGC (dpy, w,
! (GCForeground|GCBackground
! |GCGraphicsExposures),
! &gcv);
! }
! if (gc)
! {
! XCopyPlane (dpy, Scr->hiliteRightPm,w,
! gc,
! Tmp_win->rightx
! - Tmp_win->highlightx
! - Scr->hilite_right_pm_width, 0,
! Scr->hilite_right_pm_width,
! Scr->hilite_right_pm_height,
! 0, 0, 1);
! XFreeGC (dpy, gc);
! }
! }
! flush_expose (Event.xany.window);
! }
! else if (Tmp_win->titlebuttons) {
int i;
Window w = Event.xany.window;
register TBWindow *tbw;
***************
*** 1520,1525 ****
--- 1596,1613 ----
int xl, xr, yt, yb, w, h;
unsigned mask;
+ if (Scr->StayUpMenus)
+ {
+ if (GlobalFirstTime == True && GlobalMenuButton == True )
+ {
+ ButtonPressed = -1;
+ GlobalFirstTime = False;
+ return;
+ } /* end if */
+
+ GlobalFirstTime = True;
+ } /* end if */
+
if (Event.xany.window == Scr->Panner)
{
HandlePannerButtonRelease(&Event);
***************
*** 1527,1533 ****
}
if (DragWindow != None)
{
! MoveOutline(Scr->Root, 0, 0, 0, 0, 0, 0);
XFindContext(dpy, DragWindow, TwmContext, (caddr_t *)&Tmp_win);
if (DragWindow == Tmp_win->frame)
--- 1615,1621 ----
}
if (DragWindow != None)
{
! MoveOutline(None, 0, 0, 0, 0, 0, 0);
XFindContext(dpy, DragWindow, TwmContext, (caddr_t *)&Tmp_win);
if (DragWindow == Tmp_win->frame)
***************
*** 1686,1691 ****
--- 1774,1782 ----
int y = Event.xbutton.y_root;
Bool center;
+ if (Scr->StayUpMenus)
+ GlobalMenuButton = True;
+
if (!Scr->NoGrabServer)
XGrabServer(dpy);
if (w) {
***************
*** 1719,1726 ****
Cursor cur;
/* pop down the menu, if any */
! if (ActiveMenu != NULL)
! PopDownMenu();
if (InfoLines) {
XUnmapWindow(dpy, Scr->InfoWindow);
--- 1810,1830 ----
Cursor cur;
/* pop down the menu, if any */
! /* if (ActiveMenu != NULL)
! PopDownMenu(); */
! if (Scr->StayUpMenus)
! {
! if (GlobalFirstTime == False && GlobalMenuButton == True)
! {
! return;
! } /* end if */
! } /* end if */
! else
! {
! /* pop down the menu, if any */
! if (ActiveMenu != NULL)
! PopDownMenu();
! } /* end else */
if (InfoLines) {
XUnmapWindow(dpy, Scr->InfoWindow);
***************
*** 1728,1733 ****
--- 1832,1839 ----
}
XSync(dpy, 0); /* XXX - remove? */
+ /* @@@@@@@@@@@ Put this so that bound keys will do things.
+ EG, meta-button one will let you move the panner. */
if (Event.xany.window == Scr->Panner)
{
HandlePannerButtonPress(&Event);
***************
*** 1750,1756 ****
if (Scr->OpaqueMove && DragWindow != None) {
XMoveWindow (dpy, DragWindow, origDragX, origDragY);
} else {
! MoveOutline(Scr->Root, 0, 0, 0, 0, 0, 0);
}
XUnmapWindow(dpy, Scr->SizeWindow);
if (!Scr->OpaqueMove)
--- 1856,1862 ----
if (Scr->OpaqueMove && DragWindow != None) {
XMoveWindow (dpy, DragWindow, origDragX, origDragY);
} else {
! MoveOutline(None, 0, 0, 0, 0, 0, 0);
}
XUnmapWindow(dpy, Scr->SizeWindow);
if (!Scr->OpaqueMove)
***************
*** 1774,1781 ****
ButtonPressed = Event.xbutton.button;
if (ResizeWindow != None ||
! DragWindow != None ||
! ActiveMenu != NULL)
return;
/* check the title bar buttons */
--- 1880,1886 ----
ButtonPressed = Event.xbutton.button;
if (ResizeWindow != None ||
! DragWindow != None)
return;
/* check the title bar buttons */
***************
*** 1899,1904 ****
--- 2004,2016 ----
ExecuteFunction(RootFunction, Action, Event.xany.window,
Tmp_win, &Event, Context, FALSE);
+ if (Scr->StayUpMenus)
+ {
+ /* pop down the menu, if any */
+ if (ActiveMenu != NULL)
+ PopDownMenu();
+ } /* end if */
+
RootFunction = NULL;
return;
}
***************
*** 1917,1924 ****
RootFunction = NULL;
if (Scr->Mouse[Event.xbutton.button][Context][modifier].func == F_MENU)
{
! do_menu (Scr->Mouse[Event.xbutton.button][Context][modifier].menu,
! (Window) None);
}
else if (Scr->Mouse[Event.xbutton.button][Context][modifier].func != NULL)
{
--- 2029,2040 ----
RootFunction = NULL;
if (Scr->Mouse[Event.xbutton.button][Context][modifier].func == F_MENU)
{
! do_menu (Scr->Mouse[Event.xbutton.button][Context][modifier].menu,
! (Window) None);
! if (Scr->StayUpMenus)
! {
! GlobalMenuButton = False;
! } /* end if */
}
else if (Scr->Mouse[Event.xbutton.button][Context][modifier].func != NULL)
{
***************
*** 1965,1970 ****
--- 2081,2087 ----
} HENScanArgs;
/* ARGSUSED*/
+
static Bool
HENQueueScanner(dpy, ev, args)
Display *dpy;
diff -c old/gram.y new/gram.y
*** old/gram.y Thu Nov 15 20:13:09 1990
--- new/gram.y Tue Apr 23 08:17:13 1991
***************
*** 87,93 ****
%token <num> START_ICONIFIED NO_TITLE_HILITE TITLE_HILITE
%token <num> MOVE RESIZE WAIT SELECT KILL LEFT_TITLEBUTTON RIGHT_TITLEBUTTON
%token <num> NUMBER KEYWORD NKEYWORD CKEYWORD CLKEYWORD FKEYWORD FSKEYWORD
! %token <num> SKEYWORD DKEYWORD JKEYWORD WINDOW_RING WARP_CURSOR ERRORTOKEN
%token <num> NO_STACKMODE ICON_TITLE NO_ICON_TITLE
%token <ptr> STRING
--- 87,93 ----
%token <num> START_ICONIFIED NO_TITLE_HILITE TITLE_HILITE
%token <num> MOVE RESIZE WAIT SELECT KILL LEFT_TITLEBUTTON RIGHT_TITLEBUTTON
%token <num> NUMBER KEYWORD NKEYWORD CKEYWORD CLKEYWORD FKEYWORD FSKEYWORD
! %token <num> SKEYWORD DKEYWORD JKEYWORD PKEYWORD WINDOW_RING WARP_CURSOR ERRORTOKEN
%token <num> NO_STACKMODE ICON_TITLE NO_ICON_TITLE
%token <ptr> STRING
***************
*** 345,351 ****
| pixmap_entries pixmap_entry
;
! pixmap_entry : TITLE_HILITE string { SetHighlightPixmap ($2); }
;
--- 345,351 ----
| pixmap_entries pixmap_entry
;
! pixmap_entry : PKEYWORD string { do_pixmap_keyword($1,$2); }
;
diff -c old/iconmgr.c new/iconmgr.c
*** old/iconmgr.c Thu Nov 15 20:13:10 1990
--- new/iconmgr.c Tue Apr 23 08:17:13 1991
***************
*** 499,504 ****
--- 499,506 ----
***********************************************************************
*/
+ extern int FIXED_XmuCompareISOLatin1();
+
void InsertInIconManager(ip, tmp, tmp_win)
IconMgr *ip;
WList *tmp;
***************
*** 506,512 ****
{
WList *tmp1;
int added;
! int (*compar)() = (Scr->CaseSensitive ? strcmp : XmuCompareISOLatin1);
added = FALSE;
if (ip->first == NULL)
--- 508,514 ----
{
WList *tmp1;
int added;
! int (*compar)() = (Scr->CaseSensitive ? strcmp : FIXED_XmuCompareISOLatin1);
added = FALSE;
if (ip->first == NULL)
***************
*** 655,661 ****
{
WList *tmp1, *tmp2;
int done;
! int (*compar)() = (Scr->CaseSensitive ? strcmp : XmuCompareISOLatin1);
if (ip == NULL)
ip = Active->iconmgr;
--- 657,663 ----
{
WList *tmp1, *tmp2;
int done;
! int (*compar)() = (Scr->CaseSensitive ? strcmp : FIXED_XmuCompareISOLatin1);
if (ip == NULL)
ip = Active->iconmgr;
diff -c old/icons.c new/icons.c
*** old/icons.c Thu Nov 15 20:13:10 1990
--- new/icons.c Tue Apr 23 08:17:13 1991
***************
*** 26,31 ****
--- 26,34 ----
* Icon releated routines
*
* $Log: icons.c,v $
+ * Revision 9.0 91/04/23 07:40:37 toml
+ * Revision bump
+ *
* Revision 8.0 90/11/15 20:02:40 toml
* Revision bump
*
diff -c old/menus.c new/menus.c
*** old/menus.c Thu Nov 15 20:13:12 1990
--- new/menus.c Tue Apr 23 08:17:14 1991
***************
*** 33,38 ****
--- 33,50 ----
* twm menu code
*
* $Log: menus.c,v $
+ * Revision 9.0 91/04/23 07:40:40 toml
+ * Revision bump
+ *
+ * Revision 8.3 91/04/15 09:13:24 toml
+ * Remove version comment
+ *
+ * Revision 8.2 90/12/29 16:39:35 toml
+ * RJC patches
+ *
+ * Revision 8.1 90/12/29 10:13:12 toml
+ * StayUpMenus
+ *
* Revision 8.0 90/11/15 20:02:43 toml
* Revision bump
*
***************
*** 82,91 ****
--- 94,106 ----
#include "vdt.h"
#include "add_window.h"
#include "patchlevel.h"
+ #include "malloc.h"
+ #include <X11/Xmu/CharSet.h>
extern XEvent Event;
int RootFunction = NULL;
+
MenuRoot *ActiveMenu = NULL; /* the active menu */
MenuItem *ActiveItem = NULL; /* the active menu item */
int MoveFunction; /* either F_MOVE or F_FORCEMOVE */
***************
*** 116,121 ****
--- 131,138 ----
extern char *InitFile;
static void Identify();
+ #define MAX(x,y) ((x)>(y)?(x):(y))
+
#define SHADOWWIDTH 5 /* in pixels */
/***********************************************************************
***************
*** 372,388 ****
int y_offset;
int text_y;
GC gc;
#ifdef DEBUG_MENUS
fprintf(stderr, "Paint entry\n");
#endif
y_offset = mi->item_num * Scr->EntryHeight;
- text_y = y_offset + Scr->MenuFont.y;
if (mi->func != F_TITLE)
{
int x, y;
if (mi->state)
{
XSetForeground(dpy, Scr->NormalGC, mi->hi_back);
--- 389,409 ----
int y_offset;
int text_y;
GC gc;
+ MyFont *font;
#ifdef DEBUG_MENUS
fprintf(stderr, "Paint entry\n");
#endif
y_offset = mi->item_num * Scr->EntryHeight;
if (mi->func != F_TITLE)
{
int x, y;
+ font = &(Scr->MenuFont);
+
+ text_y = y_offset + font->y;
+
if (mi->state)
{
XSetForeground(dpy, Scr->NormalGC, mi->hi_back);
***************
*** 390,396 ****
XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
mr->width, Scr->EntryHeight);
! FBF(mi->hi_fore, mi->hi_back, Scr->MenuFont.font->fid);
XDrawString(dpy, mr->w, Scr->NormalGC, mi->x,
text_y, mi->item, mi->strlen);
--- 411,417 ----
XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
mr->width, Scr->EntryHeight);
! FBF(mi->hi_fore, mi->hi_back, font->font->fid);
XDrawString(dpy, mr->w, Scr->NormalGC, mi->x,
text_y, mi->item, mi->strlen);
***************
*** 406,412 ****
XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
mr->width, Scr->EntryHeight);
! FBF(mi->fore, mi->back, Scr->MenuFont.font->fid);
gc = Scr->NormalGC;
}
else
--- 427,433 ----
XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
mr->width, Scr->EntryHeight);
! FBF(mi->fore, mi->back, font->font->fid);
gc = Scr->NormalGC;
}
else
***************
*** 426,432 ****
menu12_bits, menu12_width, menu12_height, 1, 0, 1);
}
x = mr->width - menu12_width - 5;
! y = y_offset + ((Scr->MenuFont.height - menu12_height) / 2);
XCopyPlane(dpy, Scr->pullPm, mr->w, gc, 0, 0,
menu12_width, menu12_height, x, y, 1);
}
--- 447,453 ----
menu12_bits, menu12_width, menu12_height, 1, 0, 1);
}
x = mr->width - menu12_width - 5;
! y = y_offset + ((font->height - menu12_height) / 2);
XCopyPlane(dpy, Scr->pullPm, mr->w, gc, 0, 0,
menu12_width, menu12_height, x, y, 1);
}
***************
*** 435,440 ****
--- 456,468 ----
{
int y;
+ if (Scr->MenuTitleFont.name != NULL )
+ font = &(Scr->MenuTitleFont);
+ else
+ font = &(Scr->MenuFont);
+
+ text_y = y_offset + font->y;
+
XSetForeground(dpy, Scr->NormalGC, mi->back);
/* fill the rectangle with the title background color */
***************
*** 441,448 ****
--- 469,483 ----
XFillRectangle(dpy, mr->w, Scr->NormalGC, 0, y_offset,
mr->width, Scr->EntryHeight);
+ if ( Scr->MenuLineWidth > 0 ) /* note we loose the high efficiancy `0' line width */
{
XSetForeground(dpy, Scr->NormalGC, mi->fore);
+ XSetLineAttributes(dpy,Scr->NormalGC,
+ Scr->MenuLineWidth,
+ LineSolid,
+ CapButt,
+ JoinMiter);
+
/* now draw the dividing lines */
if (y_offset)
XDrawLine (dpy, mr->w, Scr->NormalGC, 0, y_offset,
***************
*** 449,457 ****
mr->width, y_offset);
y = ((mi->item_num+1) * Scr->EntryHeight)-1;
XDrawLine(dpy, mr->w, Scr->NormalGC, 0, y, mr->width, y);
}
! FBF(mi->fore, mi->back, Scr->MenuFont.font->fid);
/* finally render the title */
XDrawString(dpy, mr->w, Scr->NormalGC, mi->x,
text_y, mi->item, mi->strlen);
--- 484,497 ----
mr->width, y_offset);
y = ((mi->item_num+1) * Scr->EntryHeight)-1;
XDrawLine(dpy, mr->w, Scr->NormalGC, 0, y, mr->width, y);
+ XSetLineAttributes(dpy,Scr->NormalGC,
+ 0,
+ LineSolid,
+ CapButt,
+ JoinMiter);
}
! FBF(mi->fore, mi->back, font->font->fid);
/* finally render the title */
XDrawString(dpy, mr->w, Scr->NormalGC, mi->x,
text_y, mi->item, mi->strlen);
***************
*** 491,496 ****
--- 531,537 ----
Window aJunkRoot,aJunkChild;
unsigned int aJunkMask;
int a_type;
+ static int firstTime = True;
while (TRUE)
{
***************
*** 499,506 ****
{
a_type = Event.type;
if (!DispatchEvent ()) continue;
! if (a_type == ButtonRelease || Cancel)
! return;
}
/* if we haven't recieved the enter notify yet, wait */
--- 540,572 ----
{
a_type = Event.type;
if (!DispatchEvent ()) continue;
! /* if (a_type == ButtonRelease || Cancel)
! return; */
! if (Event.type == ButtonRelease)
! {
! if (Scr->StayUpMenus)
! {
! if (firstTime == True)
! {
! /* it was the first release of the button */
! firstTime = False;
! } /* end if */
! else
! {
! /* thats the second we need to return now */
! firstTime = True;
! return;
! } /* end else */
! } /* end if */
! else
! {
! return;
! } /* end else */
! }
!
! if (Event.type == Cancel)
! return;
!
}
/* if we haven't recieved the enter notify yet, wait */
***************
*** 682,687 ****
--- 748,754 ----
{
MenuItem *tmp;
int width;
+ MyFont *font;
#ifdef DEBUG_MENUS
fprintf(stderr, "adding menu item=\"%s\", action=%s, sub=%d, f=%d\n",
***************
*** 711,718 ****
tmp->state = 0;
tmp->func = func;
if (!Scr->HaveFonts) CreateFonts();
! width = XTextWidth(Scr->MenuFont.font, item, tmp->strlen);
if (width <= 0)
width = 1;
if (width > menu->width)
--- 778,790 ----
tmp->state = 0;
tmp->func = func;
+ if ( func == F_TITLE && Scr->MenuTitleFont.name != NULL)
+ font= &(Scr->MenuTitleFont);
+ else
+ font= &(Scr->MenuFont);
+
if (!Scr->HaveFonts) CreateFonts();
! width = XTextWidth(font->font, item, tmp->strlen);
if (width <= 0)
width = 1;
if (width > menu->width)
***************
*** 767,775 ****
unsigned long valuemask;
XSetWindowAttributes attributes;
Colormap cmap = Scr->TwmRoot.cmaps.cwins[0]->colormap->c;
- Scr->EntryHeight = Scr->MenuFont.height + 4;
-
/* lets first size the window accordingly */
if (mr->mapped == NEVER_MAPPED)
{
--- 839,858 ----
unsigned long valuemask;
XSetWindowAttributes attributes;
Colormap cmap = Scr->TwmRoot.cmaps.cwins[0]->colormap->c;
+ MyFont *titleFont;
+
+ if ( Scr->MenuTitleFont.name != NULL )
+ {
+ Scr->EntryHeight = MAX(Scr->MenuFont.height,
+ Scr->MenuTitleFont.height) + 4;
+ titleFont= &(Scr->MenuTitleFont);
+ }
+ else
+ {
+ Scr->EntryHeight = Scr->MenuFont.height + 4;
+ titleFont= &(Scr->MenuFont);
+ }
/* lets first size the window accordingly */
if (mr->mapped == NEVER_MAPPED)
{
***************
*** 786,792 ****
cur->x = 5;
else
{
! cur->x = width - XTextWidth(Scr->MenuFont.font, cur->item,
cur->strlen);
cur->x /= 2;
}
--- 869,875 ----
cur->x = 5;
else
{
! cur->x = width - XTextWidth(titleFont->font, cur->item,
cur->strlen);
cur->x /= 2;
}
***************
*** 955,1048 ****
***********************************************************************
*/
Bool PopUpMenu (menu, x, y, center)
MenuRoot *menu;
int x, y;
Bool center;
{
! if (!menu) return False;
! InstallRootColormap();
! if (menu == Scr->Windows)
{
! TwmWindow *tmp_win;
! /* this is the twm windows menu, let's go ahead and build it */
! DestroyMenu (menu);
! menu->first = NULL;
! menu->last = NULL;
! menu->items = 0;
! menu->width = 0;
! menu->mapped = NEVER_MAPPED;
! AddToMenu(menu, "TWM Windows", NULLSTR, NULL, F_TITLE,NULLSTR,NULLSTR);
for (tmp_win = Scr->TwmRoot.next;
tmp_win != NULL;
tmp_win = tmp_win->next)
! {
AddToMenu (menu, tmp_win->name, (char *) tmp_win, NULL, F_POPUP,
NULLSTR, NULLSTR);
! }
! MakeMenu(menu);
}
! if (menu->w == None || menu->items == 0) return False;
! /* Prevent recursively bringing up menus. */
! if (menu->mapped == MAPPED) return False;
! /*
! * Dynamically set the parent; this allows pull-ups to also be main
! * menus, or to be brought up from more than one place.
! */
! menu->prev = ActiveMenu;
! XGrabPointer(dpy, Scr->Root, True,
! ButtonPressMask | ButtonReleaseMask,
! GrabModeAsync, GrabModeAsync,
! Scr->Root, Scr->MenuCursor, CurrentTime);
! ActiveMenu = menu;
! menu->mapped = MAPPED;
! menu->entered = FALSE;
! if (center) {
! x -= (menu->width / 2);
! y -= (Scr->EntryHeight / 2); /* sticky menus would be nice here */
! }
! /*
! * clip to screen
! */
! if (x + menu->width > Scr->MyDisplayWidth) {
! x = Scr->MyDisplayWidth - menu->width;
! }
! if (x < 0) x = 0;
! if (y + menu->height > Scr->MyDisplayHeight) {
! y = Scr->MyDisplayHeight - menu->height;
! }
! if (y < 0) y = 0;
! MenuOrigins[MenuDepth].x = x;
! MenuOrigins[MenuDepth].y = y;
! MenuDepth++;
! XMoveWindow(dpy, menu->w, x, y);
! if (Scr->Shadow) {
! XMoveWindow (dpy, menu->shadow, x + SHADOWWIDTH, y + SHADOWWIDTH);
! }
! if (Scr->Shadow) {
! XRaiseWindow (dpy, menu->shadow);
! }
! XMapRaised(dpy, menu->w);
! if (Scr->Shadow) {
! XMapWindow (dpy, menu->shadow);
! }
! XSync(dpy, 0);
! return True;
}
/***********************************************************************
--- 1038,1168 ----
***********************************************************************
*/
+ extern int FIXED_XmuCompareISOLatin1();
+
Bool PopUpMenu (menu, x, y, center)
MenuRoot *menu;
int x, y;
Bool center;
{
! TwmWindow **sortlist,*bakwin;
! int loop,curpos,count;
! int (*compar)() = (Scr->CaseSensitive ? strcmp : FIXED_XmuCompareISOLatin1);
! if (!menu) return False;
! InstallRootColormap();
! if (menu == Scr->Windows)
{
! TwmWindow *tmp_win;
! /* this is the twm windows menu, let's go ahead and build it */
! DestroyMenu (menu);
! menu->first = NULL;
! menu->last = NULL;
! menu->items = 0;
! menu->width = 0;
! menu->mapped = NEVER_MAPPED;
! AddToMenu(menu, "TWM Windows", NULLSTR, NULL, F_TITLE,NULLSTR,NULLSTR);
! /* CODE to SORT THE MENU @@@@@@@@@@@@@@ */
! if (Scr->SortIconMgr)
! {
!
! for(count=0,tmp_win=Scr->TwmRoot.next;
! tmp_win != NULL;
! tmp_win = tmp_win->next,count++);
! sortlist = (TwmWindow **)malloc(sizeof(TwmWindow *) * count);
! for(loop=0,tmp_win=Scr->TwmRoot.next;
! tmp_win != NULL;
! tmp_win = tmp_win->next,loop++)
! sortlist[loop]=tmp_win;
!
! /* Now that we have them in the list, just do an insertion sort. */
! for (curpos=1;curpos<count;curpos++) {
! /*Everything from 0 to curpos-1 is sorted.*/
! bakwin = sortlist[curpos];
! for (loop=curpos;(loop>0);loop--)
! /*Everything from loop to curpos is sorted*/
! /* Sort order is [0] = min, [n]=max */
! if (((*compar)(sortlist[loop-1]->name,bakwin->name))>0)
! sortlist[loop]=sortlist[loop-1];
! else
! break;
! sortlist[loop]=bakwin;
! }
!
! for(loop=0;loop<count;loop++)
! AddToMenu(menu,sortlist[loop]->name, (char *)sortlist[loop], NULL,
! F_POPUP,NULLSTR,NULLSTR);
! }
! else
for (tmp_win = Scr->TwmRoot.next;
tmp_win != NULL;
tmp_win = tmp_win->next)
! {
AddToMenu (menu, tmp_win->name, (char *) tmp_win, NULL, F_POPUP,
NULLSTR, NULLSTR);
! }
! MakeMenu(menu);
}
! if (menu->w == None || menu->items == 0) return False;
! /* Prevent recursively bringing up menus. */
! if (menu->mapped == MAPPED) return False;
! /*
! * Dynamically set the parent; this allows pull-ups to also be main
! * menus, or to be brought up from more than one place.
! */
! menu->prev = ActiveMenu;
! XGrabPointer(dpy, Scr->Root, True,
! ButtonPressMask | ButtonReleaseMask,
! GrabModeAsync, GrabModeAsync,
! Scr->Root, Scr->MenuCursor, CurrentTime);
! ActiveMenu = menu;
! menu->mapped = MAPPED;
! menu->entered = FALSE;
! if (center) {
! x -= (menu->width / 2);
! y -= (Scr->EntryHeight / 2); /* sticky menus would be nice here */
! }
! /*
! * clip to screen
! */
! if (x + menu->width > Scr->MyDisplayWidth) {
! x = Scr->MyDisplayWidth - menu->width;
! }
! if (x < 0) x = 0;
! if (y + menu->height > Scr->MyDisplayHeight) {
! y = Scr->MyDisplayHeight - menu->height;
! }
! if (y < 0) y = 0;
! MenuOrigins[MenuDepth].x = x;
! MenuOrigins[MenuDepth].y = y;
! MenuDepth++;
! XMoveWindow(dpy, menu->w, x, y);
! if (Scr->Shadow) {
! XMoveWindow (dpy, menu->shadow, x + SHADOWWIDTH, y + SHADOWWIDTH);
! }
! if (Scr->Shadow) {
! XRaiseWindow (dpy, menu->shadow);
! }
! XMapRaised(dpy, menu->w);
! if (Scr->Shadow) {
! XMapWindow (dpy, menu->shadow);
! }
! XSync(dpy, 0);
! return True;
}
/***********************************************************************
***************
*** 1866,1874 ****
XUngrabServer (dpy);
XSync (dpy, 0);
}
! Execute(action);
break;
case F_UNFOCUS:
FocusOnRoot();
break;
--- 1986,2005 ----
XUngrabServer (dpy);
XSync (dpy, 0);
}
! (void)Execute(action);
break;
+ case F_TESTEXEC:
+ PopDownMenu();
+ if (!Scr->NoGrabServer) {
+ XUngrabServer (dpy);
+ XSync (dpy, 0);
+ }
+ do_next_action= (Execute(action)==0);
+ if ( !do_next_action )
+ XBell(dpy,0);
+ break;
+
case F_UNFOCUS:
FocusOnRoot();
break;
***************
*** 2195,2201 ****
***********************************************************************
*/
! void
Execute(s)
char *s;
{
--- 2326,2332 ----
***********************************************************************
*/
! int
Execute(s)
char *s;
{
***************
*** 2205,2210 ****
--- 2336,2342 ----
char oldDisplay[256];
char *doisplay;
int restorevar = 0;
+ int status;
oldDisplay[0] = '\0';
doisplay=getenv("DISPLAY");
***************
*** 2229,2240 ****
restorevar = 1;
}
! (void) system (s);
if (restorevar) { /* why bother? */
(void) sprintf (buf, "DISPLAY=%s", oldDisplay);
putenv (buf);
}
}
/***********************************************************************
--- 2361,2378 ----
restorevar = 1;
}
! status=system (s);
+ /* this next bit may be horribly BSD specific. */
+ if ( (status&0xff) == 0 )
+ status = (status &0xff00) >> 8;
+
if (restorevar) { /* why bother? */
(void) sprintf (buf, "DISPLAY=%s", oldDisplay);
putenv (buf);
}
+
+ return status;
}
/***********************************************************************
***************
*** 2439,2444 ****
--- 2577,2583 ----
n = 0;
(void) sprintf(Info[n++], "tvtwm version: %s", Version);
(void) sprintf(Info[n++], "Patchlevel %d", PATCHLEVEL);
+
Info[n++][0] = '\0';
if (t) {
diff -c old/menus.h new/menus.h
*** old/menus.h Thu Nov 15 20:13:12 1990
--- new/menus.h Tue Apr 23 08:17:15 1991
***************
*** 148,154 ****
extern Bool AddFuncKey();
extern int ExecuteFunction();
extern int DeferExecution();
! extern void Execute();
extern void FocusOnRoot();
#endif /* _MENUS_ */
--- 148,154 ----
extern Bool AddFuncKey();
extern int ExecuteFunction();
extern int DeferExecution();
! extern int Execute();
extern void FocusOnRoot();
#endif /* _MENUS_ */
diff -c old/move.c new/move.c
*** old/move.c Thu Nov 15 20:13:13 1990
--- new/move.c Tue Apr 23 08:17:15 1991
***************
*** 170,179 ****
--- 170,185 ----
int junkxroot, junkyroot;
unsigned int junkMask;
int first;
+ XSetWindowAttributes attr;
if (!Scr->NoGrabServer || !Scr->OpaqueMove)
XGrabServer(dpy);
+ if (Scr->OpaqueMove) {
+ attr.save_under = True;
+ XChangeWindowAttributes(dpy, window, CWSaveUnder, &attr);
+ }
+
if (!adding) {
XGrabPointer(dpy, Scr->Root, True,
PointerMotionMask | EnterWindowMask | LeaveWindowMask | ButtonPressMask | ButtonReleaseMask,
***************
*** 280,285 ****
--- 286,296 ----
if (*cancel)
WindowMoved = False;
+
+ if (Scr->OpaqueMove) {
+ attr.save_under = False;
+ XChangeWindowAttributes(dpy, window, CWSaveUnder, &attr);
+ }
}
/***********************************************************************
***************
*** 344,349 ****
--- 355,361 ----
int deltax, deltay;
int vdtx, vdty;
char str[20];
+ Window actual, virtual;
dragX = x_root;
dragY = y_root;
***************
*** 373,384 ****
yt = vdty + Scr->MyDisplayHeight - dragHeight;
}
! if (panner==IN_PANNER) {
! if (Scr->OpaqueMove)
! XMoveWindow(dpy,tmp_win->frame,xl*Scr->PannerScale,yt*Scr->PannerScale);
! } else
! if (!tmp_win->sticky)
! XMoveWindow(dpy,tmp_win->virtualWindow,xl/Scr->PannerScale,yt/Scr->PannerScale);
if (Scr->OpaqueMove)
XMoveWindow(dpy, window, xl, yt);
else
--- 385,417 ----
yt = vdty + Scr->MyDisplayHeight - dragHeight;
}
! if (Scr->VirtualDesktop && Scr->OpaqueMove && !tmp_win->sticky) {
! if (panner == IN_PANNER) {
! if (window == tmp_win->virtualWindow) {
! actual = tmp_win->frame;
! virtual = tmp_win->virtualWindow;
! }
! else {
! actual = tmp_win->icon_w;
! virtual = tmp_win->virtualIcon;
! }
! }
! else {
! if (window == tmp_win->frame) {
! actual = tmp_win->frame;
! virtual = tmp_win->virtualWindow;
! }
! else {
! actual = tmp_win->icon_w;
! virtual = tmp_win->virtualIcon;
! }
! }
! if (panner == IN_PANNER)
! XMoveWindow(dpy, actual, xl*Scr->PannerScale, yt*Scr->PannerScale);
! else
! XMoveWindow(dpy, virtual, xl/Scr->PannerScale, yt/Scr->PannerScale);
! }
!
if (Scr->OpaqueMove)
XMoveWindow(dpy, window, xl, yt);
else
***************
*** 400,406 ****
{
Window junkChild;
int doingFine;
! XEvent event;
int xdest, ydest;
unsigned mask;
static int buttons;
--- 433,439 ----
{
Window junkChild;
int doingFine;
! XEvent event,bakevent;
int xdest, ydest;
unsigned mask;
static int buttons;
***************
*** 412,418 ****
doingFine = True;
while (doingFine) {
! XMaskEvent(dpy, ButtonPressMask|ButtonReleaseMask|PointerMotionMask|EnterWindowMask|LeaveWindowMask, &event);
switch (event.type) {
case ButtonPress:
if (pulldown) {
--- 445,451 ----
doingFine = True;
while (doingFine) {
! XNextEvent(dpy, &event);
switch (event.type) {
case ButtonPress:
if (pulldown) {
***************
*** 454,459 ****
--- 487,504 ----
ButtonPressed = -1;
*done = True;
doingFine = False;
+
+ /* RJC: added code to do a final move here */
+ if (!WindowMoved &&
+ (abs(event.xbutton.x_root - rootX) >= Scr->MoveDelta ||
+ abs(event.xbutton.y_root - rootY) >= Scr->MoveDelta))
+ {
+ WindowMoved = True;
+ }
+ if (WindowMoved) {
+ *x_root = event.xbutton.x_root + offsetX;
+ *y_root = event.xbutton.y_root + offsetY;
+ }
}
break;
case EnterNotify:
***************
*** 489,494 ****
--- 534,546 ----
doingFine = False;
}
break;
+ default: bakevent = Event;
+ Event=event;
+ DispatchEvent();
+ Event=bakevent;
}
}
}
+
+
+
diff -c old/parse.c new/parse.c
*** old/parse.c Thu Nov 15 20:13:14 1990
--- new/parse.c Tue Apr 23 08:17:15 1991
***************
*** 42,47 ****
--- 42,48 ----
#endif
#include <stdio.h>
+ #include <ctype.h>
#include <X11/Xos.h>
#include <X11/Xmu/CharSet.h>
#include "twm.h"
***************
*** 226,231 ****
--- 227,241 ----
***********************************************************************
*/
+ #define MAX_INCLUDES 10
+
+ static struct incl {
+ FILE *fp;
+ char *name;
+ int lineno;
+ } rc_includes[MAX_INCLUDES];
+ static int include_file = 0;
+
static int twmFileInput()
{
if (overflowlen) return (int) overflowbuff[--overflowlen];
***************
*** 232,242 ****
while (ptr == len)
{
! if (fgets(buff, BUF_LEN, twmrc) == NULL)
! return NULL;
yylineno++;
ptr = 0;
len = strlen(buff);
}
--- 242,288 ----
while (ptr == len)
{
! while (include_file) {
! if (fgets(buff, BUF_LEN, rc_includes[include_file].fp) == NULL) {
! free(rc_includes[include_file].name);
! fclose(rc_includes[include_file].fp);
! yylineno = rc_includes[include_file--].lineno;
! } else
! break;
! }
! if (!include_file)
! if (fgets(buff, BUF_LEN, twmrc) == NULL)
! return NULL;
yylineno++;
+ if (strncmp(buff, "include", 7) == 0) {
+ /* Whoops, an include file! */
+ char *p = buff + 7, *q;
+ FILE *fp;
+
+ while (isspace(*p)) p++;
+ for (q = p; *q && !isspace(*q); q++)
+ continue;
+ *q = 0;
+
+ if ((fp = fopen(p, "r")) == NULL) {
+ fprintf(stderr, "%s: Unable to open included init file %s\n",
+ ProgramName, p);
+ continue;
+ }
+ if (++include_file >= MAX_INCLUDES) {
+ fprintf(stderr, "%s: init file includes nested too deep\n",
+ ProgramName);
+ continue;
+ }
+ rc_includes[include_file].fp = fp;
+ rc_includes[include_file].lineno = yylineno;
+ yylineno = 0;
+ rc_includes[include_file].name = malloc(strlen(p)+1);
+ strcpy(rc_includes[include_file].name, p);
+ continue;
+ }
ptr = 0;
len = strlen(buff);
}
***************
*** 342,347 ****
--- 388,395 ----
#define kw0_WarpUnmapped 25
#define kw0_ShowVirtualNames 26
#define kw0_StickyAbove 27
+ #define kw0_StayUpMenus 28
+ #define kw0_PannerOpaqueScroll 29
#define kws_UsePPosition 1
#define kws_IconFont 2
***************
*** 355,363 ****
#define kws_VirtualDesktop 10
#define kws_PannerState 11
#define kws_PannerGeometry 12
- #define kws_VirtualDesktopBackgroundPixmap 13
- #define kws_PannerBackgroundPixmap 14
#define kws_VirtualFont 15
#define kwn_ConstrainedMoveTime 1
#define kwn_MoveDelta 2
--- 403,410 ----
#define kws_VirtualDesktop 10
#define kws_PannerState 11
#define kws_PannerGeometry 12
#define kws_VirtualFont 15
+ #define kws_MenuTitleFont 16
#define kwn_ConstrainedMoveTime 1
#define kwn_MoveDelta 2
***************
*** 371,376 ****
--- 418,425 ----
#define kwn_PannerScale 10
#define kwn_ScrollDistanceX 11
#define kwn_ScrollDistanceY 12
+ #define kwn_MenuLineWidth 13
+ #define kwn_TitleFontPadding 14
#define kwcl_BorderColor 1
#define kwcl_IconManagerHighlight 2
***************
*** 398,403 ****
--- 447,457 ----
#define kwc_PannerForeground 10
#define kwc_PannerBackground 11
+ #define kwp_TitleHighlight 1
+ #define kwp_TitleHighlightLeft 2
+ #define kwp_TitleHighlightRight 3
+ #define kwp_PannerBackgroundPixmap 4
+ #define kwp_VirtualDesktopBackgroundPixmap 5
/*
* The following is sorted alphabetically according to name (which must be
***************
*** 492,497 ****
--- 546,552 ----
{ "f.sorticonmgr", FKEYWORD, F_SORTICONMGR },
{ "f.source", FSKEYWORD, F_BEEP }, /* XXX - don't work */
{ "f.stick", FKEYWORD, F_STICK },
+ { "f.test", FKEYWORD, F_TESTEXEC },
{ "f.title", FKEYWORD, F_TITLE },
{ "f.topzoom", FKEYWORD, F_TOPZOOM },
{ "f.twmrc", FKEYWORD, F_RESTART },
***************
*** 543,550 ****
--- 598,607 ----
{ "menubackground", CKEYWORD, kwc_MenuBackground },
{ "menufont", SKEYWORD, kws_MenuFont },
{ "menuforeground", CKEYWORD, kwc_MenuForeground },
+ { "menulinewidth", NKEYWORD, kwn_MenuLineWidth },
{ "menushadowcolor", CKEYWORD, kwc_MenuShadowColor },
{ "menutitlebackground", CKEYWORD, kwc_MenuTitleBackground },
+ { "menutitlefont", SKEYWORD, kws_MenuTitleFont },
{ "menutitleforeground", CKEYWORD, kwc_MenuTitleForeground },
{ "meta", META, 0 },
{ "mod", META, 0 }, /* fake it */
***************
*** 572,580 ****
{ "noversion", KEYWORD, kw0_NoVersion },
{ "opaquemove", KEYWORD, kw0_OpaqueMove },
{ "pannerbackground", CKEYWORD, kwc_PannerBackground },
! { "pannerbackgroundpixmap", SKEYWORD, kws_PannerBackgroundPixmap },
{ "pannerforeground", CKEYWORD, kwc_PannerForeground },
{ "pannergeometry", SKEYWORD, kws_PannerGeometry },
{ "pannerscale", NKEYWORD, kwn_PannerScale },
{ "pannerstate", SKEYWORD, kws_PannerState },
{ "pixmaps", PIXMAPS, 0 },
--- 629,638 ----
{ "noversion", KEYWORD, kw0_NoVersion },
{ "opaquemove", KEYWORD, kw0_OpaqueMove },
{ "pannerbackground", CKEYWORD, kwc_PannerBackground },
! { "pannerbackgroundpixmap", PKEYWORD, kwp_PannerBackgroundPixmap },
{ "pannerforeground", CKEYWORD, kwc_PannerForeground },
{ "pannergeometry", SKEYWORD, kws_PannerGeometry },
+ { "panneropaquescroll", KEYWORD, kw0_PannerOpaqueScroll },
{ "pannerscale", NKEYWORD, kwn_PannerScale },
{ "pannerstate", SKEYWORD, kws_PannerState },
{ "pixmaps", PIXMAPS, 0 },
***************
*** 597,602 ****
--- 655,661 ----
{ "south", DKEYWORD, D_SOUTH },
{ "squeezetitle", SQUEEZE_TITLE, 0 },
{ "starticonified", START_ICONIFIED, 0 },
+ { "stayupmenus", KEYWORD, kw0_StayUpMenus },
{ "sticky", STICKY, 0 },
{ "stickyabove", KEYWORD, kw0_StickyAbove },
{ "t", TITLE, 0 },
***************
*** 604,611 ****
{ "titlebackground", CLKEYWORD, kwcl_TitleBackground },
{ "titlebuttonborderwidth", NKEYWORD, kwn_TitleButtonBorderWidth },
{ "titlefont", SKEYWORD, kws_TitleFont },
{ "titleforeground", CLKEYWORD, kwcl_TitleForeground },
! { "titlehighlight", TITLE_HILITE, 0 },
{ "titlepadding", NKEYWORD, kwn_TitlePadding },
{ "unknownicon", SKEYWORD, kws_UnknownIcon },
{ "usepposition", SKEYWORD, kws_UsePPosition },
--- 663,673 ----
{ "titlebackground", CLKEYWORD, kwcl_TitleBackground },
{ "titlebuttonborderwidth", NKEYWORD, kwn_TitleButtonBorderWidth },
{ "titlefont", SKEYWORD, kws_TitleFont },
+ { "titlefontpadding", NKEYWORD, kwn_TitleFontPadding },
{ "titleforeground", CLKEYWORD, kwcl_TitleForeground },
! { "titlehighlight", PKEYWORD, kwp_TitleHighlight },
! { "titlehighlightleft", PKEYWORD, kwp_TitleHighlightLeft },
! { "titlehighlightright", PKEYWORD, kwp_TitleHighlightRight },
{ "titlepadding", NKEYWORD, kwn_TitlePadding },
{ "unknownicon", SKEYWORD, kws_UnknownIcon },
{ "usepposition", SKEYWORD, kws_UsePPosition },
***************
*** 612,619 ****
{ "virtualbackground", CLKEYWORD, kwcl_VirtualBackground },
{ "virtualdesktop", SKEYWORD, kws_VirtualDesktop },
{ "virtualdesktopbackground",CKEYWORD, kwc_VirtualDesktopBackground },
! { "virtualdesktopbackgroundpixmap",SKEYWORD,
! kws_VirtualDesktopBackgroundPixmap },
{ "virtualdesktopforeground",CKEYWORD, kwc_VirtualDesktopForeground },
{ "virtualfont", SKEYWORD, kws_VirtualFont },
{ "virtualforeground", CLKEYWORD, kwcl_VirtualForeground },
--- 674,681 ----
{ "virtualbackground", CLKEYWORD, kwcl_VirtualBackground },
{ "virtualdesktop", SKEYWORD, kws_VirtualDesktop },
{ "virtualdesktopbackground",CKEYWORD, kwc_VirtualDesktopBackground },
! { "virtualdesktopbackgroundpixmap",PKEYWORD,
! kwp_VirtualDesktopBackgroundPixmap },
{ "virtualdesktopforeground",CKEYWORD, kwc_VirtualDesktopForeground },
{ "virtualfont", SKEYWORD, kws_VirtualFont },
{ "virtualforeground", CLKEYWORD, kwcl_VirtualForeground },
***************
*** 673,678 ****
--- 735,744 ----
Scr->StickyAbove = TRUE;
return 1;
+ case kw0_PannerOpaqueScroll:
+ Scr->PannerOpaqueScroll = TRUE;
+ return 1;
+
case kw0_AutoRelativeResize:
Scr->AutoRelativeResize = TRUE;
return 1;
***************
*** 761,766 ****
--- 827,836 ----
Scr->ShowVirtualNames = TRUE;
return 1;
+ case kw0_StayUpMenus:
+ if (Scr->FirstTime) Scr->StayUpMenus = TRUE;
+ return 1;
+
case kw0_NoCaseSensitive:
Scr->CaseSensitive = FALSE;
return 1;
***************
*** 783,796 ****
char *s;
{
switch (keyword) {
- case kws_VirtualDesktopBackgroundPixmap:
- Scr->vdtPixmap = s;
- return 1;
- case kws_PannerBackgroundPixmap:
- Scr->PannerPixmap = s;
- return 1;
-
case kws_VirtualDesktop:
{
int status, x, y;
--- 853,859 ----
***************
*** 867,872 ****
--- 930,939 ----
if (!Scr->HaveFonts) Scr->MenuFont.name = s;
return 1;
+ case kws_MenuTitleFont:
+ if (!Scr->HaveFonts) Scr->MenuTitleFont.name = s;
+ return 1;
+
case kws_TitleFont:
if (!Scr->HaveFonts) Scr->TitleBarFont.name = s;
return 1;
***************
*** 929,934 ****
--- 996,1009 ----
ConstrainedMoveTime = num;
return 1;
+ case kwn_MenuLineWidth:
+ Scr->MenuLineWidth = num;
+ return 1;
+
+ case kwn_TitleFontPadding:
+ Scr->TitleFontPadding = num;
+ return 1;
+
case kwn_MoveDelta:
Scr->MoveDelta = num;
return 1;
***************
*** 1085,1090 ****
--- 1160,1223 ----
return 0;
}
+ int do_pixmap_keyword(keyword, filename)
+ int keyword;
+ char *filename;
+
+ {
+ Pixmap pm;
+
+ switch(keyword)
+ {
+
+ case kwp_TitleHighlight:
+ pm = GetBitmap (filename);
+
+ if (pm) {
+ if (Scr->hilitePm) {
+ XFreePixmap (dpy, Scr->hilitePm);
+ }
+ Scr->hilitePm = pm;
+ Scr->hilite_pm_width = JunkWidth;
+ Scr->hilite_pm_height = JunkHeight;
+ }
+ return 1;
+
+ case kwp_TitleHighlightLeft:
+ pm = GetBitmap (filename);
+ if (pm) {
+ if (Scr->hiliteLeftPm) {
+ XFreePixmap (dpy, Scr->hiliteLeftPm);
+ }
+ Scr->hiliteLeftPm = pm;
+ Scr->hilite_left_pm_width = JunkWidth;
+ Scr->hilite_left_pm_height = JunkHeight;
+ }
+ return 1;
+
+ case kwp_TitleHighlightRight:
+ pm = GetBitmap (filename);
+ if (pm) {
+ if (Scr->hiliteRightPm) {
+ XFreePixmap (dpy, Scr->hiliteRightPm);
+ }
+ Scr->hiliteRightPm = pm;
+ Scr->hilite_right_pm_width = JunkWidth;
+ Scr->hilite_right_pm_height = JunkHeight;
+ }
+ return 1;
+
+ case kwp_PannerBackgroundPixmap:
+ Scr->PannerPixmap = filename;
+ return 1;
+
+ case kwp_VirtualDesktopBackgroundPixmap:
+ Scr->vdtPixmap = filename;
+ return 1;
+
+ }
+ return 0;
+ }
static int ParseUsePPosition (s)
register char *s;
diff -c old/parse.h new/parse.h
*** old/parse.h Thu Nov 15 20:13:14 1990
--- new/parse.h Tue Apr 23 08:17:15 1991
***************
*** 110,115 ****
--- 110,116 ----
#define F_WARPTOSCREEN 109 /* string */
#define F_COLORMAP 110 /* string */
#define F_SCROLL 111 /* string */
+ #define F_TESTEXEC 112 /* string */
#define D_NORTH 1
#define D_SOUTH 2
diff -c old/patchlevel.h new/patchlevel.h
*** old/patchlevel.h Thu Nov 15 20:13:14 1990
--- new/patchlevel.h Tue Apr 23 08:17:15 1991
***************
*** 1 ****
! #define PATCHLEVEL 4
--- 1 ----
! #define PATCHLEVEL 5
diff -c old/resize.c new/resize.c
*** old/resize.c Thu Nov 15 20:13:15 1990
--- new/resize.c Tue Apr 23 08:17:16 1991
***************
*** 33,38 ****
--- 33,47 ----
* window resizing borrowed from the "wm" window manager
*
* $Log: resize.c,v $
+ * Revision 9.0 91/04/23 07:40:45 toml
+ * Revision bump
+ *
+ * Revision 8.2 90/12/29 16:39:40 toml
+ * RJC patches
+ *
+ * Revision 8.1 90/12/29 10:33:36 toml
+ * zoom commands now obey size hints
+ *
* Revision 8.0 90/11/15 20:02:49 toml
* Revision bump
*
***************
*** 810,815 ****
--- 819,825 ----
*/
if (tmp_win->title_height && tmp_win->hilite_w)
{
+
xwc.width = (tmp_win->rightx - tmp_win->highlightx);
if (Scr->TBInfo.nright > 0) xwc.width -= Scr->TitlePadding;
if (xwc.width <= 0) {
***************
*** 821,826 ****
--- 831,838 ----
xwcm = CWX | CWWidth;
XConfigureWindow(dpy, tmp_win->hilite_w, xwcm, &xwc);
+
+
}
#ifdef SHAPE
***************
*** 973,1002 ****
if (!Scr->NoRaiseResize)
RaiseFrame(dpy, tmp_win);
! dragHeight -= tmp_win->title_height;
!
! if (tmp_win->hints.flags&PMinSize && tmp_win->hints.flags & PResizeInc)
! {
! dragWidth -= tmp_win->hints.min_width;
! dragHeight -= tmp_win->hints.min_height;
! }
!
! if (tmp_win->hints.flags & PResizeInc)
! {
! dragWidth /= tmp_win->hints.width_inc;
! dragHeight /= tmp_win->hints.height_inc;
!
! dragWidth *= tmp_win->hints.width_inc;
! dragHeight *= tmp_win->hints.height_inc;
! }
!
! if (tmp_win->hints.flags&PMinSize && tmp_win->hints.flags & PResizeInc)
! {
! dragWidth += tmp_win->hints.min_width;
! dragHeight += tmp_win->hints.min_height;
! }
!
! dragHeight += tmp_win->title_height;
SetupWindow (tmp_win, dragx , dragy , dragWidth, dragHeight, -1);
XUngrabPointer (dpy, CurrentTime);
--- 985,991 ----
if (!Scr->NoRaiseResize)
RaiseFrame(dpy, tmp_win);
! ConstrainSize(tmp_win, &dragWidth, &dragHeight);
SetupWindow (tmp_win, dragx , dragy , dragWidth, dragHeight, -1);
XUngrabPointer (dpy, CurrentTime);
diff -c old/screen.h new/screen.h
*** old/screen.h Thu Nov 15 20:13:15 1990
--- new/screen.h Tue Apr 23 08:17:16 1991
***************
*** 90,97 ****
Pixmap siconifyPm; /* the icon manager iconify pixmap */
Pixmap pullPm; /* pull right menu arrow */
Pixmap hilitePm; /* focus highlight window background */
- Pixmap rootWeave; /* root weave pixmap */
int hilite_pm_width, hilite_pm_height; /* cache the size */
MenuRoot *MenuList; /* head of the menu list */
MenuRoot *LastMenu; /* the last menu (mostly unused?) */
--- 90,101 ----
Pixmap siconifyPm; /* the icon manager iconify pixmap */
Pixmap pullPm; /* pull right menu arrow */
Pixmap hilitePm; /* focus highlight window background */
int hilite_pm_width, hilite_pm_height; /* cache the size */
+ Pixmap hiliteLeftPm; /* focus highlight window left end */
+ int hilite_left_pm_width, hilite_left_pm_height; /* cache the size */
+ Pixmap hiliteRightPm; /* focus highlight window right end */
+ int hilite_right_pm_width, hilite_right_pm_height; /* cache the size */
+ Pixmap rootWeave; /* root weave pixmap */
MenuRoot *MenuList; /* head of the menu list */
MenuRoot *LastMenu; /* the last menu (mostly unused?) */
***************
*** 202,207 ****
--- 206,212 ----
unsigned long XORvalue; /* number to use when drawing xor'ed */
MyFont TitleBarFont; /* title bar font structure */
MyFont MenuFont; /* menu font structure */
+ MyFont MenuTitleFont; /* menu title font structure */
MyFont IconFont; /* icon font structure */
MyFont SizeFont; /* resize font structure */
MyFont IconManagerFont; /* window list font structure */
***************
*** 220,226 ****
--- 225,233 ----
int TitleHeight; /* height of the title bar window */
TwmWindow *Focus; /* the twm window that has focus */
int EntryHeight; /* menu entry height */
+ int MenuLineWidth; /* the width of menu lines 0 means no bars */
int FramePadding; /* distance between decorations and border */
+ int TitleFontPadding; /* additional width to add to font height */
int TitlePadding; /* distance between items in titlebar */
int ButtonIndent; /* amount to shrink buttons on each side */
int NumAutoRaises; /* number of autoraise windows on screen */
***************
*** 265,270 ****
--- 272,278 ----
short WarpUnmapped; /* allow warping to unmapped windows */
short PannerState; /* the initial state of the panner */
short PannerScale; /* scale of the panner */
+ short PannerOpaqueScroll; /* When you scroll in the panner, is it opaque? */
char *PannerGeometry; /* geometry of the panner */
int PannerOutlineWidth;
int PannerOutlineHeight;
***************
*** 277,282 ****
--- 285,291 ----
short PannerBackgroundSet; /* background of panner is set */
char *PannerPixmap; /* Panner pixmap */
short StickyAbove; /* should sticky windows be above? */
+ short StayUpMenus; /* do the menus stay up upon release of button ? */
FuncKey FuncKeyRoot;
} ScreenInfo;
diff -c old/tvtwm.man new/tvtwm.man
*** old/tvtwm.man Thu Nov 15 20:13:17 1990
--- new/tvtwm.man Tue Apr 23 08:17:17 1991
***************
*** 608,613 ****
--- 608,615 ----
menus, and
can only be specified inside of a
\fBColor\fP or \fBMonochrome\fP list. The default is "white".
+ .IP "\fBMenuTitleFont\fP \fIstring\fP" 8
+ This variable specifies the font to be used in menu titles.
.IP "\fBMenuTitleForeground\fP \fIstring\fP" 8
This variable specifies the foreground color for \fBf.title\fP entries in
menus and
***************
*** 715,720 ****
--- 717,726 ----
.IP "\fBPannerGeometry\fP \fIstring\fP" 8
This variable specifies the position of the Virtual Desktop panner.
The default geometry is "-0-0".
+ .IP \"fBPannerOpaqueScroll\fP" 8
+ This variable causes the panner to scroll the Virtual Desktop
+ opaquely. This variable only takes effect if the \fBStickyAbove\fP
+ variable is also set.
.IP "\fBPannerScale\fP \fIscale\fP" 8
This variable specifies that scale of the Virtual Desktop Panner
in relation to the actual screen. The default scale is 20.
***************
*** 804,809 ****
--- 810,819 ----
is given, only those windows will be started iconic. This is useful for
programs that do not support an \fI-iconic\fP command line option or
resource.
+ .IP \"fBStayUpMenus" 8
+ This variable alters menu interaction. By default, a menu item is selected
+ when a mouse button is released over it. This variable causes menu itmes to
+ be selected on the next button press event.
.IP "\fBSticky\fP [{ \fIwin-list\fP }]" 8
This variable is a list of client windows that will be sticky
by default. See the \fBVIRTUAL DESKTOP\fP section for a full
***************
*** 825,830 ****
--- 835,843 ----
.IP "\fBTitleFont\fP \fIstring\fP" 8
This variable specifies the font to used for displaying window names in
titlebars. The default is "8x13".
+ .IP "\fBTitleFontPadding\fP \fIpixels\fP" 8
+ This variable specifies the number of pixels of padding to be placed
+ above window titles. This allows for using small fonts with larger buttons.
.IP "\fBTitleForeground\fP \fIstring\fP [{ \fIwin-list\fP }]" 8
This variable specifies the foreground color used in titlebars, and
may only be specified inside of a
diff -c old/twm.c new/twm.c
*** old/twm.c Thu Nov 15 20:13:18 1990
--- new/twm.c Tue Apr 23 08:17:17 1991
***************
*** 33,38 ****
--- 33,53 ----
* twm - "Tom's Window Manager"
*
* $Log: twm.c,v $
+ * Revision 9.0 91/04/23 07:40:51 toml
+ * Revision bump
+ *
+ * Revision 8.4 90/12/29 16:39:43 toml
+ * RJC patches
+ *
+ * Revision 8.3 90/12/29 11:24:30 toml
+ * Added PannerOpaqueScroll
+ *
+ * Revision 8.2 90/12/29 10:13:16 toml
+ * StayUpMenus
+ *
+ * Revision 8.1 90/11/16 14:16:35 toml
+ * Removed xsync
+ *
* Revision 8.0 90/11/15 20:02:53 toml
* Revision bump
*
***************
*** 79,84 ****
--- 94,101 ----
#include <X11/Xproto.h>
#include <X11/bitmaps/root_weave>
#include "vdt.h"
+ #define XK_LATIN1
+ #include <X11/keysymdef.h>
Display *dpy; /* which display are we talking to */
Window ResizeWindow; /* the window we are resizing */
***************
*** 221,227 ****
exit (1);
}
! XSynchronize(dpy, True); /* */
if (fcntl(ConnectionNumber(dpy), F_SETFD, 1) == -1) {
fprintf (stderr,
--- 238,246 ----
exit (1);
}
! #ifdef XSYNC
! XSynchronize(dpy, True);
! #endif
if (fcntl(ConnectionNumber(dpy), F_SETFD, 1) == -1) {
fprintf (stderr,
***************
*** 421,426 ****
--- 440,447 ----
Scr->siconifyPm = None;
Scr->pullPm = None;
Scr->hilitePm = None;
+ Scr->hiliteLeftPm = None;
+ Scr->hiliteRightPm = None;
Scr->tbpm.xlogo = None;
Scr->tbpm.resize = None;
Scr->tbpm.question = None;
***************
*** 440,449 ****
CreateGCs();
MakeMenus();
! Scr->TitleBarFont.y += Scr->FramePadding;
! Scr->TitleHeight = Scr->TitleBarFont.height + Scr->FramePadding * 2;
/* make title height be odd so buttons look nice and centered */
if (!(Scr->TitleHeight & 1)) Scr->TitleHeight++;
InitTitlebarButtons (); /* menus are now loaded! */
--- 461,473 ----
CreateGCs();
MakeMenus();
! Scr->TitleBarFont.y += Scr->FramePadding + Scr->TitleFontPadding / 2 ;
! Scr->TitleHeight = Scr->TitleBarFont.height + Scr->FramePadding * 2 + Scr->TitleFontPadding ;
/* make title height be odd so buttons look nice and centered */
+
+ /*
if (!(Scr->TitleHeight & 1)) Scr->TitleHeight++;
+ */
InitTitlebarButtons (); /* menus are now loaded! */
***************
*** 640,647 ****
--- 664,673 ----
Scr->VirtualC.back = UNKNOWN_PIXEL;
Scr->VirtualC.fore = UNKNOWN_PIXEL;
+ Scr->MenuLineWidth = 1;
Scr->FramePadding = 2; /* values that look "nice" on */
Scr->TitlePadding = 8; /* 75 and 100dpi displays */
+ Scr->TitleFontPadding = 0;
Scr->ButtonIndent = 1;
Scr->SizeStringOffset = 0;
Scr->BorderWidth = BW;
***************
*** 691,696 ****
--- 717,724 ----
Scr->WarpUnmapped = FALSE;
Scr->NoIconTitle = FALSE;
Scr->StickyAbove = FALSE;
+ Scr->StayUpMenus = FALSE;
+ Scr->PannerOpaqueScroll = FALSE;
/* setup default fonts; overridden by defaults from system.twmrc */
#define DEFAULT_NICE_FONT "variable"
***************
*** 701,706 ****
--- 729,736 ----
Scr->TitleBarFont.name = DEFAULT_NICE_FONT;
Scr->MenuFont.font = NULL;
Scr->MenuFont.name = DEFAULT_NICE_FONT;
+ Scr->MenuTitleFont.font = NULL;
+ Scr->MenuTitleFont.name = NULL; /* use MenuFont unless set */
Scr->IconFont.font = NULL;
Scr->IconFont.name = DEFAULT_NICE_FONT;
Scr->SizeFont.font = NULL;
***************
*** 719,724 ****
--- 749,758 ----
{
GetFont(&Scr->TitleBarFont);
GetFont(&Scr->MenuFont);
+ if ( Scr->MenuTitleFont.name != NULL )
+ {
+ GetFont(&Scr->MenuTitleFont);
+ }
GetFont(&Scr->IconFont);
GetFont(&Scr->SizeFont);
GetFont(&Scr->IconManagerFont);
***************
*** 919,922 ****
--- 953,988 ----
_XA_WM_SAVE_YOURSELF = XInternAtom (dpy, "WM_SAVE_YOURSELF", False);
_XA_WM_DELETE_WINDOW = XInternAtom (dpy, "WM_DELETE_WINDOW", False);
_XA_TWM_FLAGS = XInternAtom (dpy, "_TWM_FLAGS", False);
+ }
+
+ int FIXED_XmuCompareISOLatin1 (first, second)
+ char *first, *second;
+ {
+ register unsigned char *ap, *bp;
+ register unsigned char a= *first, b= *second;
+
+ for (ap = (unsigned char *) first, bp = (unsigned char *) second;
+ *ap && *bp; ap++, bp++) {
+
+ if ((a = *ap) != (b = *bp)) {
+ /* try lowercasing and try again */
+
+ if ((a >= XK_A) && (a <= XK_Z))
+ a += (XK_a - XK_A);
+ else if ((a >= XK_Agrave) && (a <= XK_Odiaeresis))
+ a += (XK_agrave - XK_Agrave);
+ else if ((a >= XK_Ooblique) && (a <= XK_Thorn))
+ a += (XK_oslash - XK_Ooblique);
+
+ if ((b >= XK_A) && (b <= XK_Z))
+ b += (XK_a - XK_A);
+ else if ((b >= XK_Agrave) && (b <= XK_Odiaeresis))
+ b += (XK_agrave - XK_Agrave);
+ else if ((b >= XK_Ooblique) && (b <= XK_Thorn))
+ b += (XK_oslash - XK_Ooblique);
+
+ if (a != b) break;
+ }
+ }
+ return (((int)a) - ((int) b));
}
diff -c old/util.c new/util.c
*** old/util.c Thu Nov 15 20:13:18 1990
--- new/util.c Tue Apr 23 08:17:17 1991
***************
*** 77,82 ****
--- 77,83 ----
Window root;
int x, y, width, height, bw, th;
{
+ static Window lastRoot;
static int lastx = 0;
static int lasty = 0;
static int lastWidth = 0;
***************
*** 92,97 ****
--- 93,101 ----
&& lastBW == bw && th == lastTH)
return;
+ if (root == None)
+ root = lastRoot;
+ lastRoot = root;
r = outline;
#define DRAWIT() \
***************
*** 313,318 ****
--- 317,324 ----
***********************************************************************
*/
+ extern int FIXED_XmuCompareISOLatin1();
+
Pixmap FindBitmap (name, widthp, heightp)
char *name;
unsigned int *widthp, *heightp;
***************
*** 341,347 ****
};
for (i = 0; i < (sizeof pmtab)/(sizeof pmtab[0]); i++) {
! if (XmuCompareISOLatin1 (pmtab[i].name, name) == 0)
return (*pmtab[i].proc) (widthp, heightp);
}
fprintf (stderr, "%s: no such built-in bitmap \"%s\"\n",
--- 347,353 ----
};
for (i = 0; i < (sizeof pmtab)/(sizeof pmtab[0]); i++) {
! if (FIXED_XmuCompareISOLatin1 (pmtab[i].name, name) == 0)
return (*pmtab[i].proc) (widthp, heightp);
}
fprintf (stderr, "%s: no such built-in bitmap \"%s\"\n",
diff -c old/vdt.c new/vdt.c
*** old/vdt.c Thu Nov 15 20:13:19 1990
--- new/vdt.c Tue Apr 23 08:17:17 1991
***************
*** 28,33 ****
--- 28,51 ----
* $XConsortium: vdt.c,v 1.140 90/03/23 11:42:33 jim Exp $
*
* $Log: vdt.c,v $
+ * Revision 9.0 91/04/23 07:40:54 toml
+ * Revision bump
+ *
+ * Revision 8.5 91/04/18 08:19:20 toml
+ * Disable backing store on the virtual desktop
+ *
+ * Revision 8.4 91/04/15 14:54:18 toml
+ * Fixes panner interaction under OpenWindows
+ *
+ * Revision 8.3 90/12/29 15:26:03 toml
+ * Made PannerOpaqueScroll only take effect if StickyAbove is also set.
+ *
+ * Revision 8.2 90/12/29 11:24:22 toml
+ * Added PannerOpaqueScroll
+ *
+ * Revision 8.1 90/12/29 09:56:37 toml
+ * Disallow unmapnotify is window is panner
+ *
* Revision 8.0 90/11/15 20:02:56 toml
* Revision bump
*
***************
*** 213,219 ****
if (height > MAX_VDT_HEIGHT) height = MAX_VDT_HEIGHT;
virtual = XCreateSimpleWindow(dpy, Scr->Panner, x, y,
width, height, 1, border, background);
! XGrabButton(dpy, Button2, AnyModifier, virtual,
True, ButtonPressMask | ButtonReleaseMask,
GrabModeAsync, GrabModeAsync, Scr->Panner, None);
XSelectInput(dpy, virtual, KeyPressMask | ExposureMask );
--- 231,237 ----
if (height > MAX_VDT_HEIGHT) height = MAX_VDT_HEIGHT;
virtual = XCreateSimpleWindow(dpy, Scr->Panner, x, y,
width, height, 1, border, background);
! XGrabButton(dpy, Button2, 0L, virtual,
True, ButtonPressMask | ButtonReleaseMask,
GrabModeAsync, GrabModeAsync, Scr->Panner, None);
XSelectInput(dpy, virtual, KeyPressMask | ExposureMask );
***************
*** 286,292 ****
TwmWindow *tmp_win;
{
XUnmapWindow(dpy, tmp_win->frame);
! if (!tmp_win->iconmgr)
XUnmapWindow(dpy, tmp_win->w);
if (tmp_win->virtualWindow && !tmp_win->sticky)
XUnmapWindow(dpy, tmp_win->virtualWindow);
--- 304,310 ----
TwmWindow *tmp_win;
{
XUnmapWindow(dpy, tmp_win->frame);
! if (!tmp_win->iconmgr && tmp_win->w != Scr->Panner)
XUnmapWindow(dpy, tmp_win->w);
if (tmp_win->virtualWindow && !tmp_win->sticky)
XUnmapWindow(dpy, tmp_win->virtualWindow);
***************
*** 499,507 ****
XFreeGC(dpy, gc);
}
}
! attrMask = CWOverrideRedirect | CWEventMask | CWBackPixmap;
attr.override_redirect = True;
attr.event_mask = SubstructureRedirectMask|SubstructureNotifyMask;
attr.background_pixmap = Scr->rootWeave;
if (pm)
attr.background_pixmap = pm;
--- 517,526 ----
XFreeGC(dpy, gc);
}
}
! attrMask = CWOverrideRedirect | CWEventMask | CWBackPixmap | CWBackingStore;
attr.override_redirect = True;
attr.event_mask = SubstructureRedirectMask|SubstructureNotifyMask;
+ attr.backing_store = NotUseful;
attr.background_pixmap = Scr->rootWeave;
if (pm)
attr.background_pixmap = pm;
***************
*** 611,620 ****
Scr->PannerWidth = sizeHints->base_width;
Scr->PannerHeight = sizeHints->base_height;
! XGrabButton(dpy, Button1, AnyModifier, Scr->Panner,
True, ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
GrabModeAsync, GrabModeAsync, Scr->Panner, None);
! XGrabButton(dpy, Button3, AnyModifier, Scr->Panner,
True, ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
GrabModeAsync, GrabModeAsync, Scr->Panner, None);
XSetWMProperties(dpy, Scr->Panner, &wName, &iName, NULL, 0,
--- 630,639 ----
Scr->PannerWidth = sizeHints->base_width;
Scr->PannerHeight = sizeHints->base_height;
! XGrabButton(dpy, Button1, 0L, Scr->Panner,
True, ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
GrabModeAsync, GrabModeAsync, Scr->Panner, None);
! XGrabButton(dpy, Button3, 0L, Scr->Panner,
True, ButtonPressMask | ButtonReleaseMask | ButtonMotionMask,
GrabModeAsync, GrabModeAsync, Scr->Panner, None);
XSetWMProperties(dpy, Scr->Panner, &wName, &iName, NULL, 0,
***************
*** 689,694 ****
--- 708,714 ----
HandlePannerMotionNotify(ev)
XEvent *ev;
{
+ XEvent dummyev;
int deltaX, deltaY;
int newOutlineX, newOutlineY;
***************
*** 722,727 ****
--- 742,751 ----
XDrawRectangle(dpy, Scr->Panner, Scr->DrawGC,
Scr->PannerOutlineX, Scr->PannerOutlineY,
Scr->PannerOutlineWidth, Scr->PannerOutlineHeight);
+ while(XCheckTypedEvent(dpy,MotionNotify,&dummyev));
+ if (Scr->PannerOpaqueScroll && Scr->StickyAbove)
+ MoveDesktop(Scr->PannerOutlineX*Scr->PannerScale,
+ Scr->PannerOutlineY*Scr->PannerScale);
}
diff -c old/version.c new/version.c
*** old/version.c Thu Nov 15 20:13:20 1990
--- new/version.c Tue Apr 23 08:17:18 1991
***************
*** 26,30 ****
/*****************************************************************************/
/* char *Version = "MIT X Consortium, R4"; */
! char *Version = "$Revision: 8.0 $";
--- 26,30 ----
/*****************************************************************************/
/* char *Version = "MIT X Consortium, R4"; */
! char *Version = "$Revision: 9.0 $";