diff options
| author | Yuuki Harano | 2021-05-15 23:39:35 +0900 |
|---|---|---|
| committer | Yuuki Harano | 2021-05-15 23:39:35 +0900 |
| commit | d0fa569b7303c2d893b54d0a7af7a521308a5ed4 (patch) | |
| tree | cf0087d9c0e725398500f0c3cab0760d406056ec /src/pgtkterm.c | |
| parent | 8a649cba44cc637b5326cee9fe3febc55c653719 (diff) | |
| download | emacs-d0fa569b7303c2d893b54d0a7af7a521308a5ed4.tar.gz emacs-d0fa569b7303c2d893b54d0a7af7a521308a5ed4.zip | |
Revert "Update texts while busy"
This reverts commit 8a649cba44cc637b5326cee9fe3febc55c653719.
Because the position of the initial frame is not desired, unless
initial-frame-alist is set.
Diffstat (limited to 'src/pgtkterm.c')
| -rw-r--r-- | src/pgtkterm.c | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 194a2551c94..533b9ea894a 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c | |||
| @@ -3551,31 +3551,12 @@ pgtk_draw_fringe_bitmap (struct window *w, struct glyph_row *row, | |||
| 3551 | } | 3551 | } |
| 3552 | 3552 | ||
| 3553 | static struct atimer *hourglass_atimer = NULL; | 3553 | static struct atimer *hourglass_atimer = NULL; |
| 3554 | static int hourglass_enter_count = 0; | ||
| 3554 | 3555 | ||
| 3555 | static void | 3556 | static void |
| 3556 | hourglass_cb (struct atimer *timer) | 3557 | hourglass_cb (struct atimer *timer) |
| 3557 | { | 3558 | { |
| 3558 | /*NOP*/ | 3559 | /*NOP*/} |
| 3559 | } | ||
| 3560 | |||
| 3561 | static void | ||
| 3562 | start_timer (void) | ||
| 3563 | { | ||
| 3564 | static bool hourglass_inited = false; | ||
| 3565 | |||
| 3566 | /* For cursor animation, we receive signals, set pending_signals, and dispatch. */ | ||
| 3567 | /* This is useful for drawing text while busy, and C-g takes effect while busy. */ | ||
| 3568 | if (!hourglass_inited) | ||
| 3569 | { | ||
| 3570 | struct timespec ts = make_timespec (0, 50 * 1000 * 1000); | ||
| 3571 | if (hourglass_atimer != NULL) | ||
| 3572 | cancel_atimer (hourglass_atimer); | ||
| 3573 | hourglass_atimer = | ||
| 3574 | start_atimer (ATIMER_CONTINUOUS, ts, hourglass_cb, NULL); | ||
| 3575 | |||
| 3576 | hourglass_inited = true; | ||
| 3577 | } | ||
| 3578 | } | ||
| 3579 | 3560 | ||
| 3580 | static void | 3561 | static void |
| 3581 | pgtk_show_hourglass (struct frame *f) | 3562 | pgtk_show_hourglass (struct frame *f) |
| @@ -3591,13 +3572,32 @@ pgtk_show_hourglass (struct frame *f) | |||
| 3591 | gdk_window_raise (gtk_widget_get_window (x->hourglass_widget)); | 3572 | gdk_window_raise (gtk_widget_get_window (x->hourglass_widget)); |
| 3592 | gdk_window_set_cursor (gtk_widget_get_window (x->hourglass_widget), | 3573 | gdk_window_set_cursor (gtk_widget_get_window (x->hourglass_widget), |
| 3593 | x->hourglass_cursor); | 3574 | x->hourglass_cursor); |
| 3575 | |||
| 3576 | /* For cursor animation, we receive signals, set pending_signals, and dispatch. */ | ||
| 3577 | if (hourglass_enter_count++ == 0) | ||
| 3578 | { | ||
| 3579 | struct timespec ts = make_timespec (0, 50 * 1000 * 1000); | ||
| 3580 | if (hourglass_atimer != NULL) | ||
| 3581 | cancel_atimer (hourglass_atimer); | ||
| 3582 | hourglass_atimer = | ||
| 3583 | start_atimer (ATIMER_CONTINUOUS, ts, hourglass_cb, NULL); | ||
| 3584 | } | ||
| 3585 | |||
| 3586 | /* Cursor frequently stops animation. gtk's bug? */ | ||
| 3594 | } | 3587 | } |
| 3595 | 3588 | ||
| 3596 | static void | 3589 | static void |
| 3597 | pgtk_hide_hourglass (struct frame *f) | 3590 | pgtk_hide_hourglass (struct frame *f) |
| 3598 | { | 3591 | { |
| 3599 | struct pgtk_output *x = FRAME_X_OUTPUT (f); | 3592 | struct pgtk_output *x = FRAME_X_OUTPUT (f); |
| 3600 | 3593 | if (--hourglass_enter_count == 0) | |
| 3594 | { | ||
| 3595 | if (hourglass_atimer != NULL) | ||
| 3596 | { | ||
| 3597 | cancel_atimer (hourglass_atimer); | ||
| 3598 | hourglass_atimer = NULL; | ||
| 3599 | } | ||
| 3600 | } | ||
| 3601 | if (x->hourglass_widget != NULL) | 3601 | if (x->hourglass_widget != NULL) |
| 3602 | { | 3602 | { |
| 3603 | gtk_widget_destroy (x->hourglass_widget); | 3603 | gtk_widget_destroy (x->hourglass_widget); |
| @@ -6995,8 +6995,6 @@ pgtk_term_init (Lisp_Object display_name, char *resource_name) | |||
| 6995 | 6995 | ||
| 6996 | unblock_input (); | 6996 | unblock_input (); |
| 6997 | 6997 | ||
| 6998 | start_timer(); | ||
| 6999 | |||
| 7000 | return dpyinfo; | 6998 | return dpyinfo; |
| 7001 | } | 6999 | } |
| 7002 | 7000 | ||