solus-project / budgie-desktop

I Tawt I Taw A Purdy Desktop
https://solus-project.com/
2.33k stars 158 forks source link

KeyboardLayoutApplet: does not show all layouts #1785

Closed baraclese closed 4 years ago

baraclese commented 5 years ago

With the latest gnome stack on arch linux the keyboard layout applet does not show the layout "Japanese (Kana Kanji)" but I can still switch to it and use it via win+space.

Budgie version

budgie-desktop 10.5 (git-38b69f05619f0b1a681276dc258929f2fcb7a750)

Operating system

Arch Linux

Description

Adding the language "Japanese (Kana Kanji)" in the Gnome Control Panel (Region & Language) results in these messages:

budgie-panel[2007]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed budgie-panel[2007]: KeyboardLayoutApplet.vala:428: Error adding source ibus|kkc: Unknown input method: id budgie-wm[6379]: Couldn't upload new XKB keyboard description

Selecting the language via the keyboard shortcut results in: budgie-panel[2007]: KeyboardLayoutApplet.vala:486: WARNING: Missing child in layout!!

tista500 commented 5 years ago

Same issue +1 (Ubuntu Disco, IBus 1.5.19 built with Vala 0.44.x).

This may or may not be related to IBus change? : https://github.com/ibus/ibus/commit/4d7c1e00e15921a0448947961183c1c124b6b49f

@fossfreedom,

I know you're extremely busy for testing Disco Budgie currently, but if you had time to check IBus in Disco, please concern the Vala and IBus upstream changes, too...

Regards.

EDIT Remove 2 diffs (no sense).

tista500 commented 5 years ago

I'm sorry I was wrong... :( Reverting to IBus packages build with legacy Vala was the way as an only workaround?

tista500 commented 5 years ago

These diffs make sense? : https://paste.ubuntu.com/p/fbM69vznkf/

fossfreedom commented 5 years ago

How do you reproduce this? ... I have added English US to my English GB via Language & Region settings on 19.04 and I see both layouts to be selected in the keyboard layout applet.

On Sun, 14 Apr 2019, 02:00 Tista, notifications@github.com wrote:

These diffs make sense? : https://paste.ubuntu.com/p/fbM69vznkf/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/solus-project/budgie-desktop/issues/1785#issuecomment-482908667, or mute the thread https://github.com/notifications/unsubscribe-auth/AA8zkAUcV_WYZg5FXWl6zOMf10XxT0vqks5vgn2ggaJpZM4cSaXA .

tista500 commented 5 years ago

I have added English US to my English GB via Language & Region settings on 19.04 and I see both layouts to be selected in the keyboard layout applet.

Original reporter and me are talking about IM engine instead of keyboard layout, then Original reporter uses IBus-kkc engine:

Regards.

fossfreedom commented 5 years ago

ack - can reproduce - it also crashed budgie-wm ibus_engine_desc_get_layout_variant.

will try to have a look at your patch and also the above to see why the crash happens - busy with 19.04 release matters though....

fossfreedom commented 5 years ago

ok - I don't fully understand the valac changes that is causing this - but it appears to be variable scope changes.

attached is a diff for the mutter330reduxII branch (i.e. you can apply it on the source for 19.04 UB) that at first glance seems to resolve this matter + fixes the crash in budgie-wm when creating non xkb layouts.

Really need to understand why the scope changes causes this issue and if there is a cleaner way to resolve before doing a formal PR

Note - I've slightly rejigged the src/wm/ibus.vala to be consistent with src/applets/keyboard-layout/KeyboardLayoutApplet.vala - there is comments in the code from Ikey that the code is naughtily copy-pasted between the two modules ... but seems to have got out of sync at some-point.

output.diff.txt

EDIT (25/04) - this isnt the solution - it may fix the display of non xkb sources - but if you have an xkb source it stays with the fallback US keyboard e.g. en_GB reverts to US - but when you delete the japanese layout then en_GB starts working

tista500 commented 5 years ago

attached is a diff for the mutter330reduxII branch (i.e. you can apply it on the source for 19.04 UB) that at first glance seems to resolve this matter + fixes the crash in budgie-wm when creating non xkb layouts.

Worked for me (Vala 0.44.3, IBus 1.5.19). Thanks.

quycao commented 5 years ago

attached is a diff for the mutter330reduxII branch (i.e. you can apply it on the source for 19.04 UB) that at first glance seems to resolve this matter + fixes the crash in budgie-wm when creating non xkb layouts.

Worked for me (Vala 0.44.3, IBus 1.5.19). Thanks.

How can you fixed it, please guide me in detail. Many people get same problem. https://github.com/solus-project/budgie-desktop/issues/1823 https://github.com/solus-project/budgie-desktop/issues/1850 Many thanks.

patrickdark commented 4 years ago

I have a similar problem in Solus 4 Budgie; Chewing (ibus-chewing) and New Zhuyin (ibus-libzhuyin), two traditional Chinese input methods, aren't listed in the Keyboard Layout applet after installation making Chinese character input methods unusable. I filed an issue on that--probably in the wrong place--at https://dev.getsol.us/T8445.

One can cycle to these Input Sources using the Meta (Windows) + Spacebar keys, at least; ibus-chewing displays a blue icon indicating that it's selected whereas ibus-libzhuyin displays nothing to indicate that it's selected. The wrong Input Source indicator displays in the applet in both cases because neither Input Source is listed.

Unfortunately, the Input Sources are nevertheless unusable because the character selection overlay can't be made to appear, so there's no way to select the desired characters

shedaniel commented 4 years ago

Any updates on this? The patch worked for me but would like to know why it is not merged into the project itself? Thanks.