Mercurial > hg > xemacs-beta
diff src/input-method-xlib.c @ 5118:e0db3c197671 ben-lisp-object
merge up to latest default branch, doesn't compile yet
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 26 Dec 2009 21:18:49 -0600 |
parents | 3a87551bfeb5 |
children | 0ca81354c4c7 |
line wrap: on
line diff
--- a/src/input-method-xlib.c Sat Dec 26 00:20:27 2009 -0600 +++ b/src/input-method-xlib.c Sat Dec 26 21:18:49 2009 -0600 @@ -286,19 +286,19 @@ xic_vars_t xic_vars; XIC xic; -#define res(name, class_, representation, field, default_value) \ - { name, class_, representation, sizeof(xic_vars.field), \ - XtOffsetOf(xic_vars_t, field), XtRString, default_value } +#define res(name, class_, representation, field, default_value) \ + Xt_RESOURCE (name, class_, representation, xic_vars.field, \ + XtOffsetOf(xic_vars_t, field), XtRString, default_value) static XtResource resources[] = { /* name class represent'n field default value */ - res(XtNximStyles, XtCXimStyles, XtRXimStyles, styles, (XtPointer) DefaultXIMStyles), - res(XtNfontSet, XtCFontSet, XtRFontSet, fontset, (XtPointer) XtDefaultFontSet), - res(XtNximForeground, XtCForeground, XtRPixel, fg, (XtPointer) XtDefaultForeground), - res(XtNximBackground, XtCBackground, XtRPixel, bg, (XtPointer) XtDefaultBackground) + res(XtNximStyles, XtCXimStyles, XtRXimStyles, styles, DefaultXIMStyles), + res(XtNfontSet, XtCFontSet, XtRFontSet, fontset, XtDefaultFontSet), + res(XtNximForeground, XtCForeground, XtRPixel, fg, XtDefaultForeground), + res(XtNximBackground, XtCBackground, XtRPixel, bg, XtDefaultBackground) }; - +#undef res xim = DEVICE_X_XIM (d); @@ -384,13 +384,18 @@ void XIM_SetGeometry (struct frame *f) { - XIC xic = FRAME_X_XIC (f); - XIMStyle style = FRAME_X_XIC_STYLE (f); + XIC xic; + XIMStyle style; XRectangle area; - if (!xic || !f) + if (!f) return; + xic = FRAME_X_XIC (f); + if (!xic) + return; + + style = FRAME_X_XIC_STYLE (f); if (style & XIMStatusArea) { /* Place Status Area in bottom right corner */ @@ -708,7 +713,7 @@ if (converter_data) { - Boolean free_p = (Boolean) (int) converter_data; + Boolean free_p = (Boolean) (EMACS_INT) converter_data; XIMStyles *styles = (XIMStyles *) toVal->addr; if (free_p) XFree ( styles->supported_styles ); @@ -890,7 +895,8 @@ char xwincmd[128]; sprintf (xwincmd, "xwininfo -id 0x%x >&2; xwininfo -events -id 0x%x >&2", (int) win, (int) win); - system (xwincmd); + if (system (xwincmd) == -1) + stderr_out ("Unable to execute xwininfo\n"); } void @@ -972,7 +978,7 @@ } void -describe_XRectangle (char *name, XRectangle *r) +describe_XRectangle (const char *name, XRectangle *r) { if (r == NULL) stderr_out ("%s: NULL\n", name);