Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ibus-unikey for openSUSE:Factory checked in at 2025-08-02 00:42:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ibus-unikey (Old) and /work/SRC/openSUSE:Factory/.ibus-unikey.new.1085 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ibus-unikey" Sat Aug 2 00:42:43 2025 rev:17 rq:1297029 version:0.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/ibus-unikey/ibus-unikey.changes 2025-07-31 17:45:58.923609179 +0200 +++ /work/SRC/openSUSE:Factory/.ibus-unikey.new.1085/ibus-unikey.changes 2025-08-02 00:43:46.731592737 +0200 @@ -1,0 +2,14 @@ +Fri Aug 1 04:12:23 UTC 2025 - Cliff Zhao <qz...@suse.com> + +- Add ibus-unikey-rm-mouse-capture.patch: + Backport b6626d75 from upstream, remove mouse capture. Make SLFO + intergration could get rid of X11-devel and its dependence packages. +- Update ibus-unikey-rm-mouse-capture.spec: + Add build option: --with-gtk-version=3. Make SLFO intergration + could get rid of gtk2-devel and its many dependence packages. +- Update ibus-unikey-rm-mouse-capture.spec: + Drop %configure to avoid duplicated config actions. + Resort %files sections. + (bsc#1246569) + +------------------------------------------------------------------- Old: ---- 0.6.1.tar.gz New: ---- ibus-unikey-0.6.1.tar.gz ibus-unikey-rm-mouse-capture.patch ----------(New B)---------- New: - Add ibus-unikey-rm-mouse-capture.patch: Backport b6626d75 from upstream, remove mouse capture. Make SLFO ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ibus-unikey.spec ++++++ --- /var/tmp/diff_new_pack.sOBQab/_old 2025-08-02 00:43:47.343618402 +0200 +++ /var/tmp/diff_new_pack.sOBQab/_new 2025-08-02 00:43:47.347618570 +0200 @@ -21,13 +21,15 @@ Release: 0 Summary: Vietnamese engine for IBus input platform License: GPL-3.0-only -Group: System/Localization +Group: System/I18n/Vietnamese URL: https://github.com/vn-input/ibus-unikey/ -Source: https://github.com/vn-input/ibus-unikey/archive/refs/tags/%{version}.tar.gz +Source: https://github.com/vn-input/ibus-unikey/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz #PATCH-FIX-OPENSUSE ibus-unikey-static_cast.patch boo#985186 i...@marguerite.su -- fix narrowing conversion from char to unsigned char Patch0: ibus-unikey-static_cast.patch +#PATCH-FIX-UPSTREAM ibus-unikey-rm-mouse-capture.patch bco#1246569 qz...@suse.com -- Remove mouse capture fuction to get rid of X11-devel dependence. +Patch1: ibus-unikey-rm-mouse-capture.patch BuildRequires: gcc-c++ -BuildRequires: gtk2-devel +BuildRequires: gtk3-devel BuildRequires: ibus-devel BuildRequires: intltool BuildRequires: libtool @@ -37,24 +39,37 @@ %description A Vietnamese engine for IBus input platform that uses Unikey. +%lang_package + %prep %autosetup -p1 %build -sh ./autogen.sh -%configure --libexecdir=%{_ibus_libexecdir} +./autogen.sh \ + --with-debuginfod=no \ + --disable-static \ + --disable-silent-rules \ + --prefix=%{_prefix} \ + --libexecdir=%{_ibus_libexecdir} \ + --with-gtk-version=3 + make %{?_smp_mflags} %install -make %{?_smp_mflags} DESTDIR=%{buildroot} install - +make install DESTDIR=%{buildroot} %find_lang %{name} %files -f %{name}.lang %defattr(-,root,root,-) -%doc README AUTHORS ChangeLog %license COPYING -%{_datadir}/%{name} -%{_datadir}/ibus/component/* -%{_ibus_libexecdir}/ibus-*-unikey +%doc README AUTHORS ChangeLog +%{_ibus_libexecdir}/ibus-engine-unikey +%{_ibus_libexecdir}/ibus-setup-unikey +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/icons/ +%dir %{_datadir}/%{name}/ui/ +%{_datadir}/%{name}/icons/ibus-unikey.png +%{_datadir}/%{name}/ui/setup-macro.ui +%{_datadir}/%{name}/ui/setup-main.ui +%{_datadir}/ibus/component/unikey.xml ++++++ ibus-unikey-rm-mouse-capture.patch ++++++ commit b6626d75fa49bd411e4b275790e2245177e790ba Author: Lê Quốc Tuấn <mr.lequoct...@gmail.com> Date: Sun Jul 1 22:21:46 2018 +0700 remove mouse capture --- ibus-unikey-0.6.1/configure.ac +++ ibus-unikey-0.6.1_new/configure.ac @@ -43,11 +43,6 @@ ibus-1.0 >= 1.2.99 ]) -PKG_CHECK_MODULES(X11, [ - x11 -]) -AC_SUBST(X11) - PKG_CHECK_MODULES(GTK, $gtk_version ) --- ibus-unikey-0.6.1/setup/config_utils.cpp +++ ibus-unikey-0.6.1_new/setup/config_utils.cpp @@ -23,7 +23,6 @@ opt->freeMarking = DEFAULT_CONF_FREEMARKING; opt->enableMacro = DEFAULT_CONF_MACROENABLED; opt->processwatbegin = DEFAULT_CONF_PROCESSWATBEGIN; - opt->mousecapture = DEFAULT_CONF_MOUSECAPTURE; opt->macrofile = get_macro_file(); } @@ -86,10 +85,6 @@ // get ProcessWAtBegin if (ibus_unikey_config_get_boolean(config, CONFIG_SECTION, CONFIG_PROCESSWATBEGIN, &b)) opt->processwatbegin = b; - - // get MouseCapture - if (ibus_unikey_config_get_boolean(config, CONFIG_SECTION, CONFIG_MOUSECAPTURE, &b)) - opt->mousecapture = b; } void write_config(void* data, UnikeyMainSetupOptions* opt) @@ -112,8 +107,6 @@ opt->enableMacro); ibus_unikey_config_set_boolean(config, CONFIG_SECTION, CONFIG_PROCESSWATBEGIN, opt->processwatbegin); - ibus_unikey_config_set_boolean(config, CONFIG_SECTION, CONFIG_MOUSECAPTURE, - opt->mousecapture); } int force_engine_to_reload_config() --- ibus-unikey-0.6.1/setup/dlg_main_setup.cpp +++ ibus-unikey-0.6.1_new/setup/dlg_main_setup.cpp @@ -50,9 +50,6 @@ g_object_set_data(G_OBJECT(dlg), "check_processwatbegin", gtk_builder_get_object(builder, "check_processwatbegin")); - g_object_set_data(G_OBJECT(dlg), - "check_mousecapture", - gtk_builder_get_object(builder, "check_mousecapture")); // END save object pointer @@ -101,10 +98,6 @@ wid = GTK_WIDGET(g_object_get_data(G_OBJECT(dlg), "check_processwatbegin")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wid), opt->processwatbegin); -// set mousecapture? - wid = GTK_WIDGET(g_object_get_data(G_OBJECT(dlg), "check_mousecapture")); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wid), opt->mousecapture); - // set macro file name data g_object_set_data(G_OBJECT(dlg), "macrofile", opt->macrofile); } @@ -144,10 +137,6 @@ // get processwatbegin? wid = GTK_WIDGET(g_object_get_data(G_OBJECT(dlg), "check_processwatbegin")); opt->processwatbegin = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid)); - -// get mousecapture? - wid = GTK_WIDGET(g_object_get_data(G_OBJECT(dlg), "check_mousecapture")); - opt->mousecapture = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wid)); } void macro_enable_toggle_cb(GtkToggleButton* btn, gpointer user_data) --- ibus-unikey-0.6.1/setup/setup-main.ui +++ ibus-unikey-0.6.1_new/setup/setup-main.ui @@ -389,23 +389,6 @@ <property name="position">5</property> </packing> </child> - <child> - <object class="GtkCheckButton" id="check_mousecapture"> - <property name="label" translatable="yes">Capture _mouse event</property> - <property name="use_action_appearance">False</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_action_appearance">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">True</property> - <property name="fill">True</property> - <property name="position">6</property> - </packing> - </child> </object> </child> </object> --- ibus-unikey-0.6.1/src/engine_const.h +++ ibus-unikey-0.6.1_new/src/engine_const.h @@ -13,7 +13,6 @@ #define CONFIG_FREEMARKING "free_marking" #define CONFIG_MACROENABLED "macro_enabled" #define CONFIG_PROCESSWATBEGIN "process_word_at_begin" -#define CONFIG_MOUSECAPTURE "mouse_capture" // DEFAULT options #define DEFAULT_CONF_SPELLCHECK TRUE @@ -22,9 +21,6 @@ #define DEFAULT_CONF_FREEMARKING TRUE #define DEFAULT_CONF_MACROENABLED FALSE #define DEFAULT_CONF_PROCESSWATBEGIN TRUE -#define DEFAULT_CONF_MOUSECAPTURE TRUE - -#define CAPTURE_MOUSE_MOVE_DELTA 50 #endif --- ibus-unikey-0.6.1/src/engine.cpp +++ ibus-unikey-0.6.1_new/src/engine.cpp @@ -6,7 +6,6 @@ #include <wait.h> #include <string.h> -#include <X11/Xlib.h> #include <ibus.h> #include "engine_const.h" @@ -65,11 +64,7 @@ static IBusEngineClass* parent_class = NULL; static IBusConfig* config = NULL; -static pthread_t th_mcap; -static pthread_mutex_t mutex_mcap; -static Display* dpy; static IBusUnikeyEngine* unikey; // current (focus) unikey engine -static gboolean mcap_running; GType ibus_unikey_engine_get_type(void) { @@ -102,18 +97,10 @@ { UnikeySetup(); config = ibus_bus_get_config(bus); - - mcap_running = TRUE; - pthread_mutex_init(&mutex_mcap, NULL); - pthread_mutex_trylock(&mutex_mcap); // lock mutex after init so mouse capture not start - pthread_create(&th_mcap, NULL, &thread_mouse_capture, NULL); - pthread_detach(th_mcap); } void ibus_unikey_exit() { - mcap_running = FALSE; - pthread_mutex_unlock(&mutex_mcap); // unlock mutex, so thread can exit UnikeyCleanup(); } @@ -154,7 +141,6 @@ unikey->ukopt.freeMarking = DEFAULT_CONF_FREEMARKING; unikey->ukopt.macroEnabled = DEFAULT_CONF_MACROENABLED; unikey->process_w_at_begin = DEFAULT_CONF_PROCESSWATBEGIN; - unikey->mouse_capture = DEFAULT_CONF_MOUSECAPTURE; // read config value // read Input Method @@ -207,11 +193,6 @@ // ProcessWAtBegin if (ibus_unikey_config_get_boolean(config, CONFIG_SECTION, CONFIG_PROCESSWATBEGIN, &b)) unikey->process_w_at_begin = b; - - // MouseCapture - if (ibus_unikey_config_get_boolean(config, CONFIG_SECTION, CONFIG_MOUSECAPTURE, &b)) - unikey->mouse_capture = b; - // end read Unikey Option // end read config value // load macro @@ -443,34 +424,7 @@ } // end update state } // end MacroEnabled active - // MouseCapture active - else if (strcmp(prop_name, CONFIG_MOUSECAPTURE) == 0) - { - unikey->mouse_capture = !unikey->mouse_capture; - - ibus_unikey_config_set_boolean(config, - CONFIG_SECTION, - CONFIG_MOUSECAPTURE, - unikey->mouse_capture); - - // update state - for (j = 0; j < unikey->menu_opt->properties->len ; j++) - { - prop = ibus_prop_list_get(unikey->menu_opt, j); - if (prop == NULL) - return; - - else if (strcmp(ibus_property_get_key(prop), CONFIG_MOUSECAPTURE) == 0) - { - ibus_property_set_state(prop, (unikey->mouse_capture == 1)? - PROP_STATE_CHECKED:PROP_STATE_UNCHECKED); - break; - } - } // end update state - } // end MouseCapture active - - - // if Run setup + // if Run setup else if (strcmp(prop_name, "RunSetupGUI") == 0) { pthread_t pid; @@ -573,23 +527,6 @@ ibus_prop_list_append(unikey->menu_opt, prop); - // --create and add MouseCapture property - label = ibus_text_new_from_static_string(_("Capture mouse event")); - tooltip = ibus_text_new_from_static_string(_("Auto send PreEdit string to Application when mouse move or click")); - prop = ibus_property_new(CONFIG_MOUSECAPTURE, - PROP_TYPE_TOGGLE, - label, - "", - tooltip, - TRUE, - TRUE, - (unikey->mouse_capture==1)? - PROP_STATE_CHECKED:PROP_STATE_UNCHECKED, - NULL); - - ibus_prop_list_append(unikey->menu_opt, prop); - - // --separator prop = ibus_property_new("", PROP_TYPE_SEPARATOR, NULL, "", NULL, TRUE, TRUE, @@ -692,13 +629,6 @@ // update and display text ibus_engine_update_preedit_text(engine, text, ibus_text_get_length(text), visible); - - // every time have preedit text -> unlock mutex -> start capture mouse - if (unikey->mouse_capture) - { - // unlock capture thread (start capture) - pthread_mutex_unlock(&mutex_mcap); - } } static void ibus_unikey_engine_erase_chars(IBusEngine *engine, int num_chars) @@ -956,50 +886,6 @@ return false; } -static void* thread_mouse_capture(void* data) -{ - XEvent event; - int x_old, y_old, x_root_old, y_root_old; - uint mask; - Window w, w_root_return, w_child_return; - - dpy = XOpenDisplay(NULL); - w = XDefaultRootWindow(dpy); - - XQueryPointer(dpy, w, &w_root_return, &w_child_return, &x_root_old, &y_root_old, &x_old, &y_old, &mask); - while (mcap_running) - { - pthread_mutex_lock(&mutex_mcap); - if (!mcap_running) - return NULL; - XGrabPointer(dpy, w, 0, ButtonPressMask | PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime); - XPeekEvent(dpy, &event); - pthread_mutex_trylock(&mutex_mcap); // set mutex to lock status, so this thread will wait until next unlock (by update preedit string) - XUngrabPointer(dpy, CurrentTime); - XSync(dpy, TRUE); - - if (event.type == MotionNotify) // mouse move - { - if ((abs(event.xmotion.x_root - x_root_old) >= CAPTURE_MOUSE_MOVE_DELTA) || - (abs(event.xmotion.y_root - y_root_old) >= CAPTURE_MOUSE_MOVE_DELTA)) // mouse move at least CAPTURE_MOUSE_MOVE_DELTA - { - ibus_unikey_engine_reset((IBusEngine*)unikey); - - x_root_old = event.xmotion.x_root; - y_root_old = event.xmotion.y_root; - } - else // if don't reset -> unlock mutex so mouse continue to be grab - pthread_mutex_unlock(&mutex_mcap); - } - else - ibus_unikey_engine_reset((IBusEngine*)unikey); - } - - XCloseDisplay(dpy); - - return NULL; -} - static void* thread_run_setup(void* data) { int stat; --- ibus-unikey-0.6.1/src/engine_private.h +++ ibus-unikey-0.6.1_new/src/engine_private.h @@ -24,7 +24,6 @@ unsigned int oc; // output charset UnikeyOptions ukopt; gboolean process_w_at_begin; - gboolean mouse_capture; gboolean auto_commit; gboolean last_key_with_shift; @@ -70,7 +69,6 @@ static void ibus_unikey_engine_commit_string(IBusEngine *engine, const gchar *string); static void ibus_unikey_engine_update_preedit_string(IBusEngine *engine, const gchar *string, gboolean visible); static void ibus_unikey_engine_erase_chars(IBusEngine *engine, int num_chars); -static void* thread_mouse_capture(void* data); static void* thread_run_setup(void* data); #endif --- ibus-unikey-0.6.1/src/Makefile.am +++ ibus-unikey-0.6.1_new/src/Makefile.am @@ -21,11 +21,10 @@ engine_const.h \ utils.h -ibus_engine_unikey_CXXFLAGS = @IBUS_CFLAGS@ @X11_CFLAGS@ +ibus_engine_unikey_CXXFLAGS = @IBUS_CFLAGS@ ibus_engine_unikey_LDFLAGS = \ @IBUS_LIBS@ \ - @X11_LIBS@ \ $(top_builddir)/ukengine/libunikey-ibus.la component_DATA = unikey.xml