pkgsrc/wm/tvtwm/patches/patch-ap

111 lines
3.4 KiB
Text

$NetBSD: patch-ap,v 1.2 2004/09/18 11:59:06 blymn Exp $
--- move.c.orig 1994-05-12 08:28:47.000000000 +0930
+++ move.c
@@ -34,11 +34,6 @@
*
**********************************************************************/
-#if !defined(lint) && !defined(SABER)
-static char RCSinfo[]=
-"$XConsortium: move.c,v 1.140 90/03/23 11:42:33 jim Exp $";
-#endif
-
#include <stdio.h>
#include <X11/X.h>
#include <X11/Xatom.h>
@@ -70,7 +65,8 @@ static int doingMove = False;
static void reallyStartMove();
static void doMove();
-static void getPointer();
+static void getPointer(int *x_root, int *y_root, int *cancel, int *done,
+ int *first, int adding, int pulldown);
/***********************************************************************
*
@@ -165,11 +161,9 @@ int adding; /* adding a window from add
int pulldown; /* moving window from a pulldown menu */
{
Window junkRoot, junkChild;
- unsigned int junkDepth, numChildren;
+ unsigned int junkDepth;
int junkX, junkY;
- int junkxroot, junkyroot;
Bool old_save_under;
- unsigned int junkMask;
int first;
XSetWindowAttributes attr;
XWindowAttributes wattr;
@@ -338,7 +332,7 @@ int panner;
XRaiseWindow(dpy, window);
while (True) {
- getPointer(outlineWindow, x_root, y_root, cancel, &done, first, adding, pulldown);
+ getPointer(/*outlineWindow,*/ x_root, y_root, cancel, &done, first, adding, pulldown);
if (done) {
doMove(tmp_win, window, *x_root, *y_root, &xdest, &ydest, panner, False);
break;
@@ -363,9 +357,8 @@ int panner;
int paint;
{
int xl, yt;
- int deltax, deltay;
+/* int deltax, deltay;*/
int vdtx, vdty;
- char str[20];
Window actual, virtual;
dragX = x_root;
@@ -374,8 +367,8 @@ int paint;
xl = dragX + diffX;
yt = dragY + diffY;
- deltax = xl - origX/scale;
- deltay = yt - origY/scale;
+/* deltax = xl - origX/scale;
+ deltay = yt - origY/scale;*/
if (MoveFunction != F_FORCEMOVE && Scr->DontMoveOff && outlineWindow != Scr->Panner) {
if (tmp_win->root == Scr->VirtualDesktop || tmp_win->root == Scr->Panner) {
@@ -438,8 +431,8 @@ int paint;
}
static void
-getPointer(window, x_root, y_root, cancel, done, first, adding, pulldown)
-Window window;
+getPointer(/*window,*/ x_root, y_root, cancel, done, first, adding, pulldown)
+/*Window window;*/
int *x_root;
int *y_root;
int *cancel;
@@ -448,11 +441,9 @@ int *first;
int adding;
int pulldown;
{
- Window junkChild;
int doingFine;
XEvent event,bakevent;
- int xdest, ydest;
unsigned mask;
static int buttons;
@@ -521,7 +512,7 @@ int pulldown;
}
break;
case EnterNotify:
- if (doingMove && event.xcrossing.window == Scr->Panner && event.xcrossing.detail != NotifyInferior)
+ if (doingMove && Scr != NULL && event.xcrossing.window == Scr->Panner && event.xcrossing.detail != NotifyInferior)
{
MoveOutline(outlineWindow, 0,0,0,0,0,0);
*cancel = IN_PANNER;
@@ -530,7 +521,7 @@ int pulldown;
}
break;
case LeaveNotify:
- if (doingMove && event.xcrossing.window == Scr->Panner &&
+ if (doingMove && Scr != NULL && event.xcrossing.window == Scr->Panner &&
event.xcrossing.detail != NotifyInferior && event.xcrossing.mode == NotifyNormal)
{
MoveOutline(outlineWindow, 0,0,0,0,0,0);