comparison lisp/mouse.el @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 3ecd8885ac67
children abe6d1db359e
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
1381 (extent-at modeline-point modeline-string 1381 (extent-at modeline-point modeline-string
1382 'help-echo)))) 1382 'help-echo))))
1383 ;; vars is a list of glyph variables to check for a pointer 1383 ;; vars is a list of glyph variables to check for a pointer
1384 ;; value. 1384 ;; value.
1385 (vars (cond 1385 (vars (cond
1386 ;; Checking if button is non-nil is not sufficent 1386 ;; Checking if button is non-nil is not sufficient
1387 ;; since the pointer could be over a blank portion 1387 ;; since the pointer could be over a blank portion
1388 ;; of the toolbar. 1388 ;; of the toolbar.
1389 ((event-over-toolbar-p event) 1389 ((event-over-toolbar-p event)
1390 '(toolbar-pointer-glyph nontext-pointer-glyph 1390 '(toolbar-pointer-glyph nontext-pointer-glyph
1391 text-pointer-glyph)) 1391 text-pointer-glyph))
1523 drag-divider-event-lag)) 1523 drag-divider-event-lag))
1524 (t 1524 (t
1525 (setq last-timestamp (event-timestamp event)) 1525 (setq last-timestamp (event-timestamp event))
1526 ;; Enlarge the window, calculating change in characters 1526 ;; Enlarge the window, calculating change in characters
1527 ;; of default font. Do not let the window to become 1527 ;; of default font. Do not let the window to become
1528 ;; less than alolwed minimum (not because that's critical 1528 ;; less than allowed minimum (not because that's critical
1529 ;; for the code performance, just the visual effect is 1529 ;; for the code performance, just the visual effect is
1530 ;; better: when cursor goes to the left of the next left 1530 ;; better: when cursor goes to the left of the next left
1531 ;; divider, the vindow being resized shrinks to minimal 1531 ;; divider, the window being resized shrinks to minimal
1532 ;; size. 1532 ;; size.
1533 (enlarge-window (max (- window-min-width (window-width window)) 1533 (enlarge-window (max (- window-min-width (window-width window))
1534 (/ (- (event-x-pixel event) old-right) 1534 (/ (- (event-x-pixel event) old-right)
1535 (face-width 'default window))) 1535 (face-width 'default window)))
1536 t window) 1536 t window)
1537 ;; Backout the change if some windows got deleted, or 1537 ;; Backout the change if some windows got deleted, or
1538 ;; if the change caused more than two windows to resize 1538 ;; if the change caused more than two windows to resize
1539 ;; (shifting the whole stack right is ugly), or if the 1539 ;; (shifting the whole stack right is ugly), or if the
1540 ;; left window side has slipped (right side cannot be 1540 ;; left window side has slipped (right side cannot be
1541 ;; moved any funrther to the right, so enlarge-window 1541 ;; moved any further to the right, so enlarge-window
1542 ;; plays bad games with the left edge. 1542 ;; plays bad games with the left edge.
1543 (if (or (/= (count-windows) (length old-edges-all-windows)) 1543 (if (or (/= (count-windows) (length old-edges-all-windows))
1544 (/= old-left (car (window-pixel-edges window))) 1544 (/= old-left (car (window-pixel-edges window)))
1545 ;; This check is very hairy. We allow any number 1545 ;; This check is very hairy. We allow any number
1546 ;; of left edges to change, but only to the same 1546 ;; of left edges to change, but only to the same