summaryrefslogtreecommitdiff
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2008-03-19 17:03:23 +0000
committerJason Rumney <jasonr@gnu.org>2008-03-19 17:03:23 +0000
commitd35c8a390557389063a6f0eb6cc68373b40ac8af (patch)
treeacb54e8d7afe8fc0e73f4e651f36a5d6f88fa801 /src/keyboard.c
parentfbf076d18a3a828d9ad5d47f6adca2f625a7d1cb (diff)
downloademacs-d35c8a390557389063a6f0eb6cc68373b40ac8af.tar.gz
* w32fns.c (hourglass_timer, hourglass_hwnd): New variables.
(syms_of_w32fns): Initialize them. (HOURGLASS_ID): New constant. (x_window_to_frame): Don't check hourglass_window. (w32_wnd_proc) <WM_TIMER>: Handle hourglass_timer. (w32_wnd_proc) <WM_EXITMENULOOP>: Set pending hourglass cursor. (w32_wnd_proc) <WM_SETCURSOR>: Set the hourglass or current cursor. (w32_wnd_proc) <WM_EMACS_SETCURSOR>: Set frame's current_cursor. Only change the cursor if hourglass is not active. (Fx_create_frame): Initialize frame's current_cursor. (hourglass_atimer): Remove. (hourglass_started): New function. (start_hourglass, cancel_hourglass, hide_hourglass): Adapt to w32. (show_hourglass): Adapt to w32, changing argument to frame. * w32term.h (struct w32_output): Remove hourglass_window. Add current_cursor. * eval.c (call_debugger, Fsignal): * keyboard.c (recursive_edit_1, cmd_error, Ftop_level) (command_loop_1, Fread_key_sequence, Fread_key_sequence_vector) (Fexecute_extended_command, cancel_hourglass_unwind): * minibuf.c (read_minibuf): * fns.c (Fy_or_n_p): Enable hourglass when HAVE_WINDOW_SYSTEM.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 16b9006b15f..cdcf4c6b608 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -935,7 +935,7 @@ recursive_edit_1 ()
specbind (Qstandard_input, Qt);
}
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
/* The command loop has started an hourglass timer, so we have to
cancel it here, otherwise it will fire because the recursive edit
can take some time. Do not check for display_hourglass_p here,
@@ -1220,7 +1220,7 @@ cmd_error (data)
Lisp_Object old_level, old_length;
char macroerror[50];
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
if (display_hourglass_p)
cancel_hourglass ();
#endif
@@ -1396,7 +1396,7 @@ DEFUN ("top-level", Ftop_level, Stop_level, 0, 0, "",
doc: /* Exit all recursive editing levels. */)
()
{
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
if (display_hourglass_p)
cancel_hourglass ();
#endif
@@ -1519,7 +1519,7 @@ static void adjust_point_for_property P_ ((int, int));
/* Cancel hourglass from protect_unwind.
ARG is not used. */
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
static Lisp_Object
cancel_hourglass_unwind (arg)
Lisp_Object arg;
@@ -1891,7 +1891,7 @@ command_loop_1 ()
/* Here for a command that isn't executed directly */
{
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
int scount = SPECPDL_INDEX ();
if (display_hourglass_p
@@ -1907,7 +1907,7 @@ command_loop_1 ()
Fundo_boundary ();
Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
/* Do not check display_hourglass_p here, because
Fcommand_execute could change it, but we should cancel
hourglass cursor anyway.
@@ -10273,7 +10273,7 @@ will read just one key sequence. */)
this_single_command_key_start = 0;
}
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
if (display_hourglass_p)
cancel_hourglass ();
#endif
@@ -10285,7 +10285,7 @@ will read just one key sequence. */)
#if 0 /* The following is fine for code reading a key sequence and
then proceeding with a lenghty computation, but it's not good
for code reading keys in a loop, like an input method. */
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
if (display_hourglass_p)
start_hourglass ();
#endif
@@ -10333,7 +10333,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
this_single_command_key_start = 0;
}
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
if (display_hourglass_p)
cancel_hourglass ();
#endif
@@ -10342,7 +10342,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
prompt, ! NILP (dont_downcase_last),
! NILP (can_return_switch_frame), 0);
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
if (display_hourglass_p)
start_hourglass ();
#endif
@@ -10465,7 +10465,7 @@ give to the command you invoke, if it asks for an argument. */)
Lisp_Object saved_keys, saved_last_point_position_buffer;
Lisp_Object bindings, value;
struct gcpro gcpro1, gcpro2, gcpro3;
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
/* The call to Fcompleting_read wil start and cancel the hourglass,
but if the hourglass was already scheduled, this means that no
hourglass will be shown for the actual M-x command itself.
@@ -10505,7 +10505,7 @@ give to the command you invoke, if it asks for an argument. */)
Qt, Qnil, Qextended_command_history, Qnil,
Qnil);
-#ifdef HAVE_X_WINDOWS
+#ifdef HAVE_WINDOW_SYSTEM
if (hstarted) start_hourglass ();
#endif