]> code.delx.au - gnu-emacs/blobdiff - src/xterm.c
* nsfns.m (Fns_do_applescript): Run event loop until script has
[gnu-emacs] / src / xterm.c
index b6bd9e9655a0b1882d397bfaffd34fab8ca2e5ae..374b62874587b765edf10024f64966a7c2babcef 100644 (file)
@@ -2258,7 +2258,6 @@ static void
 x_draw_image_relief (struct glyph_string *s)
 {
   int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p;
-  int extra_x, extra_y;
   XRectangle r;
   int x = s->x;
   int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
@@ -2289,20 +2288,6 @@ x_draw_image_relief (struct glyph_string *s)
       raised_p = s->img->relief > 0;
     }
 
-  extra_x = extra_y = 0;
-  if (s->face->id == TOOL_BAR_FACE_ID)
-    {
-      if (CONSP (Vtool_bar_button_margin)
-         && INTEGERP (XCAR (Vtool_bar_button_margin))
-         && INTEGERP (XCDR (Vtool_bar_button_margin)))
-       {
-         extra_x = XINT (XCAR (Vtool_bar_button_margin));
-         extra_y = XINT (XCDR (Vtool_bar_button_margin));
-       }
-      else if (INTEGERP (Vtool_bar_button_margin))
-       extra_x = extra_y = XINT (Vtool_bar_button_margin);
-    }
-
   x1 = x + s->slice.width - 1;
   y1 = y + s->slice.height - 1;
   top_p = bot_p = left_p = right_p = 0;
@@ -4849,9 +4834,7 @@ x_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, int portion, int positio
       /* Slider size.  Must be in the range [1 .. MAX - MIN] where MAX
          is the scroll bar's maximum and MIN is the scroll bar's minimum
         value.  */
-      size = shown * XM_SB_MAX;
-      size = min (size, XM_SB_MAX);
-      size = max (size, 1);
+      size = clip_to_bounds (1, shown * XM_SB_MAX, XM_SB_MAX);
 
       /* Position.  Must be in the range [MIN .. MAX - SLIDER_SIZE].  */
       value = top * XM_SB_MAX;
@@ -7917,7 +7900,6 @@ x_new_font (struct frame *f, Lisp_Object font_object, int fontset)
   FRAME_FONT (f) = font;
   FRAME_BASELINE_OFFSET (f) = font->baseline_offset;
   FRAME_COLUMN_WIDTH (f) = font->average_width;
-  FRAME_SPACE_WIDTH (f) = font->space_width;
   FRAME_LINE_HEIGHT (f) = FONT_HEIGHT (font);
 
   compute_fringe_widths (f, 1);
@@ -9924,10 +9906,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
 
         /* Emacs can only handle core input events, so make sure
            Gtk doesn't use Xinput or Xinput2 extensions.  */
-        {
-          static char fix_events[] = "GDK_CORE_DEVICE_EVENTS=1";
-          putenv (fix_events);
-        }
+       xputenv ("GDK_CORE_DEVICE_EVENTS=1");
 
         /* Work around GLib bug that outputs a faulty warning. See
            https://bugzilla.gnome.org/show_bug.cgi?id=563627.  */