Fix: wayland text input is broken (can not switch input method) #127824

Manually merged
Campbell Barton merged 2 commits from secext2022/blender:fix-wayland-input into main 2024-10-04 06:59:28 +02:00
Contributor

There is a BUG when use input method (e.g. input Chinese) on wayland (linux).
Switch input method (e.g. input English -> input Chinese) during input text
is not supported, so input method does not work.

Related issues: #87578, #114210, #114208.

This fix will call zwp_text_input_v3_disable every time after receive
leave event, and call zwp_text_input_v3_enable every time after receive
enter event, if text input is enabled.

This is tested on GNOME wayland (ibus).

There is a BUG when use input method (e.g. input Chinese) on wayland (linux). Switch input method (e.g. input English -> input Chinese) during input text is not supported, so input method does not work. Related issues: #87578, #114210, #114208. This fix will call `zwp_text_input_v3_disable` every time after receive `leave` event, and call `zwp_text_input_v3_enable` every time after receive `enter` event, if text input is enabled. This is tested on GNOME wayland (ibus).
secext2022 added 1 commit 2024-09-19 04:10:24 +02:00
Fix: wayland text input is broken (can not switch input method)
All checks were successful
buildbot/vexp-code-patch-lint Build done.
buildbot/vexp-code-patch-darwin-x86_64 Build done.
buildbot/vexp-code-patch-darwin-arm64 Build done.
buildbot/vexp-code-patch-linux-x86_64 Build done.
buildbot/vexp-code-patch-windows-amd64 Build done.
buildbot/vexp-code-patch-coordinator Build done.
8ad29c0c57
There is a BUG when use input method (e.g. input Chinese) on wayland (linux).
Switch input method (e.g. input English -> input Chinese) during input text
is not supported, so input method does not work.

Related issues: #87578, #114210, #114208.

This fix will call `zwp_text_input_v3_disable` every time after receive
`leave` event, and call `zwp_text_input_v3_enable` every time after receive
`enter` event, if text input is enabled.

This is tested on GNOME wayland (ibus).
secext2022 requested review from Campbell Barton 2024-09-19 04:12:10 +02:00
Author
Contributor

@ideasman42

The detail is in issue #87578.

@ideasman42 The detail is in issue #87578.

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR127824) when ready.
Bastien Montagne approved these changes 2024-09-19 13:08:19 +02:00
Bastien Montagne left a comment
Owner

The change makes sense to me, especially in relation with your investigations reported in #87578 (comment)

Would be good to also get some more testing from Linux Chinese (or Asians in general I believe?) users, so I made test builds for this PR available.

The change makes sense to me, especially in relation with your investigations reported in https://projects.blender.org/blender/blender/issues/87578#issuecomment-1296800 Would be good to also get some more testing from Linux Chinese (or Asians in general I believe?) users, so I made test builds for this PR available.
@ -8915,3 +8923,1 @@
* it appears to be a bug in mutter? Maybe? */
zwp_text_input_v3_enable(seat->wp.text_input);
zwp_text_input_v3_commit(seat->wp.text_input);
/* No more enable twice, should call enable after `enter` event.

There is no need for this comment, better add more details in the commit message about the change if needed.

Or replace that comment with something like that maybe?

/* NOTE: 'enable' also needs to be called on all 'enter' events (#text_input_handle_enter),
 * with matching calls to 'disable' on 'leave' events (#text_input_handle_leave). */
There is no need for this comment, better add more details in the commit message about the change if needed. Or replace that comment with something like that maybe? ``` /* NOTE: 'enable' also needs to be called on all 'enter' events (#text_input_handle_enter), * with matching calls to 'disable' on 'leave' events (#text_input_handle_leave). */ ```
Author
Contributor

ok, remove that comment.

ok, remove that comment.
secext2022 marked this conversation as resolved
secext2022 added 1 commit 2024-09-19 13:15:56 +02:00
No more enable twice, should call enable after `enter` event.
see `text_input_handle_enter` function.
secext2022 removed review request for Campbell Barton 2024-09-19 13:17:06 +02:00
Campbell Barton approved these changes 2024-09-20 07:12:16 +02:00

Seems fine but would like to here from users who reported similar issues.

Seems fine but would like to here from users who reported similar issues.
secext2022 requested review from Bastien Montagne 2024-10-03 10:02:23 +02:00

Somewhat disappointing to have testbuilds available and not a single people who reported issues to test them...

@ideasman42 what do you say, should we just merge the PR in main and see if we get feedback that way? There should be time to find out issues, now that 4.3 has been branched out...

Somewhat disappointing to have testbuilds available and not a single people who reported issues to test them... @ideasman42 what do you say, should we just merge the PR in main and see if we get feedback that way? There should be time to find out issues, now that 4.3 has been branched out...
Campbell Barton manually merged commit 528bd239f0 into main 2024-10-04 06:59:28 +02:00

Somewhat disappointing to have testbuilds available and not a single people who reported issues to test them...

@ideasman42 what do you say, should we just merge the PR in main and see if we get feedback that way? There should be time to find out issues, now that 4.3 has been branched out...

@mont29, done, if this resolves the other bugs and doesn't cause new ones - we could consider back-porting though. As it's a fairly isolated change.

> Somewhat disappointing to have testbuilds available and not a single people who reported issues to test them... > > @ideasman42 what do you say, should we just merge the PR in main and see if we get feedback that way? There should be time to find out issues, now that 4.3 has been branched out... @mont29, done, if this resolves the other bugs and doesn't cause new ones - we could consider back-porting though. As it's a fairly isolated change.
secext2022 deleted branch fix-wayland-input 2024-10-04 07:46:46 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#127824
No description provided.