x11-wm/tvtwm: Remove expired port

2024-01-17 x11-wm/tvtwm: Upstream last release was in 2001 reconsider using vtwm
This commit is contained in:
Muhammad Moinur Rahman 2024-01-18 19:28:51 +01:00
parent b4b8e400d3
commit ec1eae548f
No known key found for this signature in database
GPG key ID: BDB9B5A617C0BC91
12 changed files with 1 additions and 490 deletions

1
MOVED
View file

@ -2954,3 +2954,4 @@ editors/impress||2024-01-18|Has expired: Upstream last release was in 2000
biology/sim4||2024-01-18|Has expired: Upstream last update was in 2005
x11-wm/w9wm||2024-01-18|Has expired: Last upstream release was in 2002
biology/seqio||2024-01-18|Has expired: Upstream last release was in 2000
x11-wm/tvtwm||2024-01-18|Has expired: Upstream last release was in 2001 reconsider using vtwm

View file

@ -115,7 +115,6 @@
SUBDIR += tinywm
SUBDIR += transset
SUBDIR += treewm
SUBDIR += tvtwm
SUBDIR += twm
SUBDIR += vtwm
SUBDIR += wayfire

View file

@ -1,30 +0,0 @@
PORTNAME= tvtwm
PORTVERSION= pl11
PORTREVISION= 2
CATEGORIES= x11-wm
MASTER_SITES= XCONTRIB/window_managers
DISTNAME= ${PORTNAME}.${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Twm with a virtual desktop
LICENSE= MIT
DEPRECATED= Upstream last release was in 2001 reconsider using vtwm
EXPIRATION_DATE= 2024-01-17
USES= imake xorg
USE_XORG= xbitmaps xpm xmu
CFLAGS+= -Wno-return-type
WRKSRC= ${WRKDIR}/tvtwm
PLIST_FILES= bin/tvtwm \
share/man/man1/tvtwm.1.gz
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tvtwm ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/tvtwm.man ${STAGEDIR}${PREFIX}/share/man/man1/tvtwm.1
.include <bsd.port.mk>

View file

@ -1,2 +0,0 @@
SHA256 (tvtwm.pl11.tar.gz) = aae4c23347497c3246388d42cf753616b2df4dee25f936e54910af2c5625c5d5
SIZE (tvtwm.pl11.tar.gz) = 224935

View file

@ -1,33 +0,0 @@
--- Imakefile.orig 1995-02-03 00:25:44 UTC
+++ Imakefile
@@ -25,7 +25,7 @@ XCOMM the maximum level of compatibility
XCOMM will define yylineno. If you get an "Undefined symbol: _yylineno"
XCOMM when linking, adjust this to work on your system.
-#if defined(i386BsdArchitecture) || defined(LinuxArchitecture)
+#if defined(FreeBSDArchitecture) || defined(LinuxArchitecture)
# ifdef LexCmd
LEX = LexCmd -l
# else
@@ -100,7 +100,7 @@ SpecialObjectRule(vdt.o,NullParameter,$(
SpecialObjectRule(LocPixmap.o,NullParameter,'-DBITMAPDIR="$(INCDIR)/bitmaps"')
SpecialObjectRule(twm.o,NullParameter,$(TWM_DEFS))
-#if defined(UltrixArchitecture) || defined(AlphaArchitecture)
+#if !defined(FreeBSDArchitecture) && (defined(UltrixArchitecture) || defined(AlphaArchitecture))
SpecialObjectRule(menus.o,NullParameter,-Olimit 700)
#endif
@@ -120,10 +120,10 @@ XCOMM rm -f $(BINDIR)/twm
XCOMM ln $(BINDIR)/tvtwm $(BINDIR)/twm
#if (ProjectX < 5)
-InstallNonExec(system.twmrc,$(TWMDIR))
+/* InstallNonExec(system.twmrc,$(TWMDIR))*/
/* InstallProgram(ssetroot,$(BINDIR)/xsetroot) */
#else
-InstallNonExecFile(system.twmrc,$(TWMDIR))
+/* InstallNonExecFile(system.twmrc,$(TWMDIR)) */
/* InstallNamedProg(ssetroot,xsetroot,$(BINDIR)) */
#endif

View file

@ -1,31 +0,0 @@
--- icons.c.orig 1995-02-03 00:37:34 UTC
+++ icons.c
@@ -233,10 +233,12 @@ int *final_x, *final_y;
*final_x = ie->x + (ie->w - iconWidth (tmp_win)) / 2;
*final_y = ie->y + (ie->h - iconHeight (tmp_win)) / 2;
} else {
+/*
if (tmp_win->root == Scr->VirtualDesktop) {
def_x += Scr->vdtPositionX;
def_y += Scr->vdtPositionY;
}
+*/
*final_x = def_x;
*final_y = def_y;
}
@@ -299,6 +301,7 @@ IconUp (tmp_win)
if (!ir) return; /* outside icon regions, leave alone */
}
+#ifdef NOTREACHED
defx = -100;
defy = -100;
PlaceIcon(tmp_win, defx, defy, &x, &y);
@@ -310,6 +313,7 @@ IconUp (tmp_win)
MoveIcon(tmp_win, x, y);
tmp_win->icon_moved = FALSE; /* since we've restored it */
}
+#endif
}
static IconEntry *

