summaryrefslogtreecommitdiff
path: root/lang/modula-3-lib/files/patch-br
blob: 75872c65803bbcad0518e5cf4183052471453838 (plain) (blame)
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
This fixes a couple of problems in the setting of the WM_NORMAL_HINTS
window manager property.

The flags were set indicating that the width, height, x, and y fields
were valid, but these fields in fact contained garbage.  Since the
fields are obsolete now (starting with X11R5), I simply removed the
code that set the corresponding flags.

Also, the base_width, base_height, width_inc, and height_inc fields
were not set.  This caused the window manager to display incorrect
values for window size while resizing it.

I have sent this patch to DEC SRC.

Index: m3/ui/src/xvbt/XClient.m3
--- XClient.m3.orig	Mon Mar  6 17:44:15 1995
+++ XClient.m3	Mon Jul 28 13:45:30 1997
@@ -520,7 +520,7 @@
       BEGIN
         ur.sh := sh;
         ur.sv := sv;
-        SetSizeHints(xSizeHints, width, height, sh, sv, st, userPosition);
+        SetSizeHints(xSizeHints, width, height, sh, sv, st);
       END;
       xwa.border_pixel := 0;
       xwa.bit_gravity := X.NorthWestGravity;
@@ -1080,19 +1080,17 @@
 PROCEDURE SetSizeHints (VAR      xhints       : X.XSizeHints;
                         VAR      width, height: CARDINAL;
                         READONLY sh, sv       : VBT.SizeRange;
-                                 st           : XScreenType.T;
-                                 userPosition : BOOLEAN        ) =
+                                 st           : XScreenType.T  ) =
   BEGIN
     IF sv.hi < VBT.DefaultShape.hi OR sh.hi < VBT.DefaultShape.hi THEN
-      xhints.flags := X.PMinSize + X.PMaxSize
+      xhints.flags := X.PMinSize + X.PMaxSize + X.PResizeInc + X.PBaseSize
     ELSE
-      xhints.flags := X.PMinSize
-    END;
-    IF userPosition THEN
-      INC(xhints.flags, X.USPosition + X.USSize)
-    ELSE
-      INC(xhints.flags, X.PPosition + X.PSize)
+      xhints.flags := X.PMinSize + X.PResizeInc + X.PBaseSize
     END;
+    xhints.base_width := 0;
+    xhints.base_height := 0;
+    xhints.width_inc := 1;
+    xhints.height_inc := 1;
     xhints.min_width := sh.lo;
     xhints.max_width :=
       MAX(MIN(sh.hi - 1, Rect.HorSize(st.rootDom)), sh.lo);
@@ -1125,7 +1123,7 @@
     sh                                  := s[Axis.T.Hor];
     sv                                  := s[Axis.T.Ver];
   BEGIN
-    SetSizeHints(xhints, width, height, sh, sv, st, ur.userPosition);
+    SetSizeHints(xhints, width, height, sh, sv, st);
     TRY
       Enter(v);
       TRY