Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unset XLIB_SKIP_ARGB_VISUALS=1 to make IME work under Chrome #3867

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

dimkr
Copy link
Contributor

@dimkr dimkr commented Jan 26, 2023

Puppy has many fans in Japan, China and other places. These fans need IME to work in their browser.

When IME is installed (fcitx, fcitx5, scim), it seems to work for all applications except Chrome (and Chromium plus derivatives). The browser spits an error on every key stroke:

errors

However, IME works fine in GTK+ dialogs like the native GTK+ "open" and "save" dialogs used by Chrome. That lead me to the conclusion that the problem is somewhere inside Chrome's UI code and not in a lower layer (GTK+, X, etc'). UI elements inside the web page, like forms, are not rendered through GTK+.

If I understand correctly, this happens because Chrome reaches this code block:

argb

  • GetGdkWindow() returns null
  • GetTargetWindow() returns null
  • GdkEventFromImeKeyEvent() returns null
  • DispatchKeyEvent() checks if GdkEventFromImeKeyEvent() returned null and spits the error

This only applies to GTK+ 3 under X: Chrome tries to load GTK+ 4 dynamically before it tries GTK+ 3. Chrome uses a different code path when GTK+ 4 is installed and that explains why bookworm is sometimes immune to this problem (bullseye doesn't have GTK+ 4). In addition, most major distros have switched to Wayland, and there's a separate code path for Wayland: Puppy is one of the few users of the legacy GTK+ 3 code path.

The only Puppy where IME works is Fossapup, and that's because this environment variable is unset (the line is commented out). Considering its popularity, I think it's safe to assume that upstreaming this change into woof-CE will be safe. woof-CE sets this environment variable since day 1, and maybe the comment about ROX-Filer crashes is no longer correct.

Copy link
Contributor

@01micko 01micko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an ancient "fix" and indeed needs to be dropped.

@dimkr
Copy link
Contributor Author

dimkr commented Jan 26, 2023

This line was introduced in the initial commit of woof-CE (2013), but it's probably much older than that:

https://bkhome.org/archive/blog1/news202-210.htm

MU 
Sunday, August 27, 2006, 07:49 AM
I tested the DRI/DRM-modules (Radeon) from Puppy 2.02 (they are in the Kernelmodules-addon). They work, as well as the ones from Puppy 2.01.

Only 1 issue:
Rox crashes.

Solution:
In the beginning of .xinitrc, add these 2 lines:

XLIB_SKIP_ARGB_VISUALS=1
export XLIB_SKIP_ARGB_VISUALS

They fix several problems with Xlib, so I would suggest to add them to the next beta, as in 2.10 the same might happen with this kernel.
Mark

Copy link
Contributor

@peabee peabee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a test build and seems OK

@dimkr dimkr merged commit 5596ade into puppylinux-woof-CE:testing Jan 26, 2023
@dimkr dimkr deleted the bugfix/chrome-ime-broken branch January 26, 2023 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants