Commit Graph

115 Commits

Author SHA1 Message Date
Alexander Larsson
67bcc6f04f broadway: Improve touch events
We now respect core pointer grabs, and we do the pointer emulation
detection on the browser side.
2013-11-14 11:05:16 +01:00
Alexander Larsson
4226f97d54 broadway: Support ipad on-screen keyboard
We add a custom im module for broadway that calls some broadway
specific APIs to show/hide the keyboard on focus in/out. We then forward this
to the browser, and on the ipad we focus an input field to activate
the keyboard.
2013-11-13 12:23:06 +01:00
Alexander Larsson
6917746c8e broadway: Fix focus handling with touch events 2013-11-13 12:23:06 +01:00
Alexander Larsson
82acc05cba broadway: Add initial touch event support
This seems to get something going on an ipad, but some events seem
to get swallowed. For instance, window dragging doesn't work.
2013-11-12 16:11:15 +01:00
Alexander Larsson
d21ac217d3 broadway: Disable all kinds of viewport scrolling and zooming 2013-11-12 13:44:56 +01:00
Alexander Larsson
d8c17d0739 broadway: Add raise/lower ops 2013-11-12 12:23:58 +01:00
Alexander Larsson
180517f5e8 broadway: Add buffer decoding colorizing
If you add ?debug=decoding to the url you will get colorized debug
info for the buffer decoder.
2013-11-08 13:44:00 +01:00
Alexander Larsson
688b6e63b5 broadway: Extract buffer decoding to separate helper 2013-11-08 13:44:00 +01:00
Alexander Larsson
149b3af105 broadway: Use zlib compression for broadway buffers
This imports the MIT licensed js unzip from:
https://github.com/imaya/zlib.js

and uses it to decompress in js on the client side.
2013-11-07 14:09:53 +01:00
Alexander Larsson
5ef114ba42 Switch from sending png frames to our own encoding
This is based on the rolling hashes code from
http://cgit.freedesktop.org/~krh/weston/log/?h=remote

It works by incrementally calculating hashes for every 32x32 block
in each frame sent, and then refering back to such blocks when
encoding the next frame. This means we detect when a block matches
an existing block in the previous frame in a different position.
This is great for detecting scrolling, which we need now that
the gdk level scrolling is neutered.
2013-11-07 14:09:53 +01:00
Alexander Larsson
bbfe7e0e69 broadway: Always use client side decorations 2013-11-07 14:09:53 +01:00
Alexander Larsson
6e308dc7c7 broadway: Simplify frame handling and make it ARGB32
This completely removes the delta compression and makes all buffers ARGB.
This is obviously slower, but this will be re-integrated later.
2013-11-07 14:09:53 +01:00
Alexander Larsson
b436f06a94 broadway: Remove window translation code
This is no longer used as we neutered gdk_window_scroll & co.
2013-11-07 14:09:53 +01:00
Jasper St. Pierre
0d0ff40d2f broadway: Use a binary protocol to send to the server
This makes the protocol easier to inspect over the wire and makes all
commands fixed-length.
2013-10-07 16:19:01 -04:00
Jasper St. Pierre
eb1ab0dac2 broadway: Remove authentication support 2013-10-07 16:19:01 -04:00
Jasper St. Pierre
f2e30144f8 broadway: Remove support for old browsers
Require binary array buffers and modern WebSocket protocol support.
2013-10-07 16:19:01 -04:00
Alexander Larsson
40c3062d33 broadway: Use wss: on https: uris 2013-04-01 17:44:33 +02:00
Alexander Larsson
6ef8589a51 broadway: Make chrome work again 2013-03-29 14:09:47 +01:00
Alexander Larsson
8289f4cdc9 broadway: Add support for password authentication 2013-03-29 14:09:47 +01:00
Alexander Larsson
0129876ed3 broadway: Remove leftover cruft that caused resize to fail
getTransientToplevel() doesn't exist anymore so this broke.
2013-03-29 14:09:46 +01:00
Alexander Larsson
35c295da89 broadway: Don't allow dragging windows above top of window
This is highly confusing and makes it impossible to get the windows
back.
2013-01-08 18:05:06 +01:00
Alexander Larsson
8e686357c4 broadway: Move window position ownership to browser
With this we always roundtrip position change to the webbrowser.
This avoids conflicts when things change from both directions (app and user).

