summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Rumney <jasonr@gnu.org>2009-02-08 15:35:36 +0000
committerJason Rumney <jasonr@gnu.org>2009-02-08 15:35:36 +0000
commit89e094286d3d48adbb5ea94f66f39dbf8303d9ab (patch)
treee812693bbda80b578823137c8c851529ab6000bf
parentc253eff0aef4b4340302090d9057ce45710d6a43 (diff)
downloademacs-89e094286d3d48adbb5ea94f66f39dbf8303d9ab.tar.gz
(w32_hide_hourglass): Handle case where frame
disappeared while hourglass was displayed. (Bug #2193)
-rw-r--r--src/ChangeLog5
-rw-r--r--src/w32fns.c13
2 files changed, 16 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4cd88a056ee..7c4cbf9f312 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-08 Jason Rumney <jasonr@gnu.org>
+
+ * w32fns.c (w32_hide_hourglass): Handle case where frame
+ disappeared while hourglass was displayed. (Bug #2193)
+
2009-02-07 Andreas Schwab <schwab@suse.de>
* unexelf.c (unexec): Fix error message.
diff --git a/src/w32fns.c b/src/w32fns.c
index 70964cb8667..16649cce2cb 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -5279,9 +5279,18 @@ w32_hide_hourglass ()
{
struct frame *f = x_window_to_frame (&one_w32_display_info,
hourglass_hwnd);
+ if (f)
+ f->output_data.w32->hourglass_p = 0;
+ else
+ /* If frame was deleted, restore to selected frame's cursor. */
+ f = SELECTED_FRAME ();
+
+ if (FRAME_W32_P (f))
+ SetCursor (f->output_data.w32->current_cursor);
+ else
+ /* No cursors on non GUI frames - restore to stock arrow cursor. */
+ SetCursor (w32_load_cursor (IDC_ARROW));
- f->output_data.w32->hourglass_p = 0;
- SetCursor (f->output_data.w32->current_cursor);
hourglass_shown_p = 0;
}
}