Skip to content

Commit

Permalink
Add patch to fix scintilla input method when using im-quartz
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Oct 23, 2019
1 parent ad4fef0 commit bdf7152
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions patches/02-geany_scintilla_im_fix.patch
@@ -0,0 +1,38 @@
# HG changeset patch
# User Jiří Techet <techet@gmail.com>
# Date 1571822802 -7200
# Wed Oct 23 11:26:42 2019 +0200
# Node ID 46e1cd396ba57332ec81628c7365bfc91ed207e1
# Parent 4f8c3b19095af4f0d333f1b6aa1ff1e3a69d9f4c
Call SetCandidateWindowPos() inside PreeditChanged()

On macOS it is possible to long-press a key to get a popup offering to
select characters with additional accents. This popup should appear
at the position of the caret. Scintilla however only sets the
caret position using gtk_im_context_set_cursor_location() for some
input methods (which exclude im-quartz) so the caret position isn't
set correctly and macOS always displays the popup at the very bottom
of the screen.

Moving SetCandidateWindowPos() into PreeditChanged() seems to fix
the problem.

diff --git a/scintilla/gtk/ScintillaGTK.cxx b/scintilla/gtk/ScintillaGTK.cxx
--- a/scintilla/gtk/ScintillaGTK.cxx
+++ b/scintilla/gtk/ScintillaGTK.cxx
@@ -2442,7 +2442,6 @@
}

EnsureCaretVisible();
- SetCandidateWindowPos();
ShowCaretAtCurrentPosition();
} catch (...) {
errorStatus = SC_STATUS_FAILURE;
@@ -2487,6 +2486,7 @@
} else {
sciThis->PreeditChangedWindowedThis();
}
+ sciThis->SetCandidateWindowPos();
}

void ScintillaGTK::StyleSetText(GtkWidget *widget, GtkStyle *, void *) {

0 comments on commit bdf7152

Please sign in to comment.