of S to the right of that box line. */
if (s->face->box != FACE_NO_BOX
&& s->first_glyph->left_box_line_p)
- x = s->x + abs (s->face->box_line_width);
+ x = s->x + eabs (s->face->box_line_width);
else
x = s->x;
of S to the right of that box line. */
if (s->face && s->face->box != FACE_NO_BOX
&& s->first_glyph->left_box_line_p)
- x = s->x + abs (s->face->box_line_width);
+ x = s->x + eabs (s->face->box_line_width);
else
x = s->x;
? s->first_glyph
: s->first_glyph + s->nchars - 1);
- width = abs (s->face->box_line_width);
+ width = eabs (s->face->box_line_width);
raised_p = s->face->box == FACE_RAISED_BOX;
left_x = s->x;
right_x = (s->row->full_width_p && s->extends_to_end_of_line_p
if (s->face->box != FACE_NO_BOX
&& s->first_glyph->left_box_line_p
&& s->slice.x == 0)
- x += abs (s->face->box_line_width);
+ x += eabs (s->face->box_line_width);
/* If there is a margin around the image, adjust x- and y-position
by that margin. */
if (s->face->box != FACE_NO_BOX
&& s->first_glyph->left_box_line_p
&& s->slice.x == 0)
- x += abs (s->face->box_line_width);
+ x += eabs (s->face->box_line_width);
/* If there is a margin around the image, adjust x- and y-position
by that margin. */
}
else
{
- thick = abs (s->img->relief);
+ thick = eabs (s->img->relief);
raised_p = s->img->relief > 0;
}
if (s->face->box != FACE_NO_BOX
&& s->first_glyph->left_box_line_p
&& s->slice.x == 0)
- x += abs (s->face->box_line_width);
+ x += eabs (s->face->box_line_width);
/* If there is a margin around the image, adjust x- and y-position
by that margin. */
x_draw_image_glyph_string (s)
struct glyph_string *s;
{
- int box_line_hwidth = abs (s->face->box_line_width);
+ int box_line_hwidth = eabs (s->face->box_line_width);
int box_line_vwidth = max (s->face->box_line_width, 0);
int height;
Pixmap pixmap = None;
struct glyph_string *s;
{
xassert (s->first_glyph->type == STRETCH_GLYPH);
- s->stippled_p = s->face->stipple != 0;
if (s->hl == DRAW_CURSOR
&& !x_stretch_cursor_p)
dpyinfo->super_mod_mask = 0;
dpyinfo->hyper_mod_mask = 0;
-#ifdef HAVE_X11R4
XDisplayKeycodes (dpyinfo->display, &min_code, &max_code);
-#else
- min_code = dpyinfo->display->min_keycode;
- max_code = dpyinfo->display->max_keycode;
-#endif
syms = XGetKeyboardMapping (dpyinfo->display,
min_code, max_code - min_code + 1,
whole = 10000000;
portion = shown < 1 ? top * whole : 0;
- if (shown < 1 && (abs (top + shown - 1) < 1.0/height))
+ if (shown < 1 && (eabs (top + shown - 1) < 1.0/height))
/* Some derivatives of Xaw refuse to shrink the thumb when you reach
the bottom, so we force the scrolling whenever we see that we're
too close to the bottom (in x_set_toolkit_scroll_bar_thumb
XtVaGetValues (widget, XtNheight, &height, NULL);
UNBLOCK_INPUT;
- if (abs (position) >= height)
+ if (eabs (position) >= height)
part = (position < 0) ? scroll_bar_above_handle : scroll_bar_below_handle;
/* If Xaw3d was compiled with ARROW_SCROLLBAR,
it maps line-movement to call_data = max(5, height/20). */
- else if (xaw3d_arrow_scroll && abs (position) <= max (5, height / 20))
+ else if (xaw3d_arrow_scroll && eabs (position) <= max (5, height / 20))
part = (position < 0) ? scroll_bar_up_arrow : scroll_bar_down_arrow;
else
part = scroll_bar_move_ratio;
|| (orig_keysym & (1 << 28))
|| (keysym != NoSymbol && nbytes == 0))
&& ! (IsModifierKey (orig_keysym)
-#ifndef HAVE_X11R5
-#ifdef XK_Mode_switch
- || ((unsigned)(orig_keysym) == XK_Mode_switch)
-#endif
-#ifdef XK_Num_Lock
- || ((unsigned)(orig_keysym) == XK_Num_Lock)
-#endif
-#endif /* not HAVE_X11R5 */
/* The symbols from XK_ISO_Lock
to XK_ISO_Last_Group_Lock
don't have real modifiers but
if (FRAME_X_WINDOW (f) == 0)
return 1;
-#ifdef HAVE_X11R4
{
XTextProperty text;
text.value = (unsigned char *) icon_name;
text.nitems = strlen (icon_name);
XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
}
-#else /* not HAVE_X11R4 */
- XSetIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), icon_name);
-#endif /* not HAVE_X11R4 */
if (f->output_data.x->icon_bitmap > 0)
x_destroy_bitmap (f, f->output_data.x->icon_bitmap);
/* The left fuzz-factor is 10 pixels. The top fuzz-factor is 40
pixels. */
- if (abs (current_left - left) <= 10 && abs (current_top - top) <= 40)
+ if (eabs (current_left - left) <= 10
+ && eabs (current_top - top) <= 40)
return;
}
else if (current_left == left && current_top == top)
else
#endif
{
-#ifdef HAVE_X11R4
if (! XWithdrawWindow (FRAME_X_DISPLAY (f), window,
DefaultScreen (FRAME_X_DISPLAY (f))))
UNBLOCK_INPUT_RESIGNAL;
error ("Can't notify window manager of window withdrawal");
}
-#else /* ! defined (HAVE_X11R4) */
-
- /* Tell the window manager what we're going to do. */
- if (! EQ (Vx_no_window_manager, Qt))
- {
- XEvent unmap;
-
- unmap.xunmap.type = UnmapNotify;
- unmap.xunmap.window = window;
- unmap.xunmap.event = DefaultRootWindow (FRAME_X_DISPLAY (f));
- unmap.xunmap.from_configure = False;
- if (! XSendEvent (FRAME_X_DISPLAY (f),
- DefaultRootWindow (FRAME_X_DISPLAY (f)),
- False,
- SubstructureRedirectMaskSubstructureNotifyMask,
- &unmap))
- {
- UNBLOCK_INPUT_RESIGNAL;
- error ("Can't notify window manager of withdrawal");
- }
- }
-
- /* Unmap the window ourselves. Cheeky! */
- XUnmapWindow (FRAME_X_DISPLAY (f), window);
-#endif /* ! defined (HAVE_X11R4) */
}
/* We can't distinguish this from iconification
them; otherwise, we set the min_width and min_height members
to the size for a zero x zero frame. */
-#ifdef HAVE_X11R4
size_hints.flags |= PBaseSize;
size_hints.base_width = base_width;
size_hints.base_height = base_height;
size_hints.min_width = base_width + min_cols * size_hints.width_inc;
size_hints.min_height = base_height + min_rows * size_hints.height_inc;
-#else
- size_hints.min_width = base_width;
- size_hints.min_height = base_height;
-#endif
}
/* If we don't need the old flags, we don't need the old hint at all. */
long supplied_return;
int value;
-#ifdef HAVE_X11R4
value = XGetWMNormalHints (FRAME_X_DISPLAY (f), window, &hints,
&supplied_return);
-#else
- value = XGetNormalHints (FRAME_X_DISPLAY (f), window, &hints);
-#endif
#ifdef USE_X_TOOLKIT
size_hints.base_height = hints.base_height;
}
#endif /* PWinGravity */
-#ifdef HAVE_X11R4
XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
-#else
- XSetNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
-#endif
}
#endif /* not USE_GTK */
argv[argc++] = "--name";
argv[argc++] = resource_name;
-#ifdef HAVE_X11R5
XSetLocaleModifiers ("");
-#endif
gtk_init (&argc, &argv2);
}
#else /* not USE_X_TOOLKIT */
-#ifdef HAVE_X11R5
XSetLocaleModifiers ("");
-#endif
dpy = XOpenDisplay (SDATA (display_name));
#endif /* not USE_X_TOOLKIT */
#endif /* not USE_GTK*/
{
terminal->kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (terminal->kboard);
+ terminal->kboard->Vwindow_system = intern ("x");
if (!EQ (XSYMBOL (Qvendor_specific_keysyms)->function, Qunbound))
{
char *vendor = ServerVendor (dpy);
#endif /* ! defined (SIGIO) */
#ifdef USE_LUCID
-#ifdef HAVE_X11R5 /* It seems X11R4 lacks XtCvtStringToFont, and XPointer. */
- /* Make sure that we have a valid font for dialog boxes
- so that Xt does not crash. */
{
Display *dpy = dpyinfo->display;
XrmValue d, fr, to;
XrmPutLineResource (&xrdb, "Emacs.dialog.*.font: 9x15");
x_uncatch_errors ();
}
-#endif
#endif
/* See if we should run in synchronous mode. This is useful