pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/x11/mlterm
Module Name: pkgsrc
Committed By: tsutsui
Date: Mon May 4 19:51:32 UTC 2026
Modified Files:
pkgsrc/x11/mlterm: Makefile distinfo
Added Files:
pkgsrc/x11/mlterm/patches: patch-uitoolkit_ui__display.h
patch-uitoolkit_xlib_ui__display.c
patch-uitoolkit_xlib_ui__window.c
Log Message:
mlterm: pull upstream fix for XIM key input issue
Fix lost key input after keyboard focus changes with recent libX11 XIM.
See upstream issue in patches for details.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.209 -r1.210 pkgsrc/x11/mlterm/Makefile
cvs rdiff -u -r1.102 -r1.103 pkgsrc/x11/mlterm/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/x11/mlterm/patches/patch-uitoolkit_ui__display.h \
pkgsrc/x11/mlterm/patches/patch-uitoolkit_xlib_ui__display.c
cvs rdiff -u -r0 -r1.3 \
pkgsrc/x11/mlterm/patches/patch-uitoolkit_xlib_ui__window.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/x11/mlterm/Makefile
diff -u pkgsrc/x11/mlterm/Makefile:1.209 pkgsrc/x11/mlterm/Makefile:1.210
--- pkgsrc/x11/mlterm/Makefile:1.209 Tue Jan 27 08:41:02 2026
+++ pkgsrc/x11/mlterm/Makefile Mon May 4 19:51:32 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.209 2026/01/27 08:41:02 wiz Exp $
+# $NetBSD: Makefile,v 1.210 2026/05/04 19:51:32 tsutsui Exp $
DISTNAME= mlterm-3.9.4
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_GITHUB:=arakiken/}
GITHUB_PROJECT= ${PKGBASE}
Index: pkgsrc/x11/mlterm/distinfo
diff -u pkgsrc/x11/mlterm/distinfo:1.102 pkgsrc/x11/mlterm/distinfo:1.103
--- pkgsrc/x11/mlterm/distinfo:1.102 Thu Apr 3 16:33:06 2025
+++ pkgsrc/x11/mlterm/distinfo Mon May 4 19:51:32 2026
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.102 2025/04/03 16:33:06 tsutsui Exp $
+$NetBSD: distinfo,v 1.103 2026/05/04 19:51:32 tsutsui Exp $
BLAKE2s (mlterm-3.9.4.tar.gz) = 3fff2f4110196b1cf592c0cb2f73e131d8434eda1f21288cecc7c5552255aab5
SHA512 (mlterm-3.9.4.tar.gz) = f03ce24b89f74510cd8924a2cd9ab795c6ebf7f7ef2b69fb8a17bf3f5855c255cf86558b0e5abc7db64175f7c909b165cf96663825b98f4a2df4371d5e4a9469
Size (mlterm-3.9.4.tar.gz) = 4227568 bytes
SHA1 (patch-configure) = bc36ec849b8fa3ee7e9fff971e75f9078b0b738a
SHA1 (patch-etc_font-fb) = 52c18f512c67ff530c0c326394fdf43956d71cb0
+SHA1 (patch-uitoolkit_ui__display.h) = 0e2fad6a0cc7968d546bdd2972e986e35c3495c7
+SHA1 (patch-uitoolkit_xlib_ui__display.c) = 895645afe4ed3687c3638ea826a0a38347fc9441
+SHA1 (patch-uitoolkit_xlib_ui__window.c) = cd842e6da8b9b4fdbefa70a1401f2079fa733169
Added files:
Index: pkgsrc/x11/mlterm/patches/patch-uitoolkit_ui__display.h
diff -u /dev/null pkgsrc/x11/mlterm/patches/patch-uitoolkit_ui__display.h:1.1
--- /dev/null Mon May 4 19:51:32 2026
+++ pkgsrc/x11/mlterm/patches/patch-uitoolkit_ui__display.h Mon May 4 19:51:32 2026
@@ -0,0 +1,20 @@
+$NetBSD: patch-uitoolkit_ui__display.h,v 1.1 2026/05/04 19:51:32 tsutsui Exp $
+
+- pull upstream change to fix "Typed keys are lost after keyboard
+ focus change unntil pointer enters the mlterm window" problem
+ https://github.com/arakiken/mlterm/issues/159
+ https://github.com/arakiken/mlterm/commit/a8fae665
+
+--- uitoolkit/ui_display.h.orig 2025-03-29 23:13:10.000000000 +0000
++++ uitoolkit/ui_display.h
+@@ -8,6 +8,10 @@
+ #include "ui.h"
+ #include "ui_gc.h"
+
++#if 1
++#define AVOID_CALL_XFILTEREVENT_TWICE
++#endif
++
+ #define XC_nil 1000
+
+ /* Defined in ui_window.h */
Index: pkgsrc/x11/mlterm/patches/patch-uitoolkit_xlib_ui__display.c
diff -u /dev/null pkgsrc/x11/mlterm/patches/patch-uitoolkit_xlib_ui__display.c:1.1
--- /dev/null Mon May 4 19:51:32 2026
+++ pkgsrc/x11/mlterm/patches/patch-uitoolkit_xlib_ui__display.c Mon May 4 19:51:32 2026
@@ -0,0 +1,92 @@
+$NetBSD: patch-uitoolkit_xlib_ui__display.c,v 1.1 2026/05/04 19:51:32 tsutsui Exp $
+
+- pull upstream change to fix "Typed keys are lost after keyboard
+ focus change unntil pointer enters the mlterm window" problem
+ https://github.com/arakiken/mlterm/issues/159
+ https://github.com/arakiken/mlterm/commit/a8fae665
+
+--- uitoolkit/xlib/ui_display.c.orig 2025-03-29 23:13:10.000000000 +0000
++++ uitoolkit/xlib/ui_display.c
+@@ -269,10 +269,27 @@ static void close_display(ui_display_t *
+ free(disp);
+ }
+
++#ifdef AVOID_CALL_XFILTEREVENT_TWICE
++static Window get_xic_window(ui_window_t **windows, u_int num_windows) {
++ u_int count;
++ Window wxic;
++
++ for (count = 0; count < num_windows; count++) {
++ if (windows[count]->xic) {
++ return windows[count]->my_window;
++ } else if ((wxic = get_xic_window(windows[count]->children, windows[count]->num_children))) {
++ return wxic;
++ }
++ }
++
++ return None;
++}
++#endif
++
+ /* --- global functions --- */
+
+ ui_display_t *ui_display_open(char *disp_name, u_int depth) {
+- int count;
++ u_int count;
+ ui_display_t *disp;
+ void *p;
+
+@@ -424,7 +441,7 @@ int ui_display_remove_root(ui_display_t
+ }
+
+ void ui_display_idling(ui_display_t *disp) {
+- int count;
++ u_int count;
+
+ for (count = 0; count < disp->num_roots; count++) {
+ ui_window_idling(disp->roots[count]);
+@@ -433,13 +450,43 @@ void ui_display_idling(ui_display_t *dis
+
+ int ui_display_receive_next_event(ui_display_t *disp) {
+ XEvent event;
+- int count;
++ u_int count;
+
+ do {
+ XNextEvent(disp->display, &event);
+
++#ifdef AVOID_CALL_XFILTEREVENT_TWICE
++ if (event.type == KeyPress || event.type == KeyRelease) {
++ /*
++ * See ui_window_receive_event().
++ * Calling XFilterEvent twice causes unexpected behavior.
++ * (https://github.com/arakiken/mlterm/issues/159)
++ */
++ Window wxic;
++
++ for (count = 0; ; count++) {
++ if (count >= disp->num_roots) { goto normal; }
++ if (event.xany.window == disp->roots[count]->my_window) { break; }
++ }
++
++ if ((wxic = get_xic_window(disp->roots[count]->children, disp->roots[count]->num_children))) {
++#ifdef __DEBUG
++ bl_debug_printf("Replace event.xany.window to cheat XFilterEvent. (%p -> %p)\n",
++ event.xany.window, wxic);
++#endif
++ event.xany.window = wxic;
++ }
++ if (!XFilterEvent(&event, None)) {
++ ui_window_receive_event(disp->roots[count], &event);
++ }
++ continue;
++ }
++
++normal:
++#endif
+ if (!XFilterEvent(&event, None)) {
+ for (count = 0; count < disp->num_roots; count++) {
++ /* Check all roots to check MappingNotify (see ui_window.c) */
+ ui_window_receive_event(disp->roots[count], &event);
+ }
+ }
Index: pkgsrc/x11/mlterm/patches/patch-uitoolkit_xlib_ui__window.c
diff -u /dev/null pkgsrc/x11/mlterm/patches/patch-uitoolkit_xlib_ui__window.c:1.3
--- /dev/null Mon May 4 19:51:32 2026
+++ pkgsrc/x11/mlterm/patches/patch-uitoolkit_xlib_ui__window.c Mon May 4 19:51:32 2026
@@ -0,0 +1,64 @@
+$NetBSD: patch-uitoolkit_xlib_ui__window.c,v 1.3 2026/05/04 19:51:32 tsutsui Exp $
+
+- pull upstream change to fix "Typed keys are lost after keyboard
+ focus change unntil pointer enters the mlterm window" problem
+ https://github.com/arakiken/mlterm/issues/159
+ https://github.com/arakiken/mlterm/commit/a8fae665
+
+--- uitoolkit/xlib/ui_window.c.orig 2025-03-29 23:13:10.000000000 +0000
++++ uitoolkit/xlib/ui_window.c
+@@ -226,7 +226,8 @@ static int update_transparent_picture(ui
+ * (see xlib/ui_imagelib.c), return 1 not to set ParentRelative in
+ * set_transparent().
+ */
+- int x, y, pix_x, pix_y, width, height;
++ int x, y, pix_x, pix_y;
++ u_int width, height;
+
+ if (!ui_window_get_visible_geometry(win, &x, &y, &pix_x, &pix_y, &width, &height)) {
+ return 1;
+@@ -475,9 +476,11 @@ static int is_descendant_window(ui_windo
+ return 0;
+ }
+
++#ifndef AVOID_CALL_XFILTEREVENT_TWICE
+ static int is_in_the_same_window_family(ui_window_t *win, Window window) {
+ return is_descendant_window(ui_get_root_window(win), window);
+ }
++#endif
+
+ static u_int total_min_width(ui_window_t *win) {
+ u_int count;
+@@ -1901,18 +1904,16 @@ int ui_window_receive_event(ui_window_t
+ }
+
+ if (win->my_window != event->xany.window) {
++#ifndef AVOID_CALL_XFILTEREVENT_TWICE
+ /*
+ * XXX
+- * if some window invokes xim window open event and it doesn't have any xic
+- * ,
++ * if some window invokes xim window open event and it doesn't have any xic,
+ * no xim window will be opened at XFilterEvent() in
+ * ui_display_receive_next_event().
+- * but it is desired to open xim window of ui_screen when its event is
+- * invoked
+- * on scrollbar or title bar.
+- * this hack enables it , but this way won't deal with the case that
+- * multiple
+- * xics exist.
++ * Bbut it is desired to open xim window of ui_screen when its event is
++ * invoked on scrollbar or title bar.
++ * This hack enables it, but this way won't deal with the case that
++ * multiple xics exist.
+ */
+ if (win->xic) {
+ if (is_in_the_same_window_family(win, event->xany.window) &&
+@@ -1920,6 +1921,7 @@ int ui_window_receive_event(ui_window_t
+ return 1;
+ }
+ }
++#endif
+
+ if (event->type == PropertyNotify && win == ui_get_root_window(win) &&
+ (event->xproperty.atom == XA_XSETROOT_ID(win->disp->display) ||
Home |
Main Index |
Thread Index |
Old Index