Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 779337 - net-im/telegram-desktop-2.7.1-r1: Switching IBus input methods does not work in Telegram
Summary: net-im/telegram-desktop-2.7.1-r1: Switching IBus input methods does not work ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-30 11:04 UTC by Petr Šabata
Modified: 2021-04-02 13:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Šabata 2021-03-30 11:04:10 UTC
I've noticed I can no longer switch my input methods while Telegram is focused.  This used to work prior the update, in 2.4.11.  If I want to switch, I need to focus some other application, switch there, and focus Telegram again.

The IBus popup window appears and it seems as if I can actually switch the method but in the end it remains stuck on the old one.

I tested this with a random different Qt5 app, Featherpad, to rule out problems with my IBus/Qt5 setup.  It works fine in Featherpad.  It also works fine in all other GTK and X apps I use.

My QT_IM_MODULE environmental variable is set to "ibus", just like prior the update.

net-im/telegram-desktop-2.7.1-r1
app-i18n/ibus-1.5.23

Reproducible: Always

Steps to Reproduce:
1. Use IBus with more than one input method.
2. Attempt to switch the method while using Telegram.
Actual Results:  
The IBus popup window gives the impression that you're switching your input method, yet Telegram still uses the old one until you switch the method with some other app focused.  Then it suddenly recognizes the new method.

Expected Results:  
The input method gets switched like in any other app, including other Qt5 apps, or like in 2.4.11.

; emerge --info
Portage 3.0.18 (python 3.8.8-final-0, default/linux/amd64/17.1, gcc-10.2.0, glibc-2.32-r8, 5.11.10-gentoo x86_64)
=================================================================
System uname: Linux-5.11.10-gentoo-x86_64-Intel-R-_Core-TM-_i7-8565U_CPU_@_1.80GHz-with-glibc2.2.5
KiB Mem:    16013648 total,  11220380 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Tue, 30 Mar 2021 10:20:47 +0000
Head commit of repository gentoo: 71d417d5247f4f1341fd9eb953de962dd8fbab6b

Timestamp of repository guru: Tue, 30 Mar 2021 09:05:39 +0000
Head commit of repository guru: 2d9164eb2319529b21d66c8f8152e9de5f41be04

sh dash 0.5.11.3-r1
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash:          5.1_p4::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          3.8.8::gentoo, 3.9.2::gentoo
dev-util/cmake:           3.20.0::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.22::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.2.0-r5::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru
    masters: gentoo

local
    location: /var/db/repos/local
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -Ofast -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -falign-functions=32 -pipe -flto=auto -fuse-linker-plugin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -Ofast -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -falign-functions=32 -pipe -flto=auto -fuse-linker-plugin"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -Ofast -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -falign-functions=32 -pipe -flto=auto -fuse-linker-plugin"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms skiprocheck strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -Ofast -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -falign-functions=32 -pipe -flto=auto -fuse-linker-plugin"
GENTOO_MIRRORS="https://mirror.dkm.cz/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -Ofast -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -falign-functions=32 -pipe -flto=auto -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=gnu -zcombreloc"
MAKEOPTS="-j8 -l4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa amd64 apng berkdb branding bzip2 cairo caps cjk cli crypt cups dbus dri dri3 elogind exif filecaps flac gdbm gif graphite gssapi gzip harfbuzz heif ibus iconv icu inotify ipv6 ithreads jbig jemalloc jpeg jpeg2k kerberos libglvnd libtirpc lto lua luajit lz4 lzma lzo minizip mp3 multilib ncurses nls nptl offensive ogg oniguruma opencl opengl openmp opus pam pcre pcre16 pcre32 pgo pkcs11 png postproc pulseaudio readline seccomp split-usr sqlite ssl tcpd text tfo theora threads tiff truetype unicode vaapi vim-syntax vorbis vulkan webp xattr zlib zsh-completion zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Petr Šabata 2021-03-30 15:39:42 UTC
Additionally, using more complicated input methods (such as ibus-hangul) doesn't appear to work at all -- it just outputs latin characters instead of entering the combining mode.

Again, this works elsewhere, including Featherpad.
Comment 2 Esteve Varela Colominas 2021-03-31 09:51:07 UTC
As reproducing this requires setting up some programs I'm not familiar with, could you first test it with the official tdesktop binaries downloaded from https://desktop.telegram.org/ ?
Also, for future reference, it'd be helpful to know what your telegram-desktop USE and C(XX)FLAGS flags are, your QT_QPA_PLATFORMTHEME and DESKTOP_APP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY variables.
Comment 3 Petr Šabata 2021-03-31 11:37:55 UTC
(In reply to Esteve Varela Colominas from comment #2)
> As reproducing this requires setting up some programs I'm not familiar with,
> could you first test it with the official tdesktop binaries downloaded from
> https://desktop.telegram.org/ ?

Okay, this happens with 2.7.1 from upstream, too.  So either it's an upstream bug or Telegram suddenly requires something else to be configured :|

I think I'll try building IBus with the "kde" USE flag to see if that helps...

> Also, for future reference, it'd be helpful to know what your
> telegram-desktop USE and C(XX)FLAGS flags are, your QT_QPA_PLATFORMTHEME and
> DESKTOP_APP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY variables.

Okay, for the record here:

USE="X dbus gtk hunspell pulseaudio spell -enchant (-libressl) -wayland"
C[XX]FLAGS are the same as the global ones shown in the initial report.
QT_QPA_PLATFORMTHEME is unset.
DESKTOP_APP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY is unset.
Comment 4 Petr Šabata 2021-03-31 11:59:34 UTC
(In reply to Petr Šabata from comment #3)
> I think I'll try building IBus with the "kde" USE flag to see if that
> helps...

That actually fixed it.

Hopefully this report will help someone in the future.  Closing.
Comment 5 Esteve Varela Colominas 2021-03-31 14:17:42 UTC
I wonder if there's a way to warn people about this; I can't make telegram-desktop depend on ibus so can't enforce this USE flag...
Comment 6 Ionen Wolkens gentoo-dev 2021-03-31 17:41:30 UTC
(In reply to Esteve Varela Colominas from comment #5)
> I wonder if there's a way to warn people about this; I can't make
> telegram-desktop depend on ibus so can't enforce this USE flag...
If want to have a elog/warn message to warn without bothering non-ibus users, you could have a "has_version app-i18n/ibus && ! has_version app-i18n/ibus[kde]" in postinst. Not that it's perfect given ibus might not even be installed yet or those having it might not actually be using it.

If there's a lot of other small things to convey, making a wiki page could also be an option, good odds people will find it when having issues.
Comment 7 Yixun Lan archtester gentoo-dev 2021-04-01 01:16:15 UTC
(In reply to Ionen Wolkens from comment #6)
very good suggestions for pkg_postinst/wiki..

also you may take a look at readme.gentoo-r1.eclass if you find the warning/info are tedious..
Comment 8 Petr Šabata 2021-04-02 13:24:33 UTC
Well, after a reboot the broken behavior is back even with IBus being built with the "kde" USE flag.  Mysterious.

I'll let you know if I ever figure it out.