~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to src/WMGeom.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-17 16:34:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090117163454-gaey3cd32xyavueo
Tags: 2:1.1.99.2-1build1
Fakesync with Debian, all previous Ubuntu changes are included
in the new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
     * Get the base sizes and increments.  Section 4.1.2.3 of the ICCCM
75
75
     * states that the base and minimum sizes are defaults for each other.
76
76
     * If neither is given, then the base sizes should be 0.  These parameters
77
 
     * control the sets of sizes that window managers should allow for the 
 
77
     * control the sets of sizes that window managers should allow for the
78
78
     * window according to the following formulae:
79
79
     *
80
80
     *          width = base_width  + (i * width_inc)
81
81
     *         height = base_height + (j * height_inc)
82
82
     */
83
 
    base_width =  ((hints->flags & PBaseSize) ? hints->base_width : 
 
83
    base_width =  ((hints->flags & PBaseSize) ? hints->base_width :
84
84
                   ((hints->flags & PMinSize) ? hints->min_width : 0));
85
85
    base_height = ((hints->flags & PBaseSize) ? hints->base_height :
86
86
                   ((hints->flags & PMinSize) ? hints->min_height : 0));
105
105
     *     4.  multiply by the size increment
106
106
     *     5.  and add to the base size
107
107
     */
108
 
    rwidth = ((((umask & WidthValue) ? uwidth : 
 
108
    rwidth = ((((umask & WidthValue) ? uwidth :
109
109
                ((dmask & WidthValue) ? dwidth : 1)) * width_inc) +
110
110
              base_width);
111
 
    rheight = ((((umask & HeightValue) ? uheight : 
112
 
                 ((dmask & HeightValue) ? dheight : 1)) * height_inc) + 
 
111
    rheight = ((((umask & HeightValue) ? uheight :
 
112
                 ((dmask & HeightValue) ? dheight : 1)) * height_inc) +
113
113
               base_height);
114
114
 
115
115
    /*
137
137
        if (dmask & XNegative) {
138
138
            rx = (DisplayWidth (dpy, screen) + dx - rwidth - 2 * bwidth);
139
139
            rmask |= XNegative;
140
 
        } else 
 
140
        } else
141
141
          rx = dx;
142
142
    } else {
143
143
        rx = 0;                         /* gotta choose something... */
150
150
        if (dmask & YNegative) {
151
151
            ry = (DisplayHeight(dpy, screen) + dy - rheight - 2 * bwidth);
152
152
            rmask |= YNegative;
153
 
        } else 
 
153
        } else
154
154
          ry = dy;
155
155
    } else {
156
156
        ry = 0;                         /* gotta choose something... */