aboutsummaryrefslogtreecommitdiffstats
path: root/src/xfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/xfns.c b/src/xfns.c
index deb0e192a54..e50d6887179 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -461,7 +461,7 @@ x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
461 Window win = f->output_data.x->parent_desc; 461 Window win = f->output_data.x->parent_desc;
462 Atom actual_type; 462 Atom actual_type;
463 unsigned long actual_size, bytes_remaining; 463 unsigned long actual_size, bytes_remaining;
464 int i, rc, actual_format; 464 int rc, actual_format;
465 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 465 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
466 long max_len = 400; 466 long max_len = 400;
467 Display *dpy = FRAME_X_DISPLAY (f); 467 Display *dpy = FRAME_X_DISPLAY (f);
@@ -648,7 +648,7 @@ x_defined_color (struct frame *f, const char *color_name,
648 is a monochrome frame, return MONO_COLOR regardless of what ARG says. 648 is a monochrome frame, return MONO_COLOR regardless of what ARG says.
649 Signal an error if color can't be allocated. */ 649 Signal an error if color can't be allocated. */
650 650
651int 651static int
652x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color) 652x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color)
653{ 653{
654 XColor cdef; 654 XColor cdef;
@@ -746,7 +746,6 @@ xg_set_icon (FRAME_PTR f, Lisp_Object file)
746int 746int
747xg_set_icon_from_xpm_data (FRAME_PTR f, const char **data) 747xg_set_icon_from_xpm_data (FRAME_PTR f, const char **data)
748{ 748{
749 int result = 0;
750 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data); 749 GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data);
751 750
752 if (!pixbuf) 751 if (!pixbuf)
@@ -1635,7 +1634,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name)
1635 suggesting a new name, which lisp code should override; if 1634 suggesting a new name, which lisp code should override; if
1636 F->explicit_name is set, ignore the new name; otherwise, set it. */ 1635 F->explicit_name is set, ignore the new name; otherwise, set it. */
1637 1636
1638void 1637static void
1639x_set_name (struct frame *f, Lisp_Object name, int explicit) 1638x_set_name (struct frame *f, Lisp_Object name, int explicit)
1640{ 1639{
1641 /* Make sure that requests from lisp code override requests from 1640 /* Make sure that requests from lisp code override requests from
@@ -2620,7 +2619,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
2620 2619
2621#else /* not USE_X_TOOLKIT */ 2620#else /* not USE_X_TOOLKIT */
2622#ifdef USE_GTK 2621#ifdef USE_GTK
2623void 2622static void
2624x_window (FRAME_PTR f) 2623x_window (FRAME_PTR f)
2625{ 2624{
2626 if (! xg_create_frame_widgets (f)) 2625 if (! xg_create_frame_widgets (f))
@@ -2660,7 +2659,7 @@ x_window (FRAME_PTR f)
2660#else /*! USE_GTK */ 2659#else /*! USE_GTK */
2661/* Create and set up the X window for frame F. */ 2660/* Create and set up the X window for frame F. */
2662 2661
2663void 2662static void
2664x_window (struct frame *f) 2663x_window (struct frame *f)
2665{ 2664{
2666 XClassHint class_hints; 2665 XClassHint class_hints;
@@ -3184,7 +3183,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3184 to get the color reference counts right, so initialize them! */ 3183 to get the color reference counts right, so initialize them! */
3185 { 3184 {
3186 Lisp_Object black; 3185 Lisp_Object black;
3187 struct gcpro gcpro1; 3186 struct gcpro inner_gcpro1;
3188 3187
3189 /* Function x_decode_color can signal an error. Make 3188 /* Function x_decode_color can signal an error. Make
3190 sure to initialize color slots so that we won't try 3189 sure to initialize color slots so that we won't try
@@ -3197,7 +3196,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3197 f->output_data.x->mouse_pixel = -1; 3196 f->output_data.x->mouse_pixel = -1;
3198 3197
3199 black = build_string ("black"); 3198 black = build_string ("black");
3200 GCPRO1 (black); 3199 GCPRO1_VAR (black, inner_gcpro);
3201 FRAME_FOREGROUND_PIXEL (f) 3200 FRAME_FOREGROUND_PIXEL (f)
3202 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); 3201 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
3203 FRAME_BACKGROUND_PIXEL (f) 3202 FRAME_BACKGROUND_PIXEL (f)
@@ -3210,7 +3209,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3210 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); 3209 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
3211 f->output_data.x->mouse_pixel 3210 f->output_data.x->mouse_pixel
3212 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); 3211 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
3213 UNGCPRO; 3212 UNGCPRO_VAR (inner_gcpro);
3214 } 3213 }
3215 3214
3216 /* Specify the parent under which to make this X window. */ 3215 /* Specify the parent under which to make this X window. */
@@ -3448,8 +3447,9 @@ This function is an internal primitive--use `make-frame' instead. */)
3448 else if (! NILP (visibility)) 3447 else if (! NILP (visibility))
3449 x_make_frame_visible (f); 3448 x_make_frame_visible (f);
3450 else 3449 else
3451 /* Must have been Qnil. */ 3450 {
3452 ; 3451 /* Must have been Qnil. */
3452 }
3453 } 3453 }
3454 3454
3455 BLOCK_INPUT; 3455 BLOCK_INPUT;
@@ -4577,7 +4577,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4577 Lisp_Object text) 4577 Lisp_Object text)
4578{ 4578{
4579 struct frame *f; 4579 struct frame *f;
4580 Lisp_Object frame, tem; 4580 Lisp_Object frame;
4581 Lisp_Object name; 4581 Lisp_Object name;
4582 long window_prompting = 0; 4582 long window_prompting = 0;
4583 int width, height; 4583 int width, height;
@@ -4651,7 +4651,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4651 to get the color reference counts right, so initialize them! */ 4651 to get the color reference counts right, so initialize them! */
4652 { 4652 {
4653 Lisp_Object black; 4653 Lisp_Object black;
4654 struct gcpro gcpro1; 4654 struct gcpro inner_gcpro1;
4655 4655
4656 /* Function x_decode_color can signal an error. Make 4656 /* Function x_decode_color can signal an error. Make
4657 sure to initialize color slots so that we won't try 4657 sure to initialize color slots so that we won't try
@@ -4664,7 +4664,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4664 f->output_data.x->mouse_pixel = -1; 4664 f->output_data.x->mouse_pixel = -1;
4665 4665
4666 black = build_string ("black"); 4666 black = build_string ("black");
4667 GCPRO1 (black); 4667 GCPRO1_VAR (black, inner_gcpro);
4668 FRAME_FOREGROUND_PIXEL (f) 4668 FRAME_FOREGROUND_PIXEL (f)
4669 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); 4669 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
4670 FRAME_BACKGROUND_PIXEL (f) 4670 FRAME_BACKGROUND_PIXEL (f)
@@ -4677,7 +4677,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4677 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); 4677 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
4678 f->output_data.x->mouse_pixel 4678 f->output_data.x->mouse_pixel
4679 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); 4679 = x_decode_color (f, black, BLACK_PIX_DEFAULT (f));
4680 UNGCPRO; 4680 UNGCPRO_VAR (inner_gcpro);
4681 } 4681 }
4682 4682
4683 /* Set the name; the functions to which we pass f expect the name to 4683 /* Set the name; the functions to which we pass f expect the name to
@@ -5035,7 +5035,7 @@ Text larger than the specified size is clipped. */)
5035 && !NILP (Fequal (last_string, string)) 5035 && !NILP (Fequal (last_string, string))
5036 && !NILP (Fequal (last_parms, parms))) 5036 && !NILP (Fequal (last_parms, parms)))
5037 { 5037 {
5038 struct frame *f = XFRAME (tip_frame); 5038 struct frame *tip_f = XFRAME (tip_frame);
5039 5039
5040 /* Only DX and DY have changed. */ 5040 /* Only DX and DY have changed. */
5041 if (!NILP (tip_timer)) 5041 if (!NILP (tip_timer))
@@ -5046,9 +5046,9 @@ Text larger than the specified size is clipped. */)
5046 } 5046 }
5047 5047
5048 BLOCK_INPUT; 5048 BLOCK_INPUT;
5049 compute_tip_xy (f, parms, dx, dy, FRAME_PIXEL_WIDTH (f), 5049 compute_tip_xy (tip_f, parms, dx, dy, FRAME_PIXEL_WIDTH (tip_f),
5050 FRAME_PIXEL_HEIGHT (f), &root_x, &root_y); 5050 FRAME_PIXEL_HEIGHT (tip_f), &root_x, &root_y);
5051 XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5051 XMoveWindow (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f),
5052 root_x, root_y); 5052 root_x, root_y);
5053 UNBLOCK_INPUT; 5053 UNBLOCK_INPUT;
5054 goto start_timer; 5054 goto start_timer;
@@ -5565,11 +5565,11 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
5565 BLOCK_INPUT; 5565 BLOCK_INPUT;
5566 5566
5567 if (STRINGP (default_filename)) 5567 if (STRINGP (default_filename))
5568 cdef_file = SDATA (default_filename); 5568 cdef_file = SSDATA (default_filename);
5569 else 5569 else
5570 cdef_file = SDATA (dir); 5570 cdef_file = SSDATA (dir);
5571 5571
5572 fn = xg_get_file_name (f, SDATA (prompt), cdef_file, 5572 fn = xg_get_file_name (f, SSDATA (prompt), cdef_file,
5573 ! NILP (mustmatch), 5573 ! NILP (mustmatch),
5574 ! NILP (only_dir_p)); 5574 ! NILP (only_dir_p));
5575 5575
@@ -5625,12 +5625,12 @@ If FRAME is omitted or nil, it defaults to the selected frame. */)
5625 XSETFONT (font, FRAME_FONT (f)); 5625 XSETFONT (font, FRAME_FONT (f));
5626 font_param = Ffont_get (font, intern (":name")); 5626 font_param = Ffont_get (font, intern (":name"));
5627 if (STRINGP (font_param)) 5627 if (STRINGP (font_param))
5628 default_name = xstrdup (SDATA (font_param)); 5628 default_name = xstrdup (SSDATA (font_param));
5629 else 5629 else
5630 { 5630 {
5631 font_param = Fframe_parameter (frame, Qfont_param); 5631 font_param = Fframe_parameter (frame, Qfont_param);
5632 if (STRINGP (font_param)) 5632 if (STRINGP (font_param))
5633 default_name = xstrdup (SDATA (font_param)); 5633 default_name = xstrdup (SSDATA (font_param));
5634 } 5634 }
5635 5635
5636 if (default_name == NULL && x_last_font_name != NULL) 5636 if (default_name == NULL && x_last_font_name != NULL)
@@ -5694,7 +5694,7 @@ present and mapped to the usual X keysyms. */)
5694 struct frame *f = check_x_frame (frame); 5694 struct frame *f = check_x_frame (frame);
5695 Display *dpy = FRAME_X_DISPLAY (f); 5695 Display *dpy = FRAME_X_DISPLAY (f);
5696 Lisp_Object have_keys; 5696 Lisp_Object have_keys;
5697 int major, minor, op, event, error; 5697 int major, minor, op, event, error_code;
5698 5698
5699 BLOCK_INPUT; 5699 BLOCK_INPUT;
5700 5700
@@ -5710,7 +5710,7 @@ present and mapped to the usual X keysyms. */)
5710 /* Check that the server supports XKB. */ 5710 /* Check that the server supports XKB. */
5711 major = XkbMajorVersion; 5711 major = XkbMajorVersion;
5712 minor = XkbMinorVersion; 5712 minor = XkbMinorVersion;
5713 if (!XkbQueryExtension (dpy, &op, &event, &error, &major, &minor)) 5713 if (!XkbQueryExtension (dpy, &op, &event, &error_code, &major, &minor))
5714 { 5714 {
5715 UNBLOCK_INPUT; 5715 UNBLOCK_INPUT;
5716 return Qlambda; 5716 return Qlambda;