diff options
| author | Martin Rudalics | 2013-12-04 15:11:33 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2013-12-04 15:11:33 +0100 |
| commit | 2db4a1b6341b756b73fbdd996b3f6b119360ac99 (patch) | |
| tree | 488ad5a416081f902f4547b2cc82d1269cbadb7b | |
| parent | 81961e4cea57cd7b57b263ed0a570737c24d6f97 (diff) | |
| download | emacs-2db4a1b6341b756b73fbdd996b3f6b119360ac99.tar.gz emacs-2db4a1b6341b756b73fbdd996b3f6b119360ac99.zip | |
In XTflash fix coordinate of bottom area to flash (Bug#16044).
* xterm.c (XTflash): Fix coordinate of bottom area to flash
(Bug#16044).
| -rw-r--r-- | lisp/windmove.el | 14 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 2 |
3 files changed, 15 insertions, 6 deletions
diff --git a/lisp/windmove.el b/lisp/windmove.el index 01ae1804d01..638240347c1 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el | |||
| @@ -438,24 +438,28 @@ Return value is a frame-based (HPOS . VPOS) value that should be moved | |||
| 438 | to. DIR is one of `left', `up', `right', or `down'; an optional ARG | 438 | to. DIR is one of `left', `up', `right', or `down'; an optional ARG |
| 439 | is handled as by `windmove-reference-loc'; WINDOW is the window that | 439 | is handled as by `windmove-reference-loc'; WINDOW is the window that |
| 440 | movement is relative to." | 440 | movement is relative to." |
| 441 | (let ((edges (window-edges window)) ; edges: (x0, y0, x1, y1) | 441 | (let ((edges (window-pixel-edges window)) ; edges: (x0, y0, x1, y1) |
| 442 | (refpoint (windmove-reference-loc arg window))) ; (x . y) | 442 | (refpoint (windmove-reference-loc arg window))) ; (x . y) |
| 443 | (cond | 443 | (cond |
| 444 | ((eq dir 'left) | 444 | ((eq dir 'left) |
| 445 | (cons (- (nth 0 edges) | 445 | (cons (- (ceiling (nth 0 edges) |
| 446 | (frame-char-width (window-frame window))) | ||
| 446 | windmove-window-distance-delta) | 447 | windmove-window-distance-delta) |
| 447 | (cdr refpoint))) ; (x0-d, y) | 448 | (cdr refpoint))) ; (x0-d, y) |
| 448 | ((eq dir 'up) | 449 | ((eq dir 'up) |
| 449 | (cons (car refpoint) | 450 | (cons (car refpoint) |
| 450 | (- (nth 1 edges) | 451 | (- (ceiling (nth 1 edges) |
| 452 | (frame-char-height (window-frame window))) | ||
| 451 | windmove-window-distance-delta))) ; (x, y0-d) | 453 | windmove-window-distance-delta))) ; (x, y0-d) |
| 452 | ((eq dir 'right) | 454 | ((eq dir 'right) |
| 453 | (cons (+ (1- (nth 2 edges)) ; -1 to get actual max x | 455 | (cons (+ (1- (ceiling (nth 2 edges) |
| 456 | (frame-char-width (window-frame window)))) ; -1 to get actual max x | ||
| 454 | windmove-window-distance-delta) | 457 | windmove-window-distance-delta) |
| 455 | (cdr refpoint))) ; (x1+d-1, y) | 458 | (cdr refpoint))) ; (x1+d-1, y) |
| 456 | ((eq dir 'down) ; -1 to get actual max y | 459 | ((eq dir 'down) ; -1 to get actual max y |
| 457 | (cons (car refpoint) | 460 | (cons (car refpoint) |
| 458 | (+ (1- (nth 3 edges)) | 461 | (+ (1- (ceiling (nth 3 edges) |
| 462 | (frame-char-height (window-frame window)))) | ||
| 459 | windmove-window-distance-delta))) ; (x, y1+d-1) | 463 | windmove-window-distance-delta))) ; (x, y1+d-1) |
| 460 | (t (error "Invalid direction of movement: %s" dir))))) | 464 | (t (error "Invalid direction of movement: %s" dir))))) |
| 461 | 465 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index f67c02093ce..a877bc885e7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-12-04 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * xterm.c (XTflash): Fix coordinate of bottom area to flash | ||
| 4 | (Bug#16044). | ||
| 5 | |||
| 1 | 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru> | 6 | 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 7 | ||
| 3 | * font.c (font_list_entities): Remove dummy assignment. | 8 | * font.c (font_list_entities): Remove dummy assignment. |
diff --git a/src/xterm.c b/src/xterm.c index a77279849d3..0dbc4ac1c74 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2920,7 +2920,7 @@ XTflash (struct frame *f) | |||
| 2920 | #endif | 2920 | #endif |
| 2921 | { | 2921 | { |
| 2922 | /* Get the height not including a menu bar widget. */ | 2922 | /* Get the height not including a menu bar widget. */ |
| 2923 | int height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, FRAME_LINES (f)); | 2923 | int height = FRAME_PIXEL_HEIGHT (f); |
| 2924 | /* Height of each line to flash. */ | 2924 | /* Height of each line to flash. */ |
| 2925 | int flash_height = FRAME_LINE_HEIGHT (f); | 2925 | int flash_height = FRAME_LINE_HEIGHT (f); |
| 2926 | /* These will be the left and right margins of the rectangles. */ | 2926 | /* These will be the left and right margins of the rectangles. */ |