diff options
| author | Richard M. Stallman | 1996-09-27 07:46:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-27 07:46:54 +0000 |
| commit | e84e14c381f679a145491b8aa4a91863c656b13d (patch) | |
| tree | 90a58ab8464f6b37cf62e9c41cad444903924eb7 /src | |
| parent | 2a8a07d41bb22655151824743b737079eafc7059 (diff) | |
| download | emacs-e84e14c381f679a145491b8aa4a91863c656b13d.tar.gz emacs-e84e14c381f679a145491b8aa4a91863c656b13d.zip | |
(XTflash): Don't flash in the internal borders.
or between a scroll bar and the edge.
(XTflash): Flash just top and bottom screen line.
(XTread_socket): Finish previous change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 67 |
1 files changed, 60 insertions, 7 deletions
diff --git a/src/xterm.c b/src/xterm.c index b87f0fdabe8..d06335b10f4 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1117,11 +1117,49 @@ XTflash (f) | |||
| 1117 | } | 1117 | } |
| 1118 | 1118 | ||
| 1119 | { | 1119 | { |
| 1120 | int width = PIXEL_WIDTH (f); | 1120 | /* Get the height not including a menu bar widget. */ |
| 1121 | int height = PIXEL_HEIGHT (f); | 1121 | int height = CHAR_TO_PIXEL_HEIGHT (f, FRAME_HEIGHT (f)); |
| 1122 | /* Height of each line to flash. */ | ||
| 1123 | int flash_height = FRAME_LINE_HEIGHT (f); | ||
| 1124 | /* These will be the left and right margins of the rectangles. */ | ||
| 1125 | int flash_left = FRAME_INTERNAL_BORDER_WIDTH (f); | ||
| 1126 | int flash_right = PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f); | ||
| 1127 | |||
| 1128 | int width; | ||
| 1129 | |||
| 1130 | /* Don't flash the area between a scroll bar and the frame | ||
| 1131 | edge it is next to. */ | ||
| 1132 | switch (FRAME_VERTICAL_SCROLL_BAR_TYPE (f)) | ||
| 1133 | { | ||
| 1134 | case vertical_scroll_bar_left: | ||
| 1135 | flash_left += VERTICAL_SCROLL_BAR_WIDTH_TRIM; | ||
| 1136 | break; | ||
| 1137 | |||
| 1138 | case vertical_scroll_bar_right: | ||
| 1139 | flash_right -= VERTICAL_SCROLL_BAR_WIDTH_TRIM; | ||
| 1140 | break; | ||
| 1141 | } | ||
| 1142 | |||
| 1143 | width = flash_right - flash_left; | ||
| 1144 | |||
| 1145 | /* If window is tall, flash top and bottom line. */ | ||
| 1146 | if (height > 3 * FRAME_LINE_HEIGHT (f)) | ||
| 1147 | { | ||
| 1148 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | ||
| 1149 | flash_left, FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 1150 | width, flash_height); | ||
| 1151 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | ||
| 1152 | flash_left, | ||
| 1153 | (height - flash_height | ||
| 1154 | - FRAME_INTERNAL_BORDER_WIDTH (f)), | ||
| 1155 | width, flash_height); | ||
| 1156 | } | ||
| 1157 | else | ||
| 1158 | /* If it is short, flash it all. */ | ||
| 1159 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | ||
| 1160 | flash_left, FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 1161 | width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); | ||
| 1122 | 1162 | ||
| 1123 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | ||
| 1124 | width/4, height/4, width/2, height/2); | ||
| 1125 | XFlush (FRAME_X_DISPLAY (f)); | 1163 | XFlush (FRAME_X_DISPLAY (f)); |
| 1126 | 1164 | ||
| 1127 | { | 1165 | { |
| @@ -1151,8 +1189,24 @@ XTflash (f) | |||
| 1151 | } | 1189 | } |
| 1152 | } | 1190 | } |
| 1153 | 1191 | ||
| 1154 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | 1192 | /* If window is tall, flash top and bottom line. */ |
| 1155 | width/4, height/4, width/2, height/2); | 1193 | if (height > 3 * FRAME_LINE_HEIGHT (f)) |
| 1194 | { | ||
| 1195 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | ||
| 1196 | flash_left, FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 1197 | width, flash_height); | ||
| 1198 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | ||
| 1199 | flash_left, | ||
| 1200 | (height - flash_height | ||
| 1201 | - FRAME_INTERNAL_BORDER_WIDTH (f)), | ||
| 1202 | width, flash_height); | ||
| 1203 | } | ||
| 1204 | else | ||
| 1205 | /* If it is short, flash it all. */ | ||
| 1206 | XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc, | ||
| 1207 | flash_left, FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 1208 | width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); | ||
| 1209 | |||
| 1156 | XFreeGC (FRAME_X_DISPLAY (f), gc); | 1210 | XFreeGC (FRAME_X_DISPLAY (f), gc); |
| 1157 | XFlush (FRAME_X_DISPLAY (f)); | 1211 | XFlush (FRAME_X_DISPLAY (f)); |
| 1158 | } | 1212 | } |
| @@ -3241,7 +3295,6 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 3241 | register int sd; | 3295 | register int sd; |
| 3242 | /* register */ struct input_event *bufp; | 3296 | /* register */ struct input_event *bufp; |
| 3243 | /* register */ int numchars; | 3297 | /* register */ int numchars; |
| 3244 | int waitp; | ||
| 3245 | int expected; | 3298 | int expected; |
| 3246 | { | 3299 | { |
| 3247 | int count = 0; | 3300 | int count = 0; |