Also, we fake configure evens when there is no web client to ensure
apps get the events.
2013-01-08 18:05:06 +01:00
Alexander Larsson
aac4a027eb broadway: Stop default mouse button handling
This makes it not possible to select the canvas objects, etc.
2012-12-27 22:56:04 +01:00
Alexander Larsson
9c3cd49abd broadway: Remove separate browser windows hack
This never really worked well, we need to be able to fully handle
sizes from the client.
2012-12-20 00:00:16 +01:00
Alexander Larsson
0a808bea54 broadway: Separate out the server parts
This (shouldn't) change any behaviour, but it moves the
webserver parts to a separate file, making the broadway display file
smaller and preparing for later separating out the server to its own
process.
2012-12-20 00:00:16 +01:00
Alexander Larsson
db374a0a87 broadway: Use binary websockets if available 2012-10-01 14:58:57 +02:00
Alexander Larsson
203dd8bf7a broadway: Fix indentation 2012-10-01 14:58:56 +02:00
Alexander Larsson
96e7ff73dd broadway: Detect binary websockets support 2012-10-01 14:58:56 +02:00
Alexander Larsson
7c87684629 broadway: Centralize cmd parsing
This clean up things, as well as prepares for new message formats
such as binary websockets.
2012-10-01 14:58:56 +02:00
Michael Meeks
14a17873de broadway: Initial support fro V7+ websockets
Allows more modern browsers eg. firefox 5+ to use gtk/broadway
Auto-detects protocol version, and can switch between them at
as you connect a different browser.

This works to some extent, but seems to hang sometimes, for
instance the "button box" test in testgtk never shows up.
2011-11-10 10:12:28 +01:00
Lapo Calamandrei
ce80929b83 [broadway] New adwaita based css for "wm"
Created by Lapo Calamandrei.
2011-04-19 08:30:21 +02:00
Alexander Larsson
dc56a51cec [broadway] Remove debug spew 2011-04-18 20:51:53 +02:00
Alexander Larsson
0abd5e2767 [broadway] Stream data over websocket
The zlib compressed xmlhttprequest thing was a nice hack, but it doesn't
really work in production. Its not portable, doesn't have enought API
(missing notification for closed sockets) and having to synchronize
between two different connections in a reliable way is a pain.

So, we're going everything over the websocket. This is a pure switch,
but after this we want to modify the protocol to work better over
the uncompressed utf8 transport of websockets.
2011-04-18 20:51:53 +02:00
Alexander Larsson
02e9b97981 [broadway] Implement wm close in browser 2011-04-18 11:50:29 +02:00
Alexander Larsson
52074b4cac [broadway] Report most special keys in keypressed
Some special key keycode values as seen in keydown actually match
normal keys (like "." has a keyCode 46 on keyPress, which is the same
as Delete, but 190 for KeyDown). So we must match the special keys on
keypress. However, some things must be checked on keydown as they are not
generating keypress events.
2011-04-18 10:55:41 +02:00
Alexander Larsson
22c250e324 [broadway] Correctly handle ungrabs in the browser side
Always call doUngrab to get the right event, and always do this
if the grabbed window is hidden or destroyed.
2011-04-15 20:34:31 +02:00
Alexander Larsson
887743728f [broadway] Handle keyboard modifiers in state 2011-04-14 21:36:42 +02:00
Alexander Larsson
7d37534ee2 [broadway] Implement keyboard event better
We're using the noVNC keyboard even handling model (and some of the
code with permissions). This means we combine data from keydown and
keypress to figure out the translated keysyms according to the keyboard
layout at the users machine.
2011-04-14 21:36:42 +02:00
Alexander Larsson
85c1c22d04 [broadway] Cancel key events after seeing them 2011-04-12 13:38:04 +02:00
Alexander Larsson
afdde925b8 [broadway] Fix canvas resize when resizing browser window
We always have to resize the canvas, even when its in a toplevel.
2011-04-12 11:34:13 +02:00
Alexander Larsson
20542b0ead [broadway] Fix typo 2011-04-12 11:21:47 +02:00
Alexander Larsson
f4bef2c720 [broadway] Combine window move and resize into one op
This way we avoid sending a configure event for the inbetween state
if we're resizeing and moving at the same time.
2011-04-12 11:12:39 +02:00
Alexander Larsson
ca49ec2c8c [broadway] Fix various js warnings 2011-04-12 11:12:39 +02:00
Alexander Larsson
840df5c7c1 [broadway] Add stacktrace debugging functions 2011-04-12 11:12:39 +02:00
Alexander Larsson
2934569781 [broadway] Always send configure events from browser
As soon as something changes, even if it was a request from the user
we send a configure event. If not we might race with a app-side
generated configure event.

For instance, a create + resize might create only a configure event for
the create in the browser, but that may get to the app after the app-side
configure event for the resize, overriding the new size.
2011-04-12 11:12:39 +02:00
Alexander Larsson
4bbc45380b [broadway] More complete handling of transient parent
We now handle any order of transient being set and windows shown/created
2011-04-12 11:12:39 +02:00
Alexander Larsson
75dc3f3a07 [broadway] Use mozInnerScreenX & co to get window position
This way we don't have to rely on any event, which won't work until
we get an event.
2011-04-12 11:12:38 +02:00
Alexander Larsson
8a7e208bb2 [broadway] Parse x/y as signed 2011-04-12 11:12:38 +02:00
Alexander Larsson
4cb979d6b9 [broadway] Update window geometry after showing window 2011-04-12 11:12:38 +02:00
Alexander Larsson
4c575ac343 [broadway] Don't cache surface.transientToplevel as that might change at various times 2011-04-12 11:12:38 +02:00