comparison lisp/mouse.el @ 290:c9fe270a4101 r21-0b43

Import from CVS: tag r21-0b43
author cvs
date Mon, 13 Aug 2007 10:36:47 +0200
parents e11d67e05968
children 70ad99077275
comparison
equal deleted inserted replaced
289:6e6992ccc4b6 290:c9fe270a4101
627 (if mouse-moved 627 (if mouse-moved
628 (mouse-track-run-hook 'mouse-track-drag-up-hook 628 (mouse-track-run-hook 'mouse-track-drag-up-hook
629 event mouse-track-click-count) 629 event mouse-track-click-count)
630 (mouse-track-run-hook 'mouse-track-click-hook 630 (mouse-track-run-hook 'mouse-track-click-hook
631 event mouse-track-click-count))) 631 event mouse-track-click-count)))
632 ((key-press-event-p event) 632 ((or (key-press-event-p event)
633 (and (misc-user-event-p event)
634 (eq (event-function event) 'cancel-mode-internal)))
633 (error "Selection aborted")) 635 (error "Selection aborted"))
634 (t 636 (t
635 (dispatch-event event)))) 637 (dispatch-event event))))
636 ;; protected 638 ;; protected
637 (if mouse-track-timeout-id 639 (if mouse-track-timeout-id
1422 (event-window event))) 1424 (event-window event)))
1423 (event-window event))) 1425 (event-window event)))
1424 (let* ((window (event-window event)) 1426 (let* ((window (event-window event))
1425 (frame (event-channel event)) 1427 (frame (event-channel event))
1426 (last-timestamp (event-timestamp event)) 1428 (last-timestamp (event-timestamp event))
1427 (doit t)) 1429 done)
1428 (while doit 1430 (while (not done)
1429 (let ((old-right (caddr (window-pixel-edges window))) 1431 (let* ((edges (window-pixel-edges window))
1430 (old-left (car (window-pixel-edges window))) 1432 (old-right (caddr edges))
1431 (backup-conf (current-window-configuration frame)) 1433 (old-left (car edges))
1432 (old-edges-all-windows (mapcar 'window-pixel-edges (window-list)))) 1434 (backup-conf (current-window-configuration frame))
1435 (old-edges-all-windows (mapcar 'window-pixel-edges
1436 (window-list))))
1433 1437
1434 ;; This is borrowed from modeline.el: 1438 ;; This is borrowed from modeline.el:
1435 ;; requeue event and quit if this is a misc-user, eval or 1439 ;; requeue event and quit if this is a misc-user, eval or
1436 ;; keypress event. 1440 ;; keypress event.
1437 ;; quit if this is a button press or release event, or if the event 1441 ;; quit if this is a button press or release event, or if the event
1438 ;; occurred in some other frame. 1442 ;; occurred in some other frame.
1439 ;; drag if this is a mouse motion event and the time 1443 ;; drag if this is a mouse motion event and the time
1440 ;; between this event and the last event is greater than 1444 ;; between this event and the last event is greater than
1441 ;; drag-modeline-event-lag. 1445 ;; drag-divider-event-lag.
1442 ;; do nothing if this is any other kind of event. 1446 ;; do nothing if this is any other kind of event.
1443 (setq event (next-event event)) 1447 (setq event (next-event event))
1444 (cond ((or (misc-user-event-p event) 1448 (cond ((or (misc-user-event-p event)
1445 (key-press-event-p event)) 1449 (key-press-event-p event))
1446 (setq unread-command-events (nconc unread-command-events 1450 (setq unread-command-events (nconc unread-command-events
1447 (list event)) 1451 (list event))
1448 doit nil)) 1452 done t))
1449 ((button-release-event-p event) 1453 ((button-release-event-p event)
1450 (setq doit nil)) 1454 (setq done t))
1451 ((button-event-p event) 1455 ((button-event-p event)
1452 (setq doit nil)) 1456 (setq done t))
1453 ((not (motion-event-p event)) 1457 ((not (motion-event-p event))
1454 (dispatch-event event)) 1458 (dispatch-event event))
1455 ((not (eq frame (event-frame event))) 1459 ((not (eq frame (event-frame event)))
1456 (setq doit nil)) 1460 (setq done t))
1457 ((< (abs (- (event-timestamp event) last-timestamp)) 1461 ((< (abs (- (event-timestamp event) last-timestamp))
1458 drag-modeline-event-lag)) 1462 drag-divider-event-lag))
1459 (t 1463 (t
1460 (setq last-timestamp (event-timestamp event)) 1464 (setq last-timestamp (event-timestamp event))
1461 ;; Enlarge the window, calculating change in characters 1465 ;; Enlarge the window, calculating change in characters
1462 ;; of default font. Do not let the window to become 1466 ;; of default font. Do not let the window to become
1463 ;; less than alolwed minimum (not because that's critical 1467 ;; less than alolwed minimum (not because that's critical