#undef USG /* ####KLUDGE for Solaris 2.2 and up */
#include <X11/Xos.h>
#define USG
+#ifdef USG /* Pacify gcc -Wunused-macros. */
+#endif
#else
#include <X11/Xos.h>
#endif
struct terminal *t = get_terminal (object, 1);
if (t->type != output_x_window)
- error ("Terminal %"pEd" is not an X display", XINT (object));
+ error ("Terminal %"pI"d is not an X display", XINT (object));
dpyinfo = t->display_info.x;
}
void
x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
{
- int win_x, win_y, outer_x, outer_y;
+ int win_x, win_y, outer_x IF_LINT (= 0), outer_y IF_LINT (= 0);
int real_x = 0, real_y = 0;
int had_errors = 0;
Window win = f->output_data.x->parent_desc;
x_set_scroll_bar_default_width (struct frame *f)
{
int wid = FRAME_COLUMN_WIDTH (f);
-
+ int minw = 16;
+ int width;
#ifdef USE_TOOLKIT_SCROLL_BARS
+#ifdef USE_GTK
+ minw = xg_get_default_scrollbar_width (f);
+#endif
/* A minimum width of 14 doesn't look good for toolkit scroll bars. */
- int width = 16 + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
+ width = minw + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (width + wid - 1) / wid;
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = width;
#else
{
int len;
char *tem, shell_position[32];
- Arg al[10];
- int ac = 0;
+ Arg gal[10];
+ int gac = 0;
int extra_borders = 0;
int menubar_size
= (f->output_data.x->menubar_widget
If Emacs had just one program position, we could set it in
fallback resources, but since each make-frame call can specify
different program positions, this is easier. */
- XtSetArg (al[ac], XtNx, left); ac++;
- XtSetArg (al[ac], XtNy, top); ac++;
+ XtSetArg (gal[gac], XtNx, left); gac++;
+ XtSetArg (gal[gac], XtNy, top); gac++;
}
}
when the frame is deleted. */
tem = (char *) xmalloc (len);
strncpy (tem, shell_position, len);
- XtSetArg (al[ac], XtNgeometry, tem); ac++;
- XtSetValues (shell_widget, al, ac);
+ XtSetArg (gal[gac], XtNgeometry, tem); gac++;
+ XtSetValues (shell_widget, gal, gac);
}
XtManageChild (pane_widget);
if (! NILP (source))
{
- if (NUMBERP (source))
- {
- if (FLOATP (source))
- target_window = (Window) XFLOAT (source);
- else
- target_window = XFASTINT (source);
-
- if (target_window == 0)
- target_window = FRAME_X_DISPLAY_INFO (f)->root_window;
- }
- else if (CONSP (source))
- target_window = cons_to_long (source);
+ CONS_TO_INTEGER (source, Window, target_window);
+ if (! target_window)
+ target_window = FRAME_X_DISPLAY_INFO (f)->root_window;
}
BLOCK_INPUT;
property and those are indeed in 32 bit quantities if format is
32. */
- if (actual_format == 32 && actual_format < BITS_PER_LONG)
+ if (32 < BITS_PER_LONG && actual_format == 32)
{
unsigned long i;
int *idata = (int *) tmp_data;
int count;
Lisp_Object deleted, frame, timer;
struct gcpro gcpro1, gcpro2;
- struct frame *f;
/* Return quickly if nothing to do. */
if (NILP (tip_timer) && NILP (tip_frame))
call1 (Qcancel_timer, timer);
#ifdef USE_GTK
- /* When using system tooltip, tip_frame is the Emacs frame on which
- the tip is shown. */
- f = XFRAME (frame);
- if (FRAME_LIVE_P (f) && xg_hide_tooltip (f))
- frame = Qnil;
+ {
+ /* When using system tooltip, tip_frame is the Emacs frame on which
+ the tip is shown. */
+ struct frame *f = XFRAME (frame);
+ if (FRAME_LIVE_P (f) && xg_hide_tooltip (f))
+ frame = Qnil;
+ }
#endif
if (FRAMEP (frame))
items is unmapped. Redisplay the menu manually... */
{
Widget w;
- f = SELECTED_FRAME ();
+ struct frame *f = SELECTED_FRAME ();
w = f->output_data.x->menubar_widget;
if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen)
/* Get the result. */
if (result == XmCR_OK)
{
- XmString text;
+ XmString text_string;
String data;
- XtVaGetValues (dialog, XmNtextString, &text, NULL);
- XmStringGetLtoR (text, XmFONTLIST_DEFAULT_TAG, &data);
- XmStringFree (text);
+ XtVaGetValues (dialog, XmNtextString, &text_string, NULL);
+ XmStringGetLtoR (text_string, XmFONTLIST_DEFAULT_TAG, &data);
+ XmStringFree (text_string);
file = build_string (data);
XtFree (data);
}