Skip to content
Prev Previous commit
Next Next commit
tweak
  • Loading branch information
cxxxr committed Jul 30, 2023
commit a9a968f04900c75540c434b3a0e0b1bd4683055f
8 changes: 4 additions & 4 deletions frontends/sdl2/main.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -998,13 +998,13 @@

(defun set-input-method ()
(let* ((view (lem:window-view (lem:current-window)))
(cursor-x (lem:last-print-cursor-x (lem:current-window)))
(cursor-y (lem:last-print-cursor-y (lem:current-window)))
(cursor-x (* (lem:last-print-cursor-x (lem:current-window)) (char-width)))
(cursor-y (* (lem:last-print-cursor-y (lem:current-window)) (char-height)))
(text lem-sdl2/keyboard::*textediting-text*)
(x (+ (* (view-x view) (char-width))
(* cursor-x (char-width))))
cursor-x))
(y (+ (* (view-y view) (char-height))
(* cursor-y (char-height)))))
cursor-y)))
(sdl2:with-rects ((rect x y (* (char-width) (lem:string-width text)) (char-height)))
(sdl2-ffi.functions:sdl-set-text-input-rect rect)
(when (plusp (length text))
Expand Down