comparison src/xfns.c @ 12051:f193ce9efe24

(x_destroy_bitmap): Block and unblock input. (Fx_horizontal_line): Add one UNBLOCK_INPUT to fix a misbalance, and move another one to include the call to XFreeGC, in case we someday remove the "#if 0" conditions.
author Karl Heuer <kwzh@gnu.org>
date Thu, 01 Jun 1995 23:23:50 +0000
parents d23f2c9990b2
children 1b0018c43060
comparison
equal deleted inserted replaced
12050:b740095d6a47 12051:f193ce9efe24
568 if (id > 0) 568 if (id > 0)
569 { 569 {
570 --dpyinfo->bitmaps[id - 1].refcount; 570 --dpyinfo->bitmaps[id - 1].refcount;
571 if (dpyinfo->bitmaps[id - 1].refcount == 0) 571 if (dpyinfo->bitmaps[id - 1].refcount == 0)
572 { 572 {
573 BLOCK_INPUT;
573 XFreePixmap (FRAME_X_DISPLAY (f), dpyinfo->bitmaps[id - 1].pixmap); 574 XFreePixmap (FRAME_X_DISPLAY (f), dpyinfo->bitmaps[id - 1].pixmap);
574 if (dpyinfo->bitmaps[id - 1].file) 575 if (dpyinfo->bitmaps[id - 1].file)
575 { 576 {
576 free (dpyinfo->bitmaps[id - 1].file); 577 free (dpyinfo->bitmaps[id - 1].file);
577 dpyinfo->bitmaps[id - 1].file = NULL; 578 dpyinfo->bitmaps[id - 1].file = NULL;
578 } 579 }
580 UNBLOCK_INPUT;
579 } 581 }
580 } 582 }
581 } 583 }
582 584
583 /* Free all the bitmaps for the display specified by DPYINFO. */ 585 /* Free all the bitmaps for the display specified by DPYINFO. */
4103 erase_gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 4105 erase_gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
4104 GCLineStyle | GCJoinStyle | GCCapStyle 4106 GCLineStyle | GCJoinStyle | GCCapStyle
4105 | GCLineWidth | GCForeground | GCBackground, 4107 | GCLineWidth | GCForeground | GCBackground,
4106 &gc_values); 4108 &gc_values);
4107 XSetDashes (FRAME_X_DISPLAY (f), erase_gc, 0, dash_list, dashes); 4109 XSetDashes (FRAME_X_DISPLAY (f), erase_gc, 0, dash_list, dashes);
4110 UNBLOCK_INPUT;
4108 #endif 4111 #endif
4109 4112
4110 while (1) 4113 while (1)
4111 { 4114 {
4112 BLOCK_INPUT; 4115 BLOCK_INPUT;
4131 || x_mouse_grabbed) 4134 || x_mouse_grabbed)
4132 { 4135 {
4133 BLOCK_INPUT; 4136 BLOCK_INPUT;
4134 XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 4137 XDrawLine (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
4135 erase_gc, left, line, right, line); 4138 erase_gc, left, line, right, line);
4136 UNBLOCK_INPUT;
4137 unread_command_event = obj; 4139 unread_command_event = obj;
4138 #if 0 4140 #if 0
4139 XFreeGC (FRAME_X_DISPLAY (f), line_gc); 4141 XFreeGC (FRAME_X_DISPLAY (f), line_gc);
4140 XFreeGC (FRAME_X_DISPLAY (f), erase_gc); 4142 XFreeGC (FRAME_X_DISPLAY (f), erase_gc);
4141 #endif 4143 #endif
4144 UNBLOCK_INPUT;
4142 return Qnil; 4145 return Qnil;
4143 } 4146 }
4144 } 4147 }
4145 while (x_mouse_y == previous_y); 4148 while (x_mouse_y == previous_y);
4146 4149