… | |
… | |
135 | rxvt_term::iso14755_54 (int x, int y) |
135 | rxvt_term::iso14755_54 (int x, int y) |
136 | { |
136 | { |
137 | x = Pixel2Col (x); |
137 | x = Pixel2Col (x); |
138 | y = Pixel2Row (y); |
138 | y = Pixel2Row (y); |
139 | |
139 | |
140 | if (x < 0 || x >= ncol |
140 | if (!IN_RANGE_EXC (x, 0, ncol) |
141 | || y < 0 || y >= nrow) |
141 | || !IN_RANGE_EXC (y, 0, nrow)) |
142 | return; |
142 | return; |
143 | |
143 | |
144 | for (;;) |
144 | for (;;) |
145 | { |
145 | { |
146 | const line_t &l = save[y + saveLines - view_start]; |
146 | const line_t &l = ROW(y - view_start); |
147 | |
147 | |
148 | text_t t = l.t[x]; |
148 | text_t t = l.t[x]; |
149 | |
149 | |
150 | if (t != NOCHAR || !x) |
150 | if (t != NOCHAR || !x) |
151 | { |
151 | { |
… | |
… | |
154 | break; |
154 | break; |
155 | } |
155 | } |
156 | |
156 | |
157 | x--; |
157 | x--; |
158 | } |
158 | } |
159 | |
|
|
160 | } |
159 | } |
161 | #endif |
160 | #endif |
162 | |
161 | |
163 | #if ENABLE_OVERLAY |
162 | #if ENABLE_OVERLAY |
164 | void |
163 | void |
… | |
… | |
1068 | if (n > 0) |
1067 | if (n > 0) |
1069 | { |
1068 | { |
1070 | cmdbuf_endp += n; |
1069 | cmdbuf_endp += n; |
1071 | return true; |
1070 | return true; |
1072 | } |
1071 | } |
1073 | else if (n < 0 && errno != EAGAIN) |
1072 | else if ((n < 0 && errno != EAGAIN && errno != EINTR) || n == 0) |
|
|
1073 | { |
|
|
1074 | pty_ev.stop (); |
|
|
1075 | |
|
|
1076 | if (!(options & Opt_hold)) |
1074 | destroy (); |
1077 | destroy (); |
|
|
1078 | } |
1075 | |
1079 | |
1076 | return false; |
1080 | return false; |
1077 | } |
1081 | } |
1078 | |
1082 | |
1079 | void |
1083 | void |
… | |
… | |
1601 | } |
1605 | } |
1602 | |
1606 | |
1603 | scroll_selection_lines = Pixel2Height (dist) |
1607 | scroll_selection_lines = Pixel2Height (dist) |
1604 | / SELECTION_SCROLL_LINE_SPEEDUP |
1608 | / SELECTION_SCROLL_LINE_SPEEDUP |
1605 | + 1; |
1609 | + 1; |
1606 | MIN_IT (scroll_selection_lines, |
1610 | min_it (scroll_selection_lines, |
1607 | SELECTION_SCROLL_MAX_LINES); |
1611 | SELECTION_SCROLL_MAX_LINES); |
1608 | } |
1612 | } |
1609 | else |
1613 | else |
1610 | { |
1614 | { |
1611 | /* we are within the text window, so we |
1615 | /* we are within the text window, so we |
… | |
… | |
2452 | nh += sy; |
2456 | nh += sy; |
2453 | ny = -sy; |
2457 | ny = -sy; |
2454 | sy = 0; |
2458 | sy = 0; |
2455 | } |
2459 | } |
2456 | |
2460 | |
2457 | MIN_IT (nw, (unsigned int) (wrootattr.width - sx)); |
2461 | min_it (nw, (unsigned int) (wrootattr.width - sx)); |
2458 | MIN_IT (nh, (unsigned int) (wrootattr.height - sy)); |
2462 | min_it (nh, (unsigned int) (wrootattr.height - sy)); |
2459 | |
2463 | |
2460 | XSync (disp, False); |
2464 | XSync (disp, False); |
2461 | allowedxerror = -1; |
2465 | allowedxerror = -1; |
2462 | image = XGetImage (disp, rootpixmap, sx, sy, nw, nh, AllPlanes, ZPixmap); |
2466 | image = XGetImage (disp, rootpixmap, sx, sy, nw, nh, AllPlanes, ZPixmap); |
2463 | |
2467 | |
… | |
… | |
4373 | } |
4377 | } |
4374 | |
4378 | |
4375 | memmove (v_buffer, v_buffer + written, v_buflen); |
4379 | memmove (v_buffer, v_buffer + written, v_buflen); |
4376 | } |
4380 | } |
4377 | else if (written != -1 || (errno != EAGAIN && errno != EINTR)) |
4381 | else if (written != -1 || (errno != EAGAIN && errno != EINTR)) |
4378 | // original code just ignores this... |
4382 | pty_ev.set (EVENT_READ); |
4379 | destroy (); |
|
|
4380 | } |
4383 | } |
4381 | |
4384 | |
4382 | /*----------------------- end-of-file (C source) -----------------------*/ |
4385 | /*----------------------- end-of-file (C source) -----------------------*/ |
4383 | |
4386 | |