Commit db269683 authored by Jim Blandy's avatar Jim Blandy

* 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.
parent c2e42adb
......@@ -432,6 +432,34 @@ window_from_coordinates (frame, x, y, part)
return Qnil;
/* Find the window containing the scrollbar BAR on FRAME. We need to
search for scrollbars, rather than just having a field in the
scrollbar saying what window it's attached to, because scrollbars
may be deallocated before the events which occurred on them are
dequeued. We can't dereference a scrollbar pointer until we know
it's live by finding it in a window structure. */
window_from_scrollbar (frame, bar)
FRAME_PTR frame;
struct scrollbar *bar;
register Lisp_Object tem, first;
tem = first = FRAME_SELECTED_WINDOW (frame);
return tem;
tem = Fnext_window (tem, Qt, Qlambda);
while (! EQ (tem, first));
return Qnil;
DEFUN ("window-at", Fwindow_at, Swindow_at, 2, 3, 0,
"Return window containing row ROW, column COLUMN on FRAME.\n\
If omitted, FRAME defaults to the currently selected frame.\n\
......@@ -2553,7 +2581,10 @@ by `current-window-configuration' (which see).")
Fselect_window (data->current_window);
Fredirect_frame_focus (frame, data->focus_frame);
if (NILP (data->focus_frame)
|| (XTYPE (data->focus_frame) == Lisp_Frame
&& FRAME_LIVE_P (XFRAME (data->focus_frame))))
Fredirect_frame_focus (frame, data->focus_frame);
#if 0 /* I don't understand why this is needed, and it causes problems
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment