* No ibus modules for GTK4 with Sway
@ 2024-12-13 22:08 Ricardo Wurmus
2024-12-14 12:45 ` Tomas Volf
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2024-12-13 22:08 UTC (permalink / raw)
To: guix-devel
Hi Guix,
I've reconfigured my system with Sway and I noticed that GTK4
applications now ignore my input method. GTK3 applications and Emacs
still work fine.
GTK4 applications used to work with IBus under Gnome, so I'm guessing
that some more configuration is required to make this work... Does
anyone have an idea what might be missing?
FWIW, I find the configuration rather confusing. Our Cookbook doesn't
contain a working example for using Sway (which is surprising given its
popularity among Guix and Nix users), and whatever the reference manual
mentions when it comes to Sway appears to be unnecessary or overly
complicated (such as the configuration of greetd, which required the
removal of other services).
I still haven't arrived at a comfortable system configuration (GDM still
starts up even though I've removed it from my configuration; only
elogind remains), but the input method problem with GTK4 applications is
the most pressing issue at this time.
I'd be happy for any hints!
--
Ricardo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: No ibus modules for GTK4 with Sway
2024-12-13 22:08 No ibus modules for GTK4 with Sway Ricardo Wurmus
@ 2024-12-14 12:45 ` Tomas Volf
2024-12-14 13:11 ` Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: Tomas Volf @ 2024-12-14 12:45 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2044 bytes --]
Hi Ricardo,
Ricardo Wurmus <rekado@elephly.net> writes:
> Hi Guix,
>
> I've reconfigured my system with Sway and I noticed that GTK4
> applications now ignore my input method. GTK3 applications and Emacs
> still work fine.
>
> GTK4 applications used to work with IBus under Gnome, so I'm guessing
> that some more configuration is required to make this work... Does
> anyone have an idea what might be missing?
>
> FWIW, I find the configuration rather confusing. Our Cookbook doesn't
> contain a working example for using Sway (which is surprising given its
> popularity among Guix and Nix users), and whatever the reference manual
> mentions when it comes to Sway appears to be unnecessary or overly
> complicated (such as the configuration of greetd, which required the
> removal of other services).
>
> I still haven't arrived at a comfortable system configuration (GDM still
> starts up even though I've removed it from my configuration; only
> elogind remains), but the input method problem with GTK4 applications is
> the most pressing issue at this time.
>
> I'd be happy for any hints!
I do not think I am using any GTK 4 applications (what would be some
light example I could test?), but I wonder whether you need to set
GTK_PATH (probably via GUIX_GTK4_PATH) to something to allow it to find
the im modules. Would it be possible to check whether Gnome sets it?
I see for GTK 2 and 3 we have GUIX_GTK2_IM_MODULE_FILE and
GUIX_GTK3_IM_MODULE_FILE, there is none for GTK 4 though. So maybe I am
wrong and the auto-discovery should just work for 4.
However it looks like we *are* building the im module in ibus:
--8<---------------cut here---------------start------------->8---
$ ls $(guix build ibus | tail -n1)/lib/gtk-4.0/4.0.0/immodules
libim-ibus.la libim-ibus.so
--8<---------------cut here---------------end--------------->8---
Hope this helps,
Tomas
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: No ibus modules for GTK4 with Sway
2024-12-14 12:45 ` Tomas Volf
@ 2024-12-14 13:11 ` Ricardo Wurmus
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2024-12-14 13:11 UTC (permalink / raw)
To: guix-devel
Hi Tomas,
I had the other variables set, but not GUIX_GTK4_PATH. I tried
export GUIX_GTK4_PATH=/run/current-system/profile/lib/gtk-4.0/
This is an improvement, because now dino (my GTK4 test application)
accepts characters selected with ibus-libpinyin. It's not really
usable, though, because the selection window is invisible (same on all
other applications in Sway) and selected characters are inserted twice.
> I see for GTK 2 and 3 we have GUIX_GTK2_IM_MODULE_FILE and
> GUIX_GTK3_IM_MODULE_FILE, there is none for GTK 4 though. So maybe I am
> wrong and the auto-discovery should just work for 4.
The mechanism has changed. For wayland there are different versions of
a protocol for input methods. Currently, ibus only implements version
1, so this could be why it's not working properly in Sway.
I see that there's ongoing work on supporting version 2 of the wayland
protocol for input methods:
https://github.com/fujiwarat/ibus/tree/wayland-v2/
I'll try building that.
--
Ricardo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-14 13:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13 22:08 No ibus modules for GTK4 with Sway Ricardo Wurmus
2024-12-14 12:45 ` Tomas Volf
2024-12-14 13:11 ` Ricardo Wurmus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).