Skip to content

Conversation

@LeHoangLong
Copy link

@LeHoangLong LeHoangLong commented Apr 25, 2025

Description:

Fixes #(issue)
Keyboard not working on mobile emulator mode (Linux).

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@LeHoangLong
Copy link
Author

LeHoangLong commented Apr 25, 2025

image

Image of working fix

Please help to advise if this fix is reasonable before I add tests.

Also, some test in glfw is failing sporadically, not sure if it's because of this change?

@andydotxyz
Copy link
Member

Yes it seems like a good approach thanks. Though I think the X methods should not be exported.

Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

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

Thanks. This looks good and works well. However; do get warnings about XKeycodeToKeysym being deprecated. Can anything else be used instead?

# fyne.io/fyne/v2/internal/driver/mobile/app
x11.c:154:13: warning: 'XKeycodeToKeysym' is deprecated [-Wdeprecated-declarations]
/usr/include/X11/Xlib.h:1682:1: note: 'XKeycodeToKeysym' has been explicitly marked deprecated here
/usr/include/X11/Xfuncproto.h:136:40: note: expanded from macro '_X_DEPRECATED'
x11.c:158:13: warning: 'XKeycodeToKeysym' is deprecated [-Wdeprecated-declarations]
/usr/include/X11/Xlib.h:1682:1: note: 'XKeycodeToKeysym' has been explicitly marked deprecated here
/usr/include/X11/Xfuncproto.h:136:40: note: expanded from macro '_X_DEPRECATED'

@andydotxyz
Copy link
Member

Though I think the X methods should not be exported.

I think my comment still stands though

@Jacalz
Copy link
Member

Jacalz commented Aug 30, 2025

I think my comment still stands though

Why not? They are being called from the C-code as far as I can see

@andydotxyz
Copy link
Member

I think my comment still stands though

Why not? They are being called from the C-code as far as I can see

Just for clarity, and for example, the function X11KeySymToFyneKeyCode is only called from within the same Go file as far as I can tell, it has no need to be exposed.

@Jacalz
Copy link
Member

Jacalz commented Sep 15, 2025

Just for clarity, and for example, the function X11KeySymToFyneKeyCode is only called from within the same Go file as far as I can tell, it has no need to be exposed.

Ah, I see. I think we were talking about different kinds of exported. I thought you meant the two functions which were exported to the C code.,

@andydotxyz
Copy link
Member

Just for clarity, and for example, the function X11KeySymToFyneKeyCode is only called from within the same Go file as far as I can tell, it has no need to be exposed.

Ah, I see. I think we were talking about different kinds of exported. I thought you meant the two functions which were exported to the C code.,

Ah yes I see the ambiguity. However I don't think the X... method(s) are exposed to C - only publicly in Go. Which it shouldn't be.

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