Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Tue, 24 Mar 2020 19:34:44 UTC
Commit: af48b3160668e7f183d358364fe6b396f5df4b9c
https://github.com/geany/geany-osx/commit/af48b3160668e7f183d358364fe6b396f…
Log Message:
-----------
Use 'quartz' as the default IM module
Since we are using the latest GTK release which fixes page up/down
when IM is enabled and since the latest patches to Scintilla fixes most
of the problems with IM, it should be safe to use quartz by default.
Modified Paths:
--------------
Launcher/geany/geany/main.m
geany.modules
patches/02-geany_scintilla_im_fix.patch
Modified: Launcher/geany/geany/main.m
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -186,7 +186,7 @@ static int run_geany() {
config = @{
THEME_KEY: [ConfigValue valueWithDefault:@"0" comment:@"0: automatic selection based on system settings (requires Geany restart when changed, macOS 10.14+); 1: light; 2: dark; make sure there's no ~/.config/gtk-3.0/settings.ini file, otherwise it overrides the settings made here"],
LOCALE_KEY: [ConfigValue valueWithDefault:@"" comment:@"no value: autodetect; locale string: locale to be used (e.g. en_US.UTF-8)"],
- IM_MODULE_KEY: [ConfigValue valueWithDefault:@"" comment:@"no value: don't use any IM module; module name: use the specified module, e.g. 'quartz' for native macOS behavior (slightly buggy so not enabled by default), for complete list of modules see Geany.app/Contents/Resources/lib/gtk-3.0/3.0.0/immodules, use without the 'im-' prefix"],
+ IM_MODULE_KEY: [ConfigValue valueWithDefault:@"quartz" comment:@"no value: don't use any IM module; module name: use the specified module, e.g. 'quartz' for native macOS behavior, for complete list of modules, see Geany.app/Contents/Resources/lib/gtk-3.0/3.0.0/immodules, use without the 'im-' prefix"],
};
read_config();
Modified: geany.modules
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -105,7 +105,7 @@
<!-- This patch corresponds to https://github.com/geany/geany/pull/2363 -->
<patch file="https://github.com/geany/geany-osx/raw/master/patches/01-geany_config_shell…" strip="1" />
<patch file="https://github.com/geany/geany-osx/raw/master/patches/03-geany_vte_login_sh…" strip="1" />
- <!-- TODO: remove once merged upstream-->
+ <!-- TODO: remove once Geany updates to the latest Scintilla -->
<patch file="https://github.com/geany/geany-osx/raw/master/patches/02-geany_scintilla_im…" strip="1" />
</branch>
<dependencies>
@@ -123,7 +123,7 @@
<!-- This patch corresponds to https://github.com/geany/geany/pull/2363 -->
<patch file="https://github.com/geany/geany-osx/raw/master/patches/01-geany_config_shell…" strip="1" />
<patch file="https://github.com/geany/geany-osx/raw/master/patches/03-geany_vte_login_sh…" strip="1" />
- <!-- TODO: remove once merged upstream-->
+ <!-- TODO: remove once Geany updates to the latest Scintilla -->
<patch file="https://github.com/geany/geany-osx/raw/master/patches/02-geany_scintilla_im…" strip="1" />
</branch>
<dependencies>
Modified: patches/02-geany_scintilla_im_fix.patch
92 lines changed, 65 insertions(+), 27 deletions(-)
===================================================================
@@ -1,38 +1,76 @@
# HG changeset patch
-# User Jiří Techet <techet(a)gmail.com>
-# Date 1571822802 -7200
-# Wed Oct 23 11:26:42 2019 +0200
-# Node ID 46e1cd396ba57332ec81628c7365bfc91ed207e1
-# Parent 4f8c3b19095af4f0d333f1b6aa1ff1e3a69d9f4c
-Call SetCandidateWindowPos() inside PreeditChanged()
+# User Zufu Liu
+# Date 1578312404 -39600
+# Mon Jan 06 23:06:44 2020 +1100
+# Node ID 9d42a88f08cc4d336ecdb0c7f1587efdb00bddbe
+# Parent 4dad3058a47731d1f90d09341e546465170fa40f
+Bug [#2135]. Set candidate window position in windowed IME mode.
-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.
+diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
+--- a/gtk/ScintillaGTK.cxx
++++ b/gtk/ScintillaGTK.cxx
+@@ -2432,6 +2432,8 @@
+ try {
+ PreEditString pes(im_context);
+ if (strlen(pes.str) > 0) {
++ SetCandidateWindowPos();
++
+ PangoLayout *layout = gtk_widget_create_pango_layout(PWidget(wText), pes.str);
+ pango_layout_set_attributes(layout, pes.attrs);
+
+# HG changeset patch
+# User Zufu Liu
+# Date 1578312869 -39600
+# Mon Jan 06 23:14:29 2020 +1100
+# Node ID be67578909888e76e81421d32459ace2a59b9d1d
+# Parent 9d42a88f08cc4d336ecdb0c7f1587efdb00bddbe
+Bug [#2135]. Improve location of candidate window.
-Moving SetCandidateWindowPos() into PreeditChanged() seems to fix
-the problem.
+diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
+--- a/gtk/ScintillaGTK.cxx
++++ b/gtk/ScintillaGTK.cxx
+@@ -2315,8 +2315,10 @@
+ // Composition box accompanies candidate box.
+ const Point pt = PointMainCaret();
+ GdkRectangle imeBox = {0}; // No need to set width
+- imeBox.x = static_cast<gint>(pt.x); // Only need positiion
+- imeBox.y = static_cast<gint>(pt.y) + vs.lineHeight; // underneath the first charater
++ imeBox.x = static_cast<gint>(pt.x);
++ imeBox.y = static_cast<gint>(pt.y + std::max(4, vs.lineHeight/4));
++ // prevent overlapping with current line
++ imeBox.height = vs.lineHeight;
+ gtk_im_context_set_cursor_location(im_context, &imeBox);
+ }
+
+# HG changeset patch
+# User Zufu Liu
+# Date 1578313229 -39600
+# Mon Jan 06 23:20:29 2020 +1100
+# Node ID 59f3c5ced2e22c4ab05082ada5cd356e13c16633
+# Parent be67578909888e76e81421d32459ace2a59b9d1d
+Bug [#2135]. Prevent movement of candidate window while typing.
-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 @@
+diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
+--- a/gtk/ScintillaGTK.cxx
++++ b/gtk/ScintillaGTK.cxx
+@@ -2388,8 +2388,11 @@
+ return;
+ }
+
+- if (initialCompose)
++ if (initialCompose) {
+ ClearBeforeTentativeStart();
++ }
++
++ SetCandidateWindowPos();
+ pdoc->TentativeStart(); // TentativeActive() from now on
+
+ std::vector<int> indicator = MapImeIndicators(preeditStr.attrs, preeditStr.str);
+@@ -2423,7 +2426,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 *) {
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Fri, 20 Mar 2020 21:15:55 UTC
Commit: 45f85d0299200507de9928bbfa7e8b809e24791e
https://github.com/geany/geany-osx/commit/45f85d0299200507de9928bbfa7e8b809…
Log Message:
-----------
Update README
Modified Paths:
--------------
README.md
Modified: README.md
19 lines changed, 16 insertions(+), 3 deletions(-)
===================================================================
@@ -29,6 +29,11 @@ A brief description of the contents of the project directory:
* *Papirus, Papirus-Dark*: Papirus GTK 3 icon theme with lots of unneeded
icons removed to save space.
* *iconbuilder.iconset*: source Geany icons for the bundle.
+* *modulesets-stable*: copy of the modulesets-stable directory from
+ the [gtk-osx](https://gitlab.gnome.org/GNOME/gtk-osx/) project containing
+ dependency specifications. Since the upstram project is in a constant
+ state of flux and fails to build frequently, this allows us to make
+ a snapshot of a working configuration for our build.
* *patches*: various patches fixing dependencies to enable bundling.
* *utils*: various utility scripts.
@@ -99,10 +104,13 @@ To create the bundle, you need to first install JHBuild and GTK as described bel
optimization flags. The `setup_release()` call enables optimizations.
5. Install GTK and all of its dependencies by running the following
- command:
+ command inside the `geany-osx` directory:
```
- jhbuild bootstrap-gtk-osx && jhbuild build meta-gtk-osx-freetype meta-gtk-osx-bootstrap meta-gtk-osx-gtk3
+ jhbuild bootstrap-gtk-osx && jhbuild -m "https://raw.githubusercontent.com/geany/geany-osx/master/modulesets-stable/…" build meta-gtk-osx-bootstrap meta-gtk-osx-gtk3
```
+ It is possible to skip the module specification part `-m <url>`
+ in which case the upstream module specification is used instead
+ of our snapshot.
Geany Build
-----------
@@ -131,6 +139,7 @@ Bundling
```
xcodebuild -project Launcher/geany/geany.xcodeproj
```
+ inside the `geany-osx` directory.
2. Run
```
@@ -208,7 +217,11 @@ have to be performed during normal bundle/installer creation:
`Info.plist` and `create_dmg.sh`. Also update the `-release` targets in
`geany.modules` file to point to the new release. Dependencies inside
`geany.modules` can also be updated to newer versions.
-
+
+* Copy `modulesets-stable` from [gtk-osx](https://gitlab.gnome.org/GNOME/gtk-osx/)
+ into this project to get the latest dependencies (if it builds) and
+ possibly modify it (if something isn't working).
+
* To make sure nothing is left from the previous build when making a
new release, run
```
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).