]> git.eshelyaron.com Git - emacs.git/commitdiff
In XTflash fix coordinate of bottom area to flash (Bug#16044).
authorMartin Rudalics <rudalics@gmx.at>
Wed, 4 Dec 2013 14:11:33 +0000 (15:11 +0100)
committerMartin Rudalics <rudalics@gmx.at>
Wed, 4 Dec 2013 14:11:33 +0000 (15:11 +0100)
* xterm.c (XTflash): Fix coordinate of bottom area to flash
(Bug#16044).

lisp/windmove.el
src/ChangeLog
src/xterm.c

index 01ae1804d017370c9740a875b42a6072f8163c98..638240347c15890a9812ead98c940ae6d4620d4b 100644 (file)
@@ -438,24 +438,28 @@ Return value is a frame-based (HPOS . VPOS) value that should be moved
 to.  DIR is one of `left', `up', `right', or `down'; an optional ARG
 is handled as by `windmove-reference-loc'; WINDOW is the window that
 movement is relative to."
-  (let ((edges (window-edges window))   ; edges: (x0, y0, x1, y1)
+  (let ((edges (window-pixel-edges window))   ; edges: (x0, y0, x1, y1)
         (refpoint (windmove-reference-loc arg window))) ; (x . y)
     (cond
      ((eq dir 'left)
-      (cons (- (nth 0 edges)
+      (cons (- (ceiling (nth 0 edges)
+                       (frame-char-width (window-frame window)))
                windmove-window-distance-delta)
             (cdr refpoint)))            ; (x0-d, y)
      ((eq dir 'up)
       (cons (car refpoint)
-            (- (nth 1 edges)
+            (- (ceiling (nth 1 edges)
+                       (frame-char-height (window-frame window)))
                windmove-window-distance-delta))) ; (x, y0-d)
      ((eq dir 'right)
-      (cons (+ (1- (nth 2 edges))      ; -1 to get actual max x
+      (cons (+ (1- (ceiling (nth 2 edges)
+                           (frame-char-width (window-frame window))))  ; -1 to get actual max x
                windmove-window-distance-delta)
             (cdr refpoint)))            ; (x1+d-1, y)
      ((eq dir 'down)                   ; -1 to get actual max y
       (cons (car refpoint)
-            (+ (1- (nth 3 edges))
+            (+ (1- (ceiling (nth 3 edges)
+                           (frame-char-height (window-frame window))))
                windmove-window-distance-delta))) ; (x, y1+d-1)
      (t (error "Invalid direction of movement: %s" dir)))))
 
index f67c02093ce8b2135df2aad9728b390f5e75c2fc..a877bc885e715cd745101325e152dde174ba05a2 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-04  Martin Rudalics  <rudalics@gmx.at>
+
+       * xterm.c (XTflash): Fix coordinate of bottom area to flash
+       (Bug#16044).
+
 2013-12-04  Dmitry Antipov  <dmantipov@yandex.ru>
 
        * font.c (font_list_entities): Remove dummy assignment.
index a77279849d38c00df93a2bf38837f483f60e498b..0dbc4ac1c7483fbf83ca14f3628130102c37fbad 100644 (file)
@@ -2920,7 +2920,7 @@ XTflash (struct frame *f)
 #endif
     {
       /* Get the height not including a menu bar widget.  */
-      int height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, FRAME_LINES (f));
+      int height = FRAME_PIXEL_HEIGHT (f);
       /* Height of each line to flash.  */
       int flash_height = FRAME_LINE_HEIGHT (f);
       /* These will be the left and right margins of the rectangles.  */