mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Update Android port
* lisp/calc/calc.el (calc-mode, calc): Make sure the on-screen keyboard is not hidden when a Calc buffer is created or a Calc Trail window is being created for the first time. * lisp/touch-screen.el (touch-screen-window-selection-changed): Take touch-screen-display-keyboard in to account. * src/sfnt.c (sfnt_decompose_compound_glyph) (sfnt_interpret_compound_glyph_1): Reset `defer_offsets' before processing each component. (sfnt_lerp_half): Avoid undefined shift of negative value. (sfnt_compute_tuple_scale): Pacify compiler warning.
This commit is contained in:
parent
259bec95de
commit
c3fadfd10f
3 changed files with 75 additions and 55 deletions
|
|
@ -1357,7 +1357,10 @@ Notations: 3.14e6 3.14 * 10^6
|
|||
(calc-set-mode-line)
|
||||
(calc-check-defines)
|
||||
(if calc-buffer-list (setq calc-stack (copy-sequence calc-stack)))
|
||||
(add-to-list 'calc-buffer-list (current-buffer) t))
|
||||
(add-to-list 'calc-buffer-list (current-buffer) t)
|
||||
;; While Calc buffers are read only, the on screen keyboard should
|
||||
;; be displayed in order to accept user input.
|
||||
(setq-local touch-screen-display-keyboard t))
|
||||
|
||||
(defvar calc-check-defines 'calc-check-defines) ; Suitable for run-hooks.
|
||||
(defun calc-check-defines ()
|
||||
|
|
@ -1451,49 +1454,54 @@ See `window-dedicated-p' for what that means."
|
|||
(calc-grab-region (region-beginning) (region-end) nil)
|
||||
(when (= (prefix-numeric-value arg) -2)
|
||||
(calc-keypad))))
|
||||
(when (get-buffer-window "*Calc Keypad*")
|
||||
(calc-keypad)
|
||||
(set-buffer (window-buffer)))
|
||||
(if (derived-mode-p 'calc-mode)
|
||||
(calc-quit)
|
||||
(calc-create-buffer)
|
||||
(setq calc-was-keypad-mode nil)
|
||||
(if (or (eq full-display t)
|
||||
(and (null full-display) calc-full-mode))
|
||||
(switch-to-buffer (current-buffer) t)
|
||||
(if (get-buffer-window (current-buffer))
|
||||
(select-window (get-buffer-window (current-buffer)))
|
||||
(if calc-window-hook
|
||||
(run-hooks 'calc-window-hook)
|
||||
(let ((w (get-largest-window)))
|
||||
(if (and pop-up-windows
|
||||
(> (window-height w)
|
||||
(+ window-min-height calc-window-height 2)))
|
||||
(progn
|
||||
(setq w (split-window w
|
||||
(- (window-height w)
|
||||
calc-window-height 2)
|
||||
nil))
|
||||
(set-window-buffer w (current-buffer))
|
||||
(select-window w))
|
||||
(pop-to-buffer (current-buffer)))))))
|
||||
(with-current-buffer (calc-trail-buffer)
|
||||
(and calc-display-trail
|
||||
(calc-trail-display 1 t)))
|
||||
(message (substitute-command-keys
|
||||
(concat "Welcome to the GNU Emacs Calculator! \\<calc-mode-map>"
|
||||
"Press \\[calc-help] or \\[calc-help-prefix] for help, \\[calc-quit] to quit")))
|
||||
(run-hooks 'calc-start-hook)
|
||||
(and (windowp full-display)
|
||||
(window-point full-display)
|
||||
(select-window full-display))
|
||||
(and calc-make-windows-dedicated
|
||||
(set-window-dedicated-p nil t))
|
||||
(calc-check-defines)
|
||||
(when (and calc-said-hello interactive)
|
||||
(sit-for 2)
|
||||
(message ""))
|
||||
(setq calc-said-hello t))))
|
||||
;; If the selected window changes here, Emacs may think that the
|
||||
;; selected window is read only, and no on screen keyboard should
|
||||
;; be displayed. Make sure that any active on screen keyboard is
|
||||
;; not hidden by accident.
|
||||
(let ((touch-screen-display-buffer t))
|
||||
(when (get-buffer-window "*Calc Keypad*")
|
||||
(calc-keypad)
|
||||
(set-buffer (window-buffer)))
|
||||
(if (derived-mode-p 'calc-mode)
|
||||
(calc-quit)
|
||||
(calc-create-buffer)
|
||||
(setq calc-was-keypad-mode nil)
|
||||
(if (or (eq full-display t)
|
||||
(and (null full-display) calc-full-mode))
|
||||
(switch-to-buffer (current-buffer) t)
|
||||
(if (get-buffer-window (current-buffer))
|
||||
(select-window (get-buffer-window (current-buffer)))
|
||||
(if calc-window-hook
|
||||
(run-hooks 'calc-window-hook)
|
||||
(let ((w (get-largest-window)))
|
||||
(if (and pop-up-windows
|
||||
(> (window-height w)
|
||||
(+ window-min-height calc-window-height 2)))
|
||||
(progn
|
||||
(setq w (split-window w
|
||||
(- (window-height w)
|
||||
calc-window-height 2)
|
||||
nil))
|
||||
(set-window-buffer w (current-buffer))
|
||||
(select-window w))
|
||||
(pop-to-buffer (current-buffer)))))))
|
||||
(with-current-buffer (calc-trail-buffer)
|
||||
(and calc-display-trail
|
||||
(calc-trail-display 1 t)))
|
||||
(message (substitute-command-keys
|
||||
(concat "Welcome to the GNU Emacs Calculator! \\<calc-mode-map>"
|
||||
"Press \\[calc-help] or \\[calc-help-prefix] for help, \\[calc-quit] to quit")))
|
||||
(run-hooks 'calc-start-hook)
|
||||
(and (windowp full-display)
|
||||
(window-point full-display)
|
||||
(select-window full-display))
|
||||
(and calc-make-windows-dedicated
|
||||
(set-window-dedicated-p nil t))
|
||||
(calc-check-defines)
|
||||
(when (and calc-said-hello interactive)
|
||||
(sit-for 2)
|
||||
(message ""))
|
||||
(setq calc-said-hello t)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun full-calc (&optional interactive)
|
||||
|
|
|
|||
|
|
@ -373,8 +373,11 @@ If point is now on read only text, hide the on screen keyboard.
|
|||
Otherwise, cancel any timer that is supposed to hide the keyboard
|
||||
in response to the minibuffer being closed."
|
||||
(with-selected-frame frame
|
||||
(if (or buffer-read-only
|
||||
(get-text-property (point) 'read-only))
|
||||
(if (and (or buffer-read-only
|
||||
(get-text-property (point) 'read-only))
|
||||
;; Don't hide the on-screen keyboard if it's always
|
||||
;; supposed to be displayed.
|
||||
(not touch-screen-display-keyboard))
|
||||
(frame-toggle-on-screen-keyboard (selected-frame) t)
|
||||
;; Prevent hiding the minibuffer from hiding the on screen
|
||||
;; keyboard.
|
||||
|
|
|
|||
27
src/sfnt.c
27
src/sfnt.c
|
|
@ -2672,9 +2672,6 @@ sfnt_decompose_compound_glyph (struct sfnt_glyph *glyph,
|
|||
if (recursion_count > 16)
|
||||
return 1;
|
||||
|
||||
/* Don't defer offsets. */
|
||||
defer_offsets = false;
|
||||
|
||||
for (j = 0; j < glyph->compound->num_components; ++j)
|
||||
{
|
||||
/* Look up the associated subglyph. */
|
||||
|
|
@ -2685,6 +2682,12 @@ sfnt_decompose_compound_glyph (struct sfnt_glyph *glyph,
|
|||
if (!subglyph)
|
||||
return 1;
|
||||
|
||||
/* Don't defer offsets. This variable is set if the component
|
||||
glyph is a compound glyph that is anchored to a previously
|
||||
decomposed point, and needs its coordinates adjusted after
|
||||
decomposition completes. */
|
||||
defer_offsets = false;
|
||||
|
||||
/* Record the size of the point array before expansion. This
|
||||
will be the base to apply to all points coming from this
|
||||
subglyph. */
|
||||
|
|
@ -2922,8 +2925,8 @@ static void
|
|||
sfnt_lerp_half (struct sfnt_point *control1, struct sfnt_point *control2,
|
||||
struct sfnt_point *result)
|
||||
{
|
||||
result->x = control1->x + ((control2->x - control1->x) >> 1);
|
||||
result->y = control1->y + ((control2->y - control1->y) >> 1);
|
||||
result->x = control1->x + ((control2->x - control1->x) / 2);
|
||||
result->y = control1->y + ((control2->y - control1->y) / 2);
|
||||
}
|
||||
|
||||
/* Decompose contour data inside X, Y and FLAGS, between the indices
|
||||
|
|
@ -11624,9 +11627,6 @@ sfnt_interpret_compound_glyph_1 (struct sfnt_glyph *glyph,
|
|||
if (recursion_count > 16)
|
||||
return "Overly deep recursion in compound glyph data";
|
||||
|
||||
/* Don't defer offsets. */
|
||||
defer_offsets = false;
|
||||
|
||||
/* Pacify -Wmaybe-uninitialized. */
|
||||
point = point2 = 0;
|
||||
|
||||
|
|
@ -11640,6 +11640,12 @@ sfnt_interpret_compound_glyph_1 (struct sfnt_glyph *glyph,
|
|||
if (!subglyph)
|
||||
return "Failed to obtain component glyph";
|
||||
|
||||
/* Don't defer offsets. This variable is set if the component
|
||||
glyph is a compound glyph that is anchored to a previously
|
||||
decomposed point, and needs its coordinates adjusted after
|
||||
decomposition completes. */
|
||||
defer_offsets = false;
|
||||
|
||||
/* Record the size of the point array before expansion. This
|
||||
will be the base to apply to all points coming from this
|
||||
subglyph. */
|
||||
|
|
@ -13783,7 +13789,7 @@ sfnt_compute_tuple_scale (struct sfnt_blend *blend, bool intermediate_p,
|
|||
sfnt_f2dot14 *intermediate_end)
|
||||
{
|
||||
int i;
|
||||
sfnt_fixed coord, start, end;
|
||||
sfnt_fixed coord, start UNINIT, end UNINIT;
|
||||
sfnt_fixed scale;
|
||||
|
||||
/* scale is initially 1.0. */
|
||||
|
|
@ -13794,6 +13800,9 @@ sfnt_compute_tuple_scale (struct sfnt_blend *blend, bool intermediate_p,
|
|||
/* Load values for this axis, scaled up to sfnt_fixed. */
|
||||
coord = coords[i] * 4;
|
||||
|
||||
/* GCC warns about start and end being used when uninitialized,
|
||||
but they are used only if intermediate_p. */
|
||||
|
||||
if (intermediate_p)
|
||||
{
|
||||
start = intermediate_start[i] * 4;
|
||||
|
|
|
|||
Loading…
Reference in a new issue