mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtprintinfo: Use 64-bit values for XtVaGetValues() pointers
XtArgVal should be a type that encompasses XtPointer and long integer types. In the X.org implementation it is currently defined as (long). Don't use (unsigned int *) instead of (Window *).
This commit is contained in:
parent
fc0f1ff697
commit
df1da3432e
3 changed files with 10 additions and 6 deletions
|
@ -55,9 +55,11 @@ DtDetailsLabel::DtDetailsLabel(MotifUI *parent)
|
||||||
MESSAGE(JobNumberL), MESSAGE(TimeL), MESSAGE(DateL));
|
MESSAGE(JobNumberL), MESSAGE(TimeL), MESSAGE(DateL));
|
||||||
bottom_label[1] = StringCreate(label);
|
bottom_label[1] = StringCreate(label);
|
||||||
|
|
||||||
|
XtArgVal arg;
|
||||||
Dimension highlight;
|
Dimension highlight;
|
||||||
XtVaGetValues(parent->BaseWidget(),
|
XtVaGetValues(parent->BaseWidget(),
|
||||||
XmNhighlightThickness, &highlight, NULL);
|
XmNhighlightThickness, &arg, NULL);
|
||||||
|
highlight = (Dimension)arg;
|
||||||
int height = 21 + 2 * highlight;
|
int height = 21 + 2 * highlight;
|
||||||
blank_pixmap = XCreatePixmap(display, root, 1, height, depth);
|
blank_pixmap = XCreatePixmap(display, root, 1, height, depth);
|
||||||
blank_mask = XCreatePixmap(display, root, 1, height, 1);
|
blank_mask = XCreatePixmap(display, root, 1, height, 1);
|
||||||
|
@ -73,7 +75,7 @@ DtDetailsLabel::DtDetailsLabel(MotifUI *parent)
|
||||||
XmString top_string = StringCreate(MESSAGE(Position1L));
|
XmString top_string = StringCreate(MESSAGE(Position1L));
|
||||||
XmString label_string = StringCreate(MESSAGE(JobNameL));
|
XmString label_string = StringCreate(MESSAGE(JobNameL));
|
||||||
Widget p = XtParent(parent->BaseWidget());
|
Widget p = XtParent(parent->BaseWidget());
|
||||||
Pixel bg;
|
XtArgVal bg;
|
||||||
XtVaGetValues(p, XmNbackground, &bg, NULL);
|
XtVaGetValues(p, XmNbackground, &bg, NULL);
|
||||||
_w = XtVaCreateManagedWidget("DtDetailsLabel", iconWidgetClass, p,
|
_w = XtVaCreateManagedWidget("DtDetailsLabel", iconWidgetClass, p,
|
||||||
GuiNsuperNode, parent->BaseWidget(),
|
GuiNsuperNode, parent->BaseWidget(),
|
||||||
|
|
|
@ -191,6 +191,7 @@ void DtDND::GetDragPixmaps()
|
||||||
|
|
||||||
Dimension height, width;
|
Dimension height, width;
|
||||||
unsigned int w, h, junk;
|
unsigned int w, h, junk;
|
||||||
|
Window junkwin;
|
||||||
|
|
||||||
XtVaGetValues(icon->BaseWidget(), XmNbackground, &bg, XmNforeground, &fg,
|
XtVaGetValues(icon->BaseWidget(), XmNbackground, &bg, XmNforeground, &fg,
|
||||||
GuiNselectColor, &selectColor, XmNalignment, &alignment,
|
GuiNselectColor, &selectColor, XmNalignment, &alignment,
|
||||||
|
@ -219,7 +220,7 @@ void DtDND::GetDragPixmaps()
|
||||||
icon->GetPixmaps(icon->BaseWidget(), iconFile, &tmp_pixmap, &tmp_mask);
|
icon->GetPixmaps(icon->BaseWidget(), iconFile, &tmp_pixmap, &tmp_mask);
|
||||||
if (tmp_pixmap && tmp_pixmap != XmUNSPECIFIED_PIXMAP)
|
if (tmp_pixmap && tmp_pixmap != XmUNSPECIFIED_PIXMAP)
|
||||||
{
|
{
|
||||||
XGetGeometry(icon->display, tmp_pixmap, (Window *) &junk,
|
XGetGeometry(icon->display, tmp_pixmap, &junkwin,
|
||||||
(int *) &junk, (int *) &junk, &w, &h, &junk, &junk);
|
(int *) &junk, (int *) &junk, &w, &h, &junk, &junk);
|
||||||
p_w = w;
|
p_w = w;
|
||||||
p_h = h;
|
p_h = h;
|
||||||
|
|
|
@ -454,7 +454,7 @@ IconClassRec iconClassRec =
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
/* icon_class record */
|
/* icon_class record */
|
||||||
(int) NULL, /* extension */
|
0, /* extension */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1052,6 +1052,7 @@ CalculateSize(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
unsigned int width, height, junk;
|
unsigned int width, height, junk;
|
||||||
|
Window junkwin;
|
||||||
int x, y;
|
int x, y;
|
||||||
Boolean show_fields = False;
|
Boolean show_fields = False;
|
||||||
Dimension _width;
|
Dimension _width;
|
||||||
|
@ -1060,7 +1061,7 @@ CalculateSize(
|
||||||
{
|
{
|
||||||
if (Pixmap(w) != XmUNSPECIFIED_PIXMAP)
|
if (Pixmap(w) != XmUNSPECIFIED_PIXMAP)
|
||||||
{
|
{
|
||||||
XGetGeometry(XtDisplay(w), Pixmap(w), (Window *) &junk,
|
XGetGeometry(XtDisplay(w), Pixmap(w), &junkwin,
|
||||||
(int *) &junk, (int *) &junk, &width, &height, &junk, &junk);
|
(int *) &junk, (int *) &junk, &width, &height, &junk, &junk);
|
||||||
PixmapWidth(w) = (Dimension) width;
|
PixmapWidth(w) = (Dimension) width;
|
||||||
PixmapHeight(w) = (Dimension) height;
|
PixmapHeight(w) = (Dimension) height;
|
||||||
|
@ -1361,7 +1362,7 @@ CalculateSize(
|
||||||
{
|
{
|
||||||
Dimension x_offset, y_offset;
|
Dimension x_offset, y_offset;
|
||||||
|
|
||||||
XGetGeometry(XtDisplay(w), StatePixmap(w), (Window *) &junk,
|
XGetGeometry(XtDisplay(w), StatePixmap(w), &junkwin,
|
||||||
(int *) &junk, (int *) &junk, &width, &height, &junk, &junk);
|
(int *) &junk, (int *) &junk, &width, &height, &junk, &junk);
|
||||||
StatePixmapWidth(w) = (Dimension) width;
|
StatePixmapWidth(w) = (Dimension) width;
|
||||||
StatePixmapHeight(w) = (Dimension) height;
|
StatePixmapHeight(w) = (Dimension) height;
|
||||||
|
|
Loading…
Reference in a new issue