Avoid erratic behavior of menu-bar tooltips on w32 (Bug#19925)
src/w32fns.c (Fw32__menu_bar_in_use): New internal function. lisp/frame.el (blink-cursor-timer-function): Don't increment blink-cursor-blinks-done counter when a menu is active on a w32 frame.
This commit is contained in:
parent
02609324ce
commit
18178922a8
4 changed files with 26 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2015-02-23 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
|
* frame.el (blink-cursor-timer-function): Don't increment
|
||||||
|
blink-cursor-blinks-done counter when a menu is active on a w32
|
||||||
|
frame. (Bug#19925)
|
||||||
|
|
||||||
2015-02-19 Juri Linkov <juri@linkov.net>
|
2015-02-19 Juri Linkov <juri@linkov.net>
|
||||||
|
|
||||||
* comint.el (comint-line-beginning-position): Revert searching for
|
* comint.el (comint-line-beginning-position): Revert searching for
|
||||||
|
|
|
@ -1798,8 +1798,12 @@ command starts, by installing a pre-command hook."
|
||||||
(defun blink-cursor-timer-function ()
|
(defun blink-cursor-timer-function ()
|
||||||
"Timer function of timer `blink-cursor-timer'."
|
"Timer function of timer `blink-cursor-timer'."
|
||||||
(internal-show-cursor nil (not (internal-show-cursor-p)))
|
(internal-show-cursor nil (not (internal-show-cursor-p)))
|
||||||
|
;; Suspend counting blinks when the w32 menu-bar menu is displayed,
|
||||||
|
;; since otherwise menu tooltips will behave erratically.
|
||||||
|
(or (and (fboundp 'w32--menu-bar-in-use)
|
||||||
|
(w32--menu-bar-in-use))
|
||||||
|
(setq blink-cursor-blinks-done (1+ blink-cursor-blinks-done)))
|
||||||
;; Each blink is two calls to this function.
|
;; Each blink is two calls to this function.
|
||||||
(setq blink-cursor-blinks-done (1+ blink-cursor-blinks-done))
|
|
||||||
(when (and (> blink-cursor-blinks 0)
|
(when (and (> blink-cursor-blinks 0)
|
||||||
(<= (* 2 blink-cursor-blinks) blink-cursor-blinks-done))
|
(<= (* 2 blink-cursor-blinks) blink-cursor-blinks-done))
|
||||||
(blink-cursor-suspend)
|
(blink-cursor-suspend)
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-02-23 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
|
* w32fns.c (Fw32__menu_bar_in_use): New internal function.
|
||||||
|
(Bug#19925)
|
||||||
|
|
||||||
2015-02-20 Glenn Morris <rgm@gnu.org>
|
2015-02-20 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* fileio.c (Fmake_temp_name): Doc tweaks. (Bug#19858)
|
* fileio.c (Fmake_temp_name): Doc tweaks. (Bug#19858)
|
||||||
|
|
10
src/w32fns.c
10
src/w32fns.c
|
@ -8063,6 +8063,15 @@ w32_sys_ring_bell (struct frame *f)
|
||||||
MessageBeep (sound_type);
|
MessageBeep (sound_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFUN ("w32--menu-bar-in-use", Fw32__menu_bar_in_use, Sw32__menu_bar_in_use,
|
||||||
|
0, 0, 0,
|
||||||
|
doc: /* Return non-nil when a menu-bar menu is being used.
|
||||||
|
Internal use only. */)
|
||||||
|
(void)
|
||||||
|
{
|
||||||
|
return menubar_in_use ? Qt : Qnil;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
Initialization
|
Initialization
|
||||||
|
@ -8439,6 +8448,7 @@ only be necessary if the default setting causes problems. */);
|
||||||
defsubr (&Sw32_window_exists_p);
|
defsubr (&Sw32_window_exists_p);
|
||||||
defsubr (&Sw32_frame_rect);
|
defsubr (&Sw32_frame_rect);
|
||||||
defsubr (&Sw32_battery_status);
|
defsubr (&Sw32_battery_status);
|
||||||
|
defsubr (&Sw32__menu_bar_in_use);
|
||||||
|
|
||||||
#ifdef WINDOWSNT
|
#ifdef WINDOWSNT
|
||||||
defsubr (&Sfile_system_info);
|
defsubr (&Sfile_system_info);
|
||||||
|
|
Loading…
Add table
Reference in a new issue