summaryrefslogtreecommitdiff
path: root/gdk/broadway
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2013-11-12 13:44:27 +0100
committerAlexander Larsson <alexl@redhat.com>2013-11-12 13:44:56 +0100
commitd21ac217d31ff3c356e85e7aef720fa273ad79dc (patch)
tree815667d4d5df8bde2dcc80e5dd07dbf3c992cc44 /gdk/broadway
parente331d1762625674ff0af39090264f82074277dba (diff)
downloadgtk+-d21ac217d31ff3c356e85e7aef720fa273ad79dc.tar.gz
broadway: Disable all kinds of viewport scrolling and zooming
Diffstat (limited to 'gdk/broadway')
-rw-r--r--gdk/broadway/broadway.js15
-rw-r--r--gdk/broadway/client.html4
2 files changed, 19 insertions, 0 deletions
diff --git a/gdk/broadway/broadway.js b/gdk/broadway/broadway.js
index c2d03b19c2..18d0d7f1d3 100644
--- a/gdk/broadway/broadway.js
+++ b/gdk/broadway/broadway.js
@@ -2460,6 +2460,18 @@ function onMouseWheel(ev)
return cancelEvent(ev);
}
+function onTouchStart(ev) {
+ event.preventDefault();
+}
+
+function onTouchEnd(ev) {
+ event.preventDefault();
+}
+
+function onTouchMove(ev) {
+ event.preventDefault();
+}
+
function setupDocument(document)
{
document.oncontextmenu = function () { return false; };
@@ -2475,6 +2487,9 @@ function setupDocument(document)
if (document.addEventListener) {
document.addEventListener('DOMMouseScroll', onMouseWheel, false);
document.addEventListener('mousewheel', onMouseWheel, false);
+ document.addEventListener('touchstart', onTouchStart, false);
+ document.addEventListener('touchmove', onTouchMove, false);
+ document.addEventListener('touchstart', onTouchEnd, false);
} else if (document.attachEvent) {
element.attachEvent("onmousewheel", onMouseWheel);
}
diff --git a/gdk/broadway/client.html b/gdk/broadway/client.html
index a6996123d7..42b5c45f01 100644
--- a/gdk/broadway/client.html
+++ b/gdk/broadway/client.html
@@ -2,7 +2,11 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
+<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>broadway 2.0</title>
+<style type="text/css">
+body { overflow: hidden; }
+</style>
<script type="text/javascript" src="broadway.js"></script>
</head>