You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My atom-shell app needs to run on a specific linux device which has a touch-panel.
Out of the box some things like dragging a range input don't work with atom-shell (as well as with chromium). After some testing I figured out that if I start chromium with
the touchscreen gets recognised and the range sliders work.
I've managed to add the --touch-events switch to the atom-shell code as it's part of the WebRuntimeFeatures with
blink:WebRuntimeFeatures::enableTouch(bool);
Now I can enable it through app.commandLine.appendSwitch('touch', 'true');.
But I have no idea how to implement the --touch-devices switch as I have no experience with the atom-shell code nor with the chromium code.
If someone has a hint or idea how to add this I would appreciate it a lot.
Are you using the latest atom-shell? I believe code related to --touch-events and --touch-devices is already in atom-shell.
Can you try appending --touch-events=invalid in command line and see if there is a Invalid --touch-events option: invalid error printed? If it does not then you are using an old atom-shell that doesn't support this switch.
Is there any reason to just not enable it all the time?
I think it will convert all mouse events into touch events.
Okay - didn't know this is already implemented.
I've tested this on 0.20.4 now - yes, --touch-events does work. I get Invalid --touch-events option: invalid. But when I execute it with --touch-devices=invalid I don't get an error message.
@mcdermed you need to append --touch-events and --touch-devices=X to the atom executable. ./atom --touch-events --touch-devices=ID PATH_TO_APP works for me on ubuntu 12.04.
I haven't tried if it works with the app.commandLine.appendSwitch though.
Thanks for the response @GeorgS. I'm just now getting around to testing this again and it seems like those flags aren't having any effect on touch events for me. I've set --touch-devices=X to multiple different values and I see no difference in touch events being triggered in the browser.
google-chrome --touch-events --touch-devices=8 www.google.com
// Touch events work
./atom --touch-events --touch-devices=8 app_path
// touch events work
./atom --touch-events --touch-devices=15 app_path
//touch events work
As it is described in details at atom/atom#6306, atom editor since version 0.189.0 suffers from a Chrome41 bug with touch screen in Linux@VirtualBox environment. I have tried:
passing option(s) --touch-devices=123 and/or --touch-events=invalid to atom command line directly;
modifying /usr/bin/atom to pass the options above;
patching source code with app.commandLine.appendSwitch '--touch-events=123' and rebuilding the editor from the scratch.
Activity
anaisbetts commentedon Jan 6, 2015
Is there any reason to just not enable it all the time?
zcbenz commentedon Jan 6, 2015
Are you using the latest atom-shell? I believe code related to
--touch-eventsand--touch-devicesis already in atom-shell.Can you try appending
--touch-events=invalidin command line and see if there is aInvalid --touch-events option: invaliderror printed? If it does not then you are using an old atom-shell that doesn't support this switch.I think it will convert all mouse events into touch events.
GeorgS commentedon Jan 7, 2015
Okay - didn't know this is already implemented.
I've tested this on
0.20.4now - yes,--touch-eventsdoes work. I getInvalid --touch-events option: invalid. But when I execute it with--touch-devices=invalidI don't get an error message.The function for
--touch-devicescan be found here https://github.com/scheib/chromium/blob/master/ui/events/x/touch_factory_x11.cc#L56.GeorgS commentedon Jan 7, 2015
I've now tested this on the linux device with the touch-panel, both flags work 👍.
Sorry for not checking this first - thanks!
elkwood commentedon Feb 13, 2015
I'm sorry to bring up an old issue but I'm having trouble with this.
Ubuntu 14.04 Atom v0.21.2
GeorgS commentedon Feb 14, 2015
@mcdermed you need to append
--touch-eventsand--touch-devices=Xto the atom executable../atom --touch-events --touch-devices=ID PATH_TO_APPworks for me on ubuntu 12.04.I haven't tried if it works with the
app.commandLine.appendSwitchthough.elkwood commentedon Feb 25, 2015
Thanks for the response @GeorgS. I'm just now getting around to testing this again and it seems like those flags aren't having any effect on touch events for me. I've set
--touch-devices=Xto multiple different values and I see no difference in touch events being triggered in the browser.Perhaps I misunderstand how this flag works but I interpret it as only the device id specified will be used for touch input. If chrome can't use the touch device does it fallback to finding it itself?
I'm using this flag to try to resolve this chrome bug https://code.google.com/p/chromium/issues/detail?id=439914
am-kantox commentedon Apr 14, 2015
As it is described in details at atom/atom#6306, atom editor since version 0.189.0 suffers from a Chrome41 bug with touch screen in Linux@VirtualBox environment. I have tried:
--touch-devices=123and/or--touch-events=invalidto atom command line directly;/usr/bin/atomto pass the options above;app.commandLine.appendSwitch '--touch-events=123'and rebuilding the editor from the scratch.Nothing helped.
jadbox commentedon Jun 22, 2015
I'm having the same issue! Very annoying ><
kidwm commentedon Jul 16, 2015
https://code.google.com/p/chromium/issues/detail?id=439914#c22
Someone made a patch for this problem.
kidwm commentedon Sep 2, 2015
http://code.google.com/p/chromium/issues/detail?id=486492
this issue maybe fixed in Chromium 45
mgcrea commentedon Sep 14, 2015
Can confirm this is fixed with latest electron (based on v45).