diff options
| author | Karl Heuer | 1995-06-01 23:23:50 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-06-01 23:23:50 +0000 |
| commit | ed662bdd5dd454f49b82fbfe371c3e7b4867a8ff (patch) | |
| tree | 9fec5729bb13cf8e61d0048c1f15edef33092d5a | |
| parent | 80280bb74aca5d58e6745731c05d825eedd9790f (diff) | |
| download | emacs-ed662bdd5dd454f49b82fbfe371c3e7b4867a8ff.tar.gz emacs-ed662bdd5dd454f49b82fbfe371c3e7b4867a8ff.zip | |
(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.
| -rw-r--r-- | src/xfns.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xfns.c b/src/xfns.c index 8ddd363d358..aedd45c07ca 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -570,12 +570,14 @@ x_destroy_bitmap (f, id) | |||
| 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 | } |
| @@ -4105,6 +4107,7 @@ DEFUN ("x-horizontal-line", Fx_horizontal_line, Sx_horizontal_line, 1, 1, "e", | |||
| 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) |
| @@ -4133,12 +4136,12 @@ DEFUN ("x-horizontal-line", Fx_horizontal_line, Sx_horizontal_line, 1, 1, "e", | |||
| 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 | } |