diff options
| author | Jim Blandy | 1992-12-24 06:16:36 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-12-24 06:16:36 +0000 |
| commit | db269683bcb041c85735cba624575a643bb9c807 (patch) | |
| tree | 7ba10a60f8790f17f737eb6fa5365da26dcb0cdd /src | |
| parent | c2e42adb64d357b97877e5517425f91d81c1932e (diff) | |
| download | emacs-db269683bcb041c85735cba624575a643bb9c807.tar.gz emacs-db269683bcb041c85735cba624575a643bb9c807.zip | |
* keyboard.c (Qscrollbar_movement, Qvertical_scrollbar,
Qabove_handle, Qhandle, Qbelow_handle): New symbols.
(make_lispy_event): New code to build scrollbar clicks.
(make_lispy_movement): New code to handle scrollbar movement.
(head_table): Include Qscrollbar_movement in the event heads.
(syms_of_keyboard): Init and staticpro Qvertical_scrollbar,
Qabove_handle, Qhandle, and Qbelow_handle.
* keyboard.h (Qscrollbar_movement): Declare this along with the
other event types.
* lisp.h (Qvertical_scrollbar): Declare this.
* window.c (window_from_scrollbar): New function.
* window.c (Fset_window_configuration): Don't restore the frame's
focus redirection if the target frame is now dead.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index df8bd81bb4b..1d9eb2c8b0c 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -432,6 +432,34 @@ window_from_coordinates (frame, x, y, part) | |||
| 432 | return Qnil; | 432 | return Qnil; |
| 433 | } | 433 | } |
| 434 | 434 | ||
| 435 | /* Find the window containing the scrollbar BAR on FRAME. We need to | ||
| 436 | search for scrollbars, rather than just having a field in the | ||
| 437 | scrollbar saying what window it's attached to, because scrollbars | ||
| 438 | may be deallocated before the events which occurred on them are | ||
| 439 | dequeued. We can't dereference a scrollbar pointer until we know | ||
| 440 | it's live by finding it in a window structure. */ | ||
| 441 | |||
| 442 | Lisp_Object | ||
| 443 | window_from_scrollbar (frame, bar) | ||
| 444 | FRAME_PTR frame; | ||
| 445 | struct scrollbar *bar; | ||
| 446 | { | ||
| 447 | register Lisp_Object tem, first; | ||
| 448 | |||
| 449 | tem = first = FRAME_SELECTED_WINDOW (frame); | ||
| 450 | |||
| 451 | do | ||
| 452 | { | ||
| 453 | if (WINDOW_VERTICAL_SCROLLBAR (XWINDOW (tem)) == bar) | ||
| 454 | return tem; | ||
| 455 | |||
| 456 | tem = Fnext_window (tem, Qt, Qlambda); | ||
| 457 | } | ||
| 458 | while (! EQ (tem, first)); | ||
| 459 | |||
| 460 | return Qnil; | ||
| 461 | } | ||
| 462 | |||
| 435 | DEFUN ("window-at", Fwindow_at, Swindow_at, 2, 3, 0, | 463 | DEFUN ("window-at", Fwindow_at, Swindow_at, 2, 3, 0, |
| 436 | "Return window containing row ROW, column COLUMN on FRAME.\n\ | 464 | "Return window containing row ROW, column COLUMN on FRAME.\n\ |
| 437 | If omitted, FRAME defaults to the currently selected frame.\n\ | 465 | If omitted, FRAME defaults to the currently selected frame.\n\ |
| @@ -2553,7 +2581,10 @@ by `current-window-configuration' (which see).") | |||
| 2553 | Fselect_window (data->current_window); | 2581 | Fselect_window (data->current_window); |
| 2554 | 2582 | ||
| 2555 | #ifdef MULTI_FRAME | 2583 | #ifdef MULTI_FRAME |
| 2556 | Fredirect_frame_focus (frame, data->focus_frame); | 2584 | if (NILP (data->focus_frame) |
| 2585 | || (XTYPE (data->focus_frame) == Lisp_Frame | ||
| 2586 | && FRAME_LIVE_P (XFRAME (data->focus_frame)))) | ||
| 2587 | Fredirect_frame_focus (frame, data->focus_frame); | ||
| 2557 | #endif | 2588 | #endif |
| 2558 | 2589 | ||
| 2559 | #if 0 /* I don't understand why this is needed, and it causes problems | 2590 | #if 0 /* I don't understand why this is needed, and it causes problems |