summaryrefslogtreecommitdiff
path: root/wm/tvtwm/patches/patch-ap
blob: 532ef839eeba5d99ba6363570ed9d50a121218d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
$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);