aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/xfns.c b/src/xfns.c
index 297d71bf21f..345f2f14c7d 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -968,7 +968,7 @@ x_real_positions (f, xptr, yptr)
968 968
969 while (1) 969 while (1)
970 { 970 {
971 x_catch_errors (FRAME_X_DISPLAY (f)); 971 int count = x_catch_errors (FRAME_X_DISPLAY (f));
972 972
973 XQueryTree (FRAME_X_DISPLAY (f), outer, &tmp_root_window, 973 XQueryTree (FRAME_X_DISPLAY (f), outer, &tmp_root_window,
974 &f->output_data.x->parent_desc, 974 &f->output_data.x->parent_desc,
@@ -1010,11 +1010,11 @@ x_real_positions (f, xptr, yptr)
1010 Detect that and try the whole thing over. */ 1010 Detect that and try the whole thing over. */
1011 if (! x_had_errors_p (FRAME_X_DISPLAY (f))) 1011 if (! x_had_errors_p (FRAME_X_DISPLAY (f)))
1012 { 1012 {
1013 x_uncatch_errors (FRAME_X_DISPLAY (f)); 1013 x_uncatch_errors (FRAME_X_DISPLAY (f), count);
1014 break; 1014 break;
1015 } 1015 }
1016 1016
1017 x_uncatch_errors (FRAME_X_DISPLAY (f)); 1017 x_uncatch_errors (FRAME_X_DISPLAY (f), count);
1018 } 1018 }
1019 1019
1020 *xptr = f->output_data.x->left_pos - win_x; 1020 *xptr = f->output_data.x->left_pos - win_x;
@@ -1266,6 +1266,7 @@ x_set_mouse_color (f, arg, oldval)
1266 Lisp_Object arg, oldval; 1266 Lisp_Object arg, oldval;
1267{ 1267{
1268 Cursor cursor, nontext_cursor, mode_cursor, cross_cursor; 1268 Cursor cursor, nontext_cursor, mode_cursor, cross_cursor;
1269 int count;
1269 int mask_color; 1270 int mask_color;
1270 1271
1271 if (!EQ (Qnil, arg)) 1272 if (!EQ (Qnil, arg))
@@ -1280,7 +1281,7 @@ x_set_mouse_color (f, arg, oldval)
1280 BLOCK_INPUT; 1281 BLOCK_INPUT;
1281 1282
1282 /* It's not okay to crash if the user selects a screwy cursor. */ 1283 /* It's not okay to crash if the user selects a screwy cursor. */
1283 x_catch_errors (FRAME_X_DISPLAY (f)); 1284 count = x_catch_errors (FRAME_X_DISPLAY (f));
1284 1285
1285 if (!EQ (Qnil, Vx_pointer_shape)) 1286 if (!EQ (Qnil, Vx_pointer_shape))
1286 { 1287 {
@@ -1323,7 +1324,7 @@ x_set_mouse_color (f, arg, oldval)
1323 1324
1324 /* Check and report errors with the above calls. */ 1325 /* Check and report errors with the above calls. */
1325 x_check_errors (FRAME_X_DISPLAY (f), "can't set cursor shape: %s"); 1326 x_check_errors (FRAME_X_DISPLAY (f), "can't set cursor shape: %s");
1326 x_uncatch_errors (FRAME_X_DISPLAY (f)); 1327 x_uncatch_errors (FRAME_X_DISPLAY (f), count);
1327 1328
1328 { 1329 {
1329 XColor fore_color, back_color; 1330 XColor fore_color, back_color;
@@ -3427,6 +3428,7 @@ fonts to match. The first MAXIMUM fonts are reported.")
3427 FRAME_PTR f; 3428 FRAME_PTR f;
3428 Lisp_Object key; 3429 Lisp_Object key;
3429 int maxnames; 3430 int maxnames;
3431 int count;
3430 3432
3431 check_x (); 3433 check_x ();
3432 CHECK_STRING (pattern, 0); 3434 CHECK_STRING (pattern, 0);
@@ -3492,13 +3494,13 @@ fonts to match. The first MAXIMUM fonts are reported.")
3492 { 3494 {
3493 XFontStruct *thisinfo; 3495 XFontStruct *thisinfo;
3494 3496
3495 x_catch_errors (FRAME_X_DISPLAY (f)); 3497 count = x_catch_errors (FRAME_X_DISPLAY (f));
3496 3498
3497 thisinfo = XLoadQueryFont (FRAME_X_DISPLAY (f), 3499 thisinfo = XLoadQueryFont (FRAME_X_DISPLAY (f),
3498 XSTRING (XCONS (tem)->car)->data); 3500 XSTRING (XCONS (tem)->car)->data);
3499 3501
3500 x_check_errors (FRAME_X_DISPLAY (f), "XLoadQueryFont failure: %s"); 3502 x_check_errors (FRAME_X_DISPLAY (f), "XLoadQueryFont failure: %s");
3501 x_uncatch_errors (FRAME_X_DISPLAY (f)); 3503 x_uncatch_errors (FRAME_X_DISPLAY (f), count);
3502 3504
3503 if (thisinfo && same_size_fonts (thisinfo, size_ref)) 3505 if (thisinfo && same_size_fonts (thisinfo, size_ref))
3504 newlist = Fcons (XCONS (tem)->car, newlist); 3506 newlist = Fcons (XCONS (tem)->car, newlist);
@@ -3514,7 +3516,7 @@ fonts to match. The first MAXIMUM fonts are reported.")
3514 3516
3515 BLOCK_INPUT; 3517 BLOCK_INPUT;
3516 3518
3517 x_catch_errors (FRAME_X_DISPLAY (f)); 3519 count = x_catch_errors (FRAME_X_DISPLAY (f));
3518 3520
3519 /* Solaris 2.3 has a bug in XListFontsWithInfo. */ 3521 /* Solaris 2.3 has a bug in XListFontsWithInfo. */
3520#ifndef BROKEN_XLISTFONTSWITHINFO 3522#ifndef BROKEN_XLISTFONTSWITHINFO
@@ -3532,7 +3534,7 @@ fonts to match. The first MAXIMUM fonts are reported.")
3532 &num_fonts); /* count_return */ 3534 &num_fonts); /* count_return */
3533 3535
3534 x_check_errors (FRAME_X_DISPLAY (f), "XListFonts failure: %s"); 3536 x_check_errors (FRAME_X_DISPLAY (f), "XListFonts failure: %s");
3535 x_uncatch_errors (FRAME_X_DISPLAY (f)); 3537 x_uncatch_errors (FRAME_X_DISPLAY (f), count);
3536 3538
3537 UNBLOCK_INPUT; 3539 UNBLOCK_INPUT;
3538 3540
@@ -3567,11 +3569,11 @@ fonts to match. The first MAXIMUM fonts are reported.")
3567 3569
3568 BLOCK_INPUT; 3570 BLOCK_INPUT;
3569 3571
3570 x_catch_errors (FRAME_X_DISPLAY (f)); 3572 count = x_catch_errors (FRAME_X_DISPLAY (f));
3571 thisinfo = XLoadQueryFont (FRAME_X_DISPLAY (f), names[i]); 3573 thisinfo = XLoadQueryFont (FRAME_X_DISPLAY (f), names[i]);
3572 x_check_errors (FRAME_X_DISPLAY (f), 3574 x_check_errors (FRAME_X_DISPLAY (f),
3573 "XLoadQueryFont failure: %s"); 3575 "XLoadQueryFont failure: %s");
3574 x_uncatch_errors (FRAME_X_DISPLAY (f)); 3576 x_uncatch_errors (FRAME_X_DISPLAY (f), count);
3575 3577
3576 UNBLOCK_INPUT; 3578 UNBLOCK_INPUT;
3577 3579