cefpython icon indicating copy to clipboard operation
cefpython copied to clipboard

Touch screen support

Open GoogleCodeExporter opened this issue 9 years ago • 8 comments

In CEF 3 we can enable touch events by setting the "touch-events" command line switch [2] to "auto" or "enabled", it can be done through CefApp::OnBeforeCommandLineProcessing() [3], we need to implement the CefApp API.

See Issue 786 "Touch support in CEF1 and CEF3 does not match Chromium browser" [4] in the CEF Issue Tracker for more details on touch screen support in CEF 1 and CEF 3.

See also RegisterTouchWindow() [5] on the MSDN, it might be required to call this function for the main window.

Apparently multitouch works in the cefclient sample application in CEF 3, reported in this topic "Windows touch scroll acting as mouse click event" [6] on the CEF forum. Can someone confirm that?

[1] https://code.google.com/p/chromiumembedded/source/browse/trunk/cef1/libcef/brows er_webkit_init.cc?r=1256#51 [2] https://code.google.com/p/chromium/codesearch#chromium/src/ui/base/ui_base_switc hes.cc&sq=package:chromium&type=cs&l=66&rcl=1369373180 [3] https://code.google.com/p/chromiumembedded/source/browse/trunk/cef3/include/cef_ app.h?r=1256#117 [4] https://code.google.com/p/chromiumembedded/issues/detail?id=786 [5] http://msdn.microsoft.com/en-us/library/windows/desktop/dd317326(v=vs.85).aspx [6] http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10321

Original issue reported on code.google.com by [email protected] on 24 May 2013 at 4:03

GoogleCodeExporter avatar Aug 28 '15 10:08 GoogleCodeExporter

When clicking an edit field there is no virtual keyboard appearing, but this could be implemented on your own by injecting javascript on web pages through LoadHandler.OnLoadStart() or OnLoadEnd(), the same can be done for other touch related behavior, when --touch-events=enabled flag is passed then javascript touch events will be enabled (touchstart, touchend, touchmove), allowing you to override the default behavior or implement the missing one.

Original comment by [email protected] on 1 Jun 2013 at 9:33

GoogleCodeExporter avatar Aug 28 '15 10:08 GoogleCodeExporter

When switches are set programatically they must be set in two places:

  • CefApp::OnBeforeCommandLineProcessing()
  • CefBrowserProcessHandler::OnBeforeChildProcessLaunch()

Original comment by [email protected] on 13 Jun 2013 at 7:15

GoogleCodeExporter avatar Aug 28 '15 10:08 GoogleCodeExporter

There is no touch support on Linux yet? https://groups.google.com/a/chromium.org/d/topic/chromium-discuss/p_mI45gP7q8/discussion

Original comment by [email protected] on 15 Nov 2013 at 9:05

GoogleCodeExporter avatar Aug 28 '15 10:08 GoogleCodeExporter

See Issue 101 (Linux and Aura).

Michael Goffioul has created a port of CEF with Aura support, that adds multitouch support on Linux. See the topic: https://groups.google.com/d/topic/cefpython/qMB6D8xWBC8/discussion

Original comment by [email protected] on 8 Jan 2014 at 4:01

GoogleCodeExporter avatar Aug 28 '15 10:08 GoogleCodeExporter

See issue 1059 in CEF Issue Tracker:

"Cef3: Multi-touch support with offscreen rendering." https://code.google.com/p/chromiumembedded/issues/detail?id=1059

In comment #7 there is an initial patch for Windows.

Original comment by [email protected] on 8 Jan 2014 at 4:14

GoogleCodeExporter avatar Aug 28 '15 10:08 GoogleCodeExporter

CEF Python supports setting command line switches programmatically, see Issue 65. This is in regards to the --touch-events=enabled flag.

Original comment by [email protected] on 8 Jan 2014 at 4:18

GoogleCodeExporter avatar Aug 28 '15 10:08 GoogleCodeExporter

Touch screen long press will be killed, is it because of this? tips wrong libcef.dll APPCRASH on windows

54huige avatar Aug 30 '20 15:08 54huige

What is the current state of work on this issue? I don't see any documentation related to --touch-events=enabled, or touch related events/methods in the Browser API (alongside SendMouse... events). Does --touch-events=enabled have any effect in OSR cefpython?

chintal avatar Mar 14 '22 08:03 chintal