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

Add ibus unicode input support #3055

Closed
wants to merge 27 commits into from
Closed

Conversation

seflerZ
Copy link
Contributor

@seflerZ seflerZ commented May 1, 2024

Close #1990 . This PR was made by me and @matt335672. It introduced serveral unicode input interfaces and has the ibus interface implemented (That means you should have ibus configured in the server side first).

The unicode input is a kind of method of sending unicode codes directly from the client to the server. With it, you can input any characters or glyphs (like Emoji 😁) even if they are not present in the keymap of the keyboard. It is typically used by mobile devices like Android\iOS phones, especially in Asia languages.

Another benifit of the unicode input is you can use your device's voice input to generate a bunch of texts quickly. Although we only have the ibus implemented now, it is easy to do for other input services like fcitx.

matt335672 and others added 18 commits April 16, 2024 00:05
Fixes a packet in the format send between xrdp and chansrv.
UTF-16 surrogate pairs sent from the client are remapped
to full unicode characters.
- xrdp is not now built with XRDP_IBUS to allow other input
  methods to be more easily supported.
- chansrv is only aked to start an input method if the client
  supports it.
- chansrv sends a status report back to xrdp when asked to start
  and input method.
- ./configure without --enable-ibus now works.
@matt335672
Copy link
Member

Hi @seflerZ

The CI checks are failing because the project merged #2829 recently which adds the -Wmissing-prototypes to the compiler. Your branch is currently based in an earlier part of devel which doesn't have this check.

There's a patch attached which fixes this. It does the following:-

  1. [Typo] Replace xrdp_input_unicode_destory() with xrdp_input_unicode_destroy()
  2. Uses '(void)' in declarations/definitions of functions with no arguments. '()' is not recommended for modern C code, although it's fine in C++.
  3. Marks functions which do not need external linkage with 'static'

Suggest you rebase on recent devel. This will bring #2829 into your environment. You can then add the attached patch or make your own. I've got a few extra comments to add, but those can wait

patch.txt

matt335672 and others added 9 commits May 3, 2024 23:13
1) add SSE2 simd for dwt_shift_rem and diff_count

   make dwt_shift_rem easier to read
   move common rlgr defines to common file
   move common dwt defines to common file

2) Fix 'make distcheck'

3) Fix compiler warnings on 'make check'
Needed for -Wmissing-prototypes support
vnc.c: In function ‘lib_framebuffer_update’:
vnc.c:816:37: error: ‘b’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  816 |         return (r << 16) | (g << 8) | b;
      |                ~~~~~~~~~~~~~~~~~~~~~^~~
vnc.c:1301:9: note: ‘b’ was declared here
 1301 |     int b;
      |         ^
vnc.c:816:31: error: ‘g’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  816 |         return (r << 16) | (g << 8) | b;
      |                            ~~~^~~~~
vnc.c:1300:9: note: ‘g’ was declared here
 1300 |     int g;
      |         ^
vnc.c:816:19: error: ‘r’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  816 |         return (r << 16) | (g << 8) | b;
      |                ~~~^~~~~~
vnc.c:1299:9: note: ‘r’ was declared here
 1299 |     int r;
      |         ^
Clarified wording around Fedora. Also, removed references to yum
as RHEL/CentOS 7 is EOL on 30th June 2024
@matt335672
Copy link
Member

Thanks @seflerZ

Can you rebase this on the latest devel? It will make it easier to read and review, and make the Git history read a little better when we merge this.

Let me know if you need a hand.

@seflerZ
Copy link
Contributor Author

seflerZ commented May 4, 2024 via email

@seflerZ seflerZ closed this May 5, 2024
@seflerZ seflerZ deleted the unicode_contr branch May 5, 2024 02:26
@seflerZ seflerZ restored the unicode_contr branch May 5, 2024 02:26
@seflerZ seflerZ reopened this May 5, 2024
@seflerZ seflerZ closed this May 5, 2024
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.

Support Unicode Keyboard events in xrdp
4 participants