Can't type after using backspace

CodeLite installation/troubleshooting forum
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Can't type after using backspace

Post by DavidGH »

Thanks. 2 more things:

In a terminal, become root (or use sudo) and do:
killall ibus-daemon
Do NOT reboot.
Now try running CodeLite. Do you have the backspace problem?

Finally, what is your current locale? In a terminal do: printenv | grep LANG and post the output.
Try running CodeLite in a terminal like this:
export LANG="en_US"
export GDM_LANG="en_US"
/usr/bin/codelite
Do you have the backspace problem in that CodeLite instance?
mex990
CodeLite Enthusiast
Posts: 12
Joined: Sat Mar 11, 2017 8:56 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't type after using backspace

Post by mex990 »

DavidGH wrote: In a terminal, become root (or use sudo) and do:
killall ibus-daemon
Do NOT reboot.
Now try running CodeLite. Do you have the backspace problem?
Yes
DavidGH wrote: Finally, what is your current locale? In a terminal do: printenv | grep LANG and post the output.

Code: Select all

[markus@winzer6 ~]$ printenv | grep LANG
LANG=en_US
GDM_LANG=en_US
[markus@winzer6 ~]$ 
DavidGH wrote: Try running CodeLite in a terminal like this:
export LANG="en_US"
export GDM_LANG="en_US"
/usr/bin/codelite
Do you have the backspace problem in that CodeLite instance?
Yes
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Can't type after using backspace

Post by DavidGH »

[markus@winzer6 ~]$ printenv | grep LANG
LANG=en_US
GDM_LANG=en_US
[markus@winzer6 ~]$
Oh, you already use en_US. From one of your previous pastes I'd expected a non-English result.
Of course, because of that exporting en_US was guaranteed not to help :(

I'm sorry, but I have no idea why you have this problem, and I can't think of anything else to suggest for your current fedora installation. You could try installing fedora in a separate partition or as a virtualbox guest, and see if a standard install still has the problem. If you do this, please report back with the result.
lehin
CodeLite Curious
Posts: 7
Joined: Tue Apr 18, 2017 1:05 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't type after using backspace

Post by lehin »

mex990, please try to use Xorg instead of Wayland as a workaround. It definitely works, at least on the all my workstations. You may either uncomment fifth line "#WaylandEnable=false" in /etc/gdm/custom.conf (and then reboot), or you may select "GNOME on XOrg" on the user login screen.
lehin
CodeLite Curious
Posts: 7
Joined: Tue Apr 18, 2017 1:05 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't type after using backspace

Post by lehin »

Yeah!!! As it seems I've found the bug in wxWidgets (src/gtk/window.cpp). I'm not sure that I've understood everything right, but one thing I can definitely say: 'if' block (beginning at line 907, src/gtk/window.cpp) looks very strange and also quite irrationally. The thing is that the code is working under Wayland neither like under X11 nor like under Windows - it just do nothing... Very strange. So, I've added exactly two lines of code into this 'if' block:

Code: Select all

else
   key_code = keysym;
The focus: in case we are working under wxGTK, but without X11 backend, we act exactly the same way as we are working under 'another' environment that doesn't support X11 keyboard symbols translation.

Everything seems to be ok after this modification. At least wx 'stc' sample is working now. I've attached diff and also spec file in order to build wx 3.1.0 supplied with Codelite 10.0.x. Can you be please so kind to verify the patch and upload it to Codelite development tree? )))

P.S. But I think, that at this moment the best approach is the using Xorg instead of Wayland. ))
P.P.S. And also, as I think, this bug is not fixed even in recent version of wx. May be it is not unreasonable to post information about the bug onto wx bug tracking?
You do not have the required permissions to view the files attached to this post.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Can't type after using backspace

Post by DavidGH »

Yeah!!! As it seems I've found the bug in wxWidgets (src/gtk/window.cpp).
Great! Well done.
I'm not sure that I've understood everything right, but one thing I can definitely say: 'if' block (beginning at line 907, src/gtk/window.cpp) looks very strange
I don't claim to understand either, but what seems to be happening is that, when if (GDK_IS_X11_DISPLAY) is false (which it will be on Wayland) key_code remains unset. Your patch corrects this.

What I don't understand is why it affects only wxStyledTextCtrl, and then only in gtk+3 builds. I tested 3.0.2, 3.0-branch, 3.1.0 and 3.1git; the same thing happens on each with gtk+3, but there's no problem with gtk+2.

Anyway you've found a fix that works and doesn't seem to break anything, at least for my keyboard layout. Perfection would be to replicate the X11 calls from the GDK_IS_X11_DISPLAY section with the Wayland equivalent, but I've no idea how to do this and nor has google.

So I've applied your fix and uploaded updated wx3.1.0 and CodeLite 10 rpms.
May be it is not unreasonable to post information about the bug onto wx bug tracking
Absolutely! And urgently, as it would be good if it could sneak into the imminent 3.0.3 release. I'll do so soon (unless you want to yourself?)
EDIT: Done in http://trac.wxwidgets.org/ticket/17848.
lehin
CodeLite Curious
Posts: 7
Joined: Tue Apr 18, 2017 1:05 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Can't type after using backspace

Post by lehin »

DavidGH wrote: I don't claim to understand either, but what seems to be happening is that, when if (GDK_IS_X11_DISPLAY) is false (which it will be on Wayland) key_code remains unset. Your patch corrects this.

What I don't understand is why it affects only wxStyledTextCtrl, and then only in gtk+3 builds. I tested 3.0.2, 3.0-branch, 3.1.0 and 3.1git; the same thing happens on each with gtk+3, but there's no problem with gtk+2.
I can say all the same. )))
DavidGH wrote: So I've applied your fix and uploaded updated wx3.1.0 and CodeLite 10 rpms.
Thank you very much!
DavidGH wrote: Absolutely! And urgently, as it would be good if it could sneak into the imminent 3.0.3 release. I'll do so soon (unless you want to yourself?)
EDIT: Done in http://trac.wxwidgets.org/ticket/17848.
Thank you once again! What is more, they already marked the ticked as "closed". Good. )
Post Reply