Sublime Forum

Touch not working properly on Linux

#1

Hi

I just installed Sublime Text build 3211 on new computer with touchscreen monitor running new install of Kubuntu 20.04. I have a bluetooth mouse & bluetooth keyboard connected as well.

I cannot select any menu options in Sublime Text using the touchscreen. For e.g., to identify the build so I could report it here, I touched “Help” and the dropdown menu appeared; I next touched “About Sublime Text” and it would highlight blue for a split second and then nothing–the highlighting disappeared, and the “Help” menu stayed open, as if I had not chosen an option. I would have to instead use the mouse to click on the option.

Also, scrolling is not working with the touchscreen. For e.g., if I pull open Preferences–>Settings, and then try to scroll down by touching my monitor, it just highlights the text.

My touchscreen monitor appears to be working throughout the rest of Kubuntu. It is working fine in Firefox, for e.g…

Any ideas?

0 Likes

#2

This is surprising, as the menus are done by GTK. Do you have any GTK-based apps that exhibit the same behaviour (firefox does its own menus)? Have you tried reverting to a freshly installed state?

0 Likes

#3

Thanks for the suggestion. I just tried reverting, and no luck. Same behaviour.

I don’t explicitly know of any GTK-based apps that are installed. Literally the only thing I’ve installed after installing Kubuntu was Sublime Edit. And anyway, I wouldn’t know a GTK-based app if it were staring me down in the face.

From what I gather, touchscreen scrolling with Firefox is a bit of a litmus test with Linux. But that has worked properly from the get-go. I did just notice, however, that touchscreen scrolling is not working with the Kate editor–it’s highlighting; but, the touch interface is working fine with Kate’s menus.

Any other suggestions?

0 Likes

#4

Try installing gedit and see if it exhibits the same behaviour.

0 Likes

#5

Good idea. Tried it, and gedit works fine. For e.g., if I click on the 3 little stacked horizontal bars on gedit’s menu bar, the menu pops open, and then I can touch “Preferences” or “About Text Editor” and everything works. Also, touch scrolling works properly as well.

This is frustrating. I’m thinking about trying to reinstall Kubuntu to see if I can get Sublime Edit to work properly with touch.

0 Likes

#6

I reinstalled Kubuntu, overwriting the original partition. Immediately after the reinstall, the only thing I did was add my bluetooth keyboard, and then I fired up FireFox and headed for Sublime’s website. This time I installed Sublime Edit using tarball instead of repository. Exact same behaviour as before: touching a menu option title will open the menu, but then I cannot select a menu item using touch.

BTW, touch scrolling in FireFox is not working properly this time (it’s highlighting). I must have made a change afterwards in the last install to correct that, and forgot that I had done that.

Any other ideas?

0 Likes

#7

I tried Fedora instead, and now I can choose menu items using touch with Sublime Edit. But scrolling is still broken using the touch screen (it highlights).

I think I prefer Kubuntu. Any idea what the problem may be?

0 Likes

#8

The highlighting is expected. I don’t think we currently handle touch events on Linux.

0 Likes

#9

I’ve added an issue for supporting touch input events: https://github.com/sublimehq/sublime_text/issues/3533

0 Likes

#10

thanks.

Got fed up with Fedora so I tried Manjaro KDE instead–and the same choosing-a-menu-option-with-touch problem resurfaced with Sublime Edit. So is that suggesting it’s a problem between KDE and Sublime Text, since that problem also occurred with Kubuntu but not Fedora?

0 Likes

#11

That would be my guess. It could also be a wayland/X11 thing, you could try switching to the other on your current distro.

0 Likes

#12

I’ve tried multiple distros and with my touchscreen, only under Fedora would Sublime Text properly respond to touchscreen events in the menus. I couldn’t get it working properly under Ubuntu, Kubuntu, Linux Mint, Manjaro, and openSUSE. Frustrating.

0 Likes

#13

I’ve just realized “xed” (another text editor) is exhibiting the same touch behaviour with the menu options. Any chance that helps point to the problem?

0 Likes

#14

I can’t reproduce the issue on Ubuntu. Are you using wayland or X11 and does switching between them change anything?

0 Likes

#15

I very rarely use my touch screen, but given I use almost the same configuration I checked and I can confirm the problem. Selecting text, moving the cursor and switching between tabs inside ST works fine. Pulling down the 1st level menus also works, but touching any option it flashes rapidly but doesn’t get activated.

I’m running Kubuntu 20.04, default X11, Thinkpad X1C6 with touchscreen, Sublime Text 3210.

0 Likes

#16

Ooooh the plot thickens!

I just checked on my older XPS laptop with Kubuntu LTS 20.04, and the same problem with touch with Sublime Text menu options is occurring. So it’s my laptop and my newer desktop.

But as I mentioned it’s not just Sublime Text, and it’s widespread across multiple distributions that I’ve tried. Under Linux Mint, which I’ve settled with, it also happens (for e.g.) with the terminal window, and with that xed editor, and I just noticed it with the document viewer. But there’s another set of apps that has a different style of menu bar and those menu options under those apps respond appropriately to touch. So it looks like an underlying problem with some component of the desktop environment.

bschaaf, you mentioned Wayland/X11 but that’s way over my head. I will read about that but just haven’t had the time yet.

0 Likes

#18

I’m also thinking about trying to reinstall Kubuntu to see if I can get Sublime Edit to work properly with touch.. .

0 Likes