~cmiller/ubuntu/trusty/icewm/translations-cause-crash-lp447883

« back to all changes in this revision

Viewing changes to src/ypaint.cc

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2009-01-26 00:18:14 UTC
  • mfrom: (1.3.1 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090126001814-ea5ceoy4uroruz72
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
    if (Success == XAllocColor(xapp->display(), xapp->colormap(), &color))
100
100
    {
101
101
        int j, ncells;
102
 
        double long d = 65536. * 65536. * 65536. * 24;
 
102
        double d = 65536. * 65536. * 24;
103
103
        XColor clr;
104
104
        unsigned long pix;
105
105
        long d_red, d_green, d_blue;
106
 
        double long u_red, u_green, u_blue;
 
106
        double u_red, u_green, u_blue;
107
107
 
108
108
        pix = 0xFFFFFFFF;
109
109
        ncells = DisplayCells(xapp->display(), DefaultScreen(xapp->display()));
134
134
                   clr.red, clr.blue, clr.green));*/
135
135
            color = clr;
136
136
        }
137
 
        if (XAllocColor(xapp->display(), xapp->colormap(), &color) == 0)
 
137
        if (XAllocColor(xapp->display(), xapp->colormap(), &color) == 0) {
138
138
            if (color.red + color.green + color.blue >= 32768)
139
139
                color.pixel = WhitePixel(xapp->display(),
140
140
                                         DefaultScreen(xapp->display()));
141
141
            else
142
142
                color.pixel = BlackPixel(xapp->display(),
143
143
                                         DefaultScreen(xapp->display()));
 
144
        }
144
145
    }
145
146
    fRed = color.red;
146
147
    fGreen = color.green;