blob: deeefcc17ea0f72f0bfae07b0810299aa0f22d93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
Scintilla changes:
* Add Message::ChangeInsertion for programmatically setting input method.
This is helpful on newer versions of macOS, where changing the input method is flaky.
* Handle leading whitespace in XPM images in order to prevent crashes.
* Fixed crash in upstream Scintilla that will ultimately be fixed.
diff -r 52d56f79dc0f gtk/ScintillaGTK.cxx
--- a/gtk/ScintillaGTK.cxx Fri Apr 09 15:11:26 2021 +1000
+++ b/gtk/ScintillaGTK.cxx Tue Apr 13 16:36:00 2021 -0400
@@ -885,6 +887,11 @@
case Message::GetDirectPointer:
return reinterpret_cast<sptr_t>(this);
+ case Message::ChangeInsertion:
+ // Hijack this interface to programmatically set input method.
+ gtk_im_multicontext_set_context_id(GTK_IM_MULTICONTEXT(im_context), ConstCharPtrFromSPtr(lParam));
+ break;
+
case Message::TargetAsUTF8:
return TargetAsUTF8(CharPtrFromSPtr(lParam));
diff -r 22b6bbb36280 src/XPM.cxx
--- a/src/XPM.cxx Sat Sep 05 07:55:08 2020 +1000
+++ b/src/XPM.cxx Fri Oct 02 20:32:13 2020 -0400
@@ -92,6 +92,9 @@
void XPM::Init(const char *textForm) {
// Test done is two parts to avoid possibility of overstepping the memory
// if memcmp implemented strangely. Must be 4 bytes at least at destination.
+ while (*textForm == ' ') {
+ textForm++;
+ }
if ((0 == memcmp(textForm, "/* X", 4)) && (0 == memcmp(textForm, "/* XPM */", 9))) {
// Build the lines form out of the text form
std::vector<const char *> linesForm = LinesFormFromTextForm(textForm);
diff -r beeb51d2c645 gtk/ScintillaGTK.cxx
--- a/gtk/ScintillaGTK.cxx Wed Sep 29 10:29:58 2021 +1000
+++ b/gtk/ScintillaGTK.cxx Thu Sep 30 16:28:06 2021 -0400
@@ -282,9 +282,6 @@
if (settingsHandlerId) {
g_signal_handler_disconnect(settings, settingsHandlerId);
}
- if (settings) {
- g_object_unref(settings);
- }
}
void ScintillaGTK::RealizeThis(GtkWidget *widget) {
|