View file

@ -1,35 +0,0 @@
--- lex.l.orig 1993-03-10 20:57:51 UTC
+++ lex.l
@@ -43,6 +43,19 @@ extern char *ProgramName;
extern int ParseError;
+#undef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ { \
+ int res = (*twmInputFunc)(); \
+ if (res == NULL) \
+ result = YY_NULL; \
+ else \
+ { \
+ buf[0] = res; \
+ result = 1; \
+ } \
+ }
+
%}
string \"([^"]|\\.)*\"
@@ -98,10 +111,10 @@ yywrap() { return(1);}
#endif
#undef unput
-#undef input
+/*#undef input*/
#undef output
#undef feof
#define unput(c) twmUnput(c)
-#define input() (*twmInputFunc)()
+/*#define input() (*twmInputFunc)()*/
#define output(c) TwmOutput(c)
#define feof() (1)

View file

@ -1,88 +0,0 @@
--- menus.c.orig 1995-02-09 20:09:18 UTC
+++ menus.c
@@ -2674,14 +2674,20 @@ ExecuteFunction(func, action, sub, w, tm
if (DeferExecution(context, func, action, Scr->SelectCursor))
return TRUE;
- if (tmp_win->isicon || !tmp_win->mapped )
- {
+ if (tmp_win->isicon || !tmp_win->mapped ) {
DeIconify(tmp_win);
}
- else if (func == F_ICONIFY)
- {
- Iconify (tmp_win, eventp->xbutton.x_root - 5,
- eventp->xbutton.y_root - 5);
+ else if (func == F_ICONIFY) {
+ if ( tmp_win->root == Scr->VirtualDesktop ) {
+ Iconify (tmp_win,
+ eventp->xbutton.x_root - 5 + Scr->vdtPositionX,
+ eventp->xbutton.y_root - 5 + Scr->vdtPositionY
+ );
+ }
+ else {
+ Iconify (tmp_win, eventp->xbutton.x_root - 5,
+ eventp->xbutton.y_root - 5);
+ }
}
break;
@@ -3091,6 +3097,50 @@ ExecuteFunction(func, action, sub, w, tm
RelativeMove(tmp_win, action);
break;
+ case F_DUMPSTATE:
+ printf("doing dumpstate\n");
+ {
+ Window RootW;
+ Window root, parent, *children;
+ unsigned int nchildren;
+ unsigned int numscr;
+ unsigned int i;
+ unsigned int scr;
+
+ numscr = ScreenCount(dpy);
+ printf("# of screens: %d\n",numscr);
+ for(scr = 0; scr <= (numscr-1); scr++) {
+ RootW = RootWindow(dpy, scr);
+ printf("rootw: 0x%x\n",RootW);
+ XGrabServer(dpy);
+ XSync(dpy, 0);
+ XQueryTree(dpy, RootW, &root, &parent, &children, &nchildren);
+ for (i = 0; i < nchildren; i++) {
+ if (children[i]) {
+ XWMHints *wmhintsp = XGetWMHints (dpy, children[i]);
+ if (wmhintsp) {
+ if (wmhintsp->flags) {
+ printf("i: %d wmhints w: 0x%x flags: %d ",
+ i,children[i], wmhintsp->flags
+ );
+ if ( wmhintsp->flags & StateHint ) {
+ printf("state: %d ",
+ wmhintsp->initial_state);
+ }
+ printf("\n");
+ }
+ }
+ }
+ else {
+ printf(" NOT DEFINED\n");
+ }
+ }
+ }
+ XUngrabServer(dpy);
+ XFree(children);
+ }
+ break;
+
case F_QUIT:
Done();
break;
@@ -3188,6 +3238,7 @@ int func;
case F_DESTROY:
case F_DELETE:
case F_DELETEORDESTROY:
+ case F_DUMPSTATE:
case F_WINREFRESH:
case F_ZOOM:
case F_FULLZOOM:

View file

@ -1,27 +0,0 @@
--- parse.c.orig 1995-02-03 00:17:00 UTC
+++ parse.c
@@ -646,6 +646,7 @@ static TwmKeyword keytable[] = {
{ "f.deltastop", FKEYWORD, F_DELTASTOP },
{ "f.destroy", FKEYWORD, F_DESTROY },
{ "f.downiconmgr", FKEYWORD, F_DOWNICONMGR },
+ { "f.dumpstate", FKEYWORD, F_DUMPSTATE },
{ "f.exec", FSKEYWORD, F_EXEC },
{ "f.file", FSKEYWORD, F_FILE },
{ "f.focus", FKEYWORD, F_FOCUS },
@@ -1609,6 +1610,8 @@ do_squeeze_entry (list, name, type, just
}
}
+static char *m4_defs();
+
static FILE *start_m4(fraw)
FILE *fraw;
{
@@ -1627,7 +1630,6 @@ FILE *fraw;
if (fres == 0) {
extern Display *dpy;
extern char *display_name;
- static char *m4_defs();
char *tmp_file;
/* Child */

View file

@ -1,10 +0,0 @@
--- parse.h.orig 1993-12-01 21:01:13 UTC
+++ parse.h
@@ -102,6 +102,7 @@ extern void TwmOutput();
#define F_CONSTRAINEDMOVE 55
#define F_OPAQUEMOVE 56
#define F_DELETEORDESTROY 57
+#define F_DUMPSTATE 58
#define F_MENU 101 /* string */
#define F_WARPTO 102 /* string */

View file

@ -1,229 +0,0 @@
--- twm.c.orig 1995-02-03 00:14:17 UTC
+++ twm.c
@@ -185,6 +185,9 @@ static int RedirectError; /* TRUE ==> an
static int CatchRedirectError(); /* for settting RedirectError */
static int TwmErrorHandler(); /* for everything else */
static void SetRootProperties(); /* leave note on root window */
+static void DisplayHints(XSizeHints *); /* PI-FIX */
+static void calcgeo(Display *, Drawable, int *, int *, int *, int *); /* PI-FIX */
+
char Info[INFO_LINES][INFO_SIZE]; /* info strings to print */
int InfoLines;
char *InitFile = NULL;
@@ -248,6 +251,14 @@ main(argc, argv, environ)
int i, j, sync = FALSE;
unsigned long valuemask; /* mask for create windows */
XSetWindowAttributes attributes; /* attributes for create windows */
+/* PI-FIX */
+ XSizeHints mywmhints;
+ long mylong;
+ int res;
+ int minx = 0, miny = 0;
+ int *relx, *rely;
+ int rx, ry;
+/* PI-FIX */
int numManaged, firstscrn, lastscrn, scrnum;
extern ColormapWindow *CreateColormapWindow();
SIGNAL_T QueueRestartTwm();
@@ -629,6 +640,67 @@ main(argc, argv, environ)
Scr->iconmgr.twm_win->isicon = TRUE;
/*
+ * allocate some space for relx, rely values
+ */
+ relx = (int *) malloc(nchildren * sizeof(int));
+ rely = (int *) malloc(nchildren * sizeof(int));
+
+ /*
+ * print a lot of information for each children
+ */
+ for (i = 0; i < nchildren; i++) {
+ if (children[i]) {
+ XWMHints *wmhintsp = XGetWMHints (dpy, children[i]);
+
+#ifdef DEBUG
+ if (wmhintsp) {
+ if (wmhintsp->flags) {
+ printf(" wmhints i: %d w: 0x%x flags: %d ",
+ i,children[i], wmhintsp->flags
+ );
+ if ( wmhintsp->flags & StateHint ) {
+ printf("state: %d ",wmhintsp->initial_state);
+ }
+ printf("\n");
+ }
+ }
+ res = XGetWMNormalHints(dpy, children[i], &mywmhints, &mylong);
+ if (res != 0) {
+ DisplayHints(&mywmhints);
+ }
+ res = XGetWMSizeHints(dpy, children[i], &mywmhints, &mylong,
+ XA_WM_ZOOM_HINTS);
+ if ( res != 0 ) {
+ DisplayHints(&mywmhints);
+ }
+ else {
+ printf(" no zoom hints\n");
+ }
+#endif
+ calcgeo(dpy, children[i], &minx, &miny, &rx, &ry);
+ relx[i] = rx;
+ rely[i] = ry;
+ }
+ }
+
+#ifdef DEBUG
+ printf("minx: %d miny: %d\n", minx, miny);
+#endif
+
+ /*
+ * move each children in the positive
+ */
+ for (i = 0; i < nchildren; i++) {
+ if (children[i]) {
+ if ( children[i] != Scr->Panner &&
+ children[i] != Scr->VirtualDesktop) {
+ /* HACK: only relx gets corrected */
+ res = XMoveWindow(dpy, children[i], relx[i]-minx, rely[i]);
+ }
+ }
+ }
+
+ /*
* weed out icon windows
*/
for (i = 0; i < nchildren; i++) {
@@ -784,6 +856,7 @@ QueueRestartTwm()
{
XClientMessageEvent ev;
+printf("restart requested\n");
ev.type = ClientMessage;
ev.window = Scr->Root;
ev.message_type = _XA_TWM_RESTART;
@@ -1246,3 +1319,125 @@ InternUsefulAtoms ()
_XA_TWM_MACHINE = XInternAtom (dpy, "_TWM_MACHINE", False);
}
+
+/* stolen from xwininfo */
+/*
+ * Display a set of size hints
+ */
+static void
+DisplayHints(XSizeHints *hints)
+{
+ long flags;
+
+ flags = hints->flags;
+
+ if (flags & USPosition)
+ printf(" User supplied location: %d, %d\n",
+ hints->x, hints->y);
+
+ if (flags & PPosition)
+ printf(" Program supplied location: %d, %d\n",
+ hints->x, hints->y);
+
+ if (flags & USSize) {
+ printf(" User supplied size: %d by %d\n",
+ hints->width, hints->height);
+ }
+
+ if (flags & PSize)
+ printf(" Program supplied size: %d by %d\n",
+ hints->width, hints->height);
+
+ if (flags & PMinSize)
+ printf(" Program supplied minimum size: %d by %d\n",
+ hints->min_width, hints->min_height);
+
+ if (flags & PMaxSize)
+ printf(" Program supplied maximum size: %d by %d\n",
+ hints->max_width, hints->max_height);
+
+ if (flags & PBaseSize) {
+ printf(" Program supplied base size: %d by %d\n",
+ hints->base_width, hints->base_height);
+ }
+
+ if (flags & PResizeInc) {
+ printf(" Program supplied x resize increment: %d\n",
+ hints->width_inc);
+ printf(" Program supplied y resize increment: %d\n",
+ hints->height_inc);
+ if (hints->width_inc != 0 && hints->height_inc != 0) {
+ if (flags & USSize)
+ printf(" User supplied size in resize increments: %d/%d by %d/%d\n",
+ hints->width, hints->width_inc,
+ hints->height, hints->height_inc);
+ if (flags & PSize)
+ printf(" Program supplied size in resize increments: %d/%d by %d/%d\n",
+ hints->width, hints->width_inc,
+ hints->height, hints->height_inc);
+ if (flags & PMinSize)
+ printf(" Program supplied minimum size in resize increments: %d/%d by %d/%d\n",
+ hints->min_width, hints->width_inc,
+ hints->min_height, hints->height_inc);
+ if (flags & PBaseSize)
+ printf(" Program supplied base size in resize increments: %d/%d by %d/%d\n",
+ hints->base_width, hints->width_inc,
+ hints->base_height, hints->height_inc);
+ }
+ }
+
+ if (flags & PAspect) {
+ printf(" Program supplied min aspect ratio: %d/%d\n",
+ hints->min_aspect.x, hints->min_aspect.y);
+ printf(" Program supplied max aspect ratio: %d/%d\n",
+ hints->max_aspect.x, hints->max_aspect.y);
+ }
+
+ if (flags & PWinGravity) {
+ printf(" Program supplied window gravity: %d\n",
+ hints->win_gravity);
+ }
+}
+
+/* stolen from xwininfo */
+/*
+ * print geometry
+ */
+static void
+calcgeo(Display *dpy, Drawable d, int *minxp, int *minyp, int *rxp, int *ryp)
+{
+ int rel_x, rel_y, abs_x, abs_y;
+ unsigned int width, height, border, depth;
+ Window root;
+ Window child;
+
+ if (XGetGeometry(dpy, d, &root,
+ &rel_x, &rel_y, &width, &height, &border, &depth)) {
+
+#ifdef DEBUG
+ printf (" %ux%u+%d+%d", width, height, rel_x, rel_y);
+#endif
+ *rxp = rel_x;
+ *ryp = rel_y;
+#ifdef DEBUG
+ printf(" vorher min: %d %d", *minxp, *minyp);
+#endif
+ if ( *minxp > rel_x ) {
+ *minxp = rel_x;
+ }
+ if ( *minyp > rel_y ) {
+ *minyp = rel_y;
+ }
+#ifdef DEBUG
+ printf(" nachher min: %d %d\n", *minxp, *minyp);
+#endif
+ if (XTranslateCoordinates (dpy, d, root,
+ 0 ,0, &abs_x, &abs_y, &child)) {
+#ifdef DEBUG
+ printf (" +%d+%d\n", abs_x - border, abs_y - border);
+#endif
+ }
+ }
+
+}
+

View file

@ -1,4 +0,0 @@
tvtwm is a version of twm which incorporates virtual desktops, similar
to vtwm and swm. It is nearly identical to twm until you specify a
virtual desktop size in your .[tv]twmrc file, which is when you start
getting the benefits of this window manager.