Commit Graph

45 Commits

Author SHA1 Message Date
Alexander Larsson
f30ba56323 broadway: Reintroduce smarter diffing
We now send very minimal diff operations.
2019-03-29 14:30:13 +01:00
Alexander Larsson
4dfe2e6e2f broadway: Initial restructuring of node tree diffing
This goes back to a very naive diff, but that reuses nodes from
previous frames using the node id. This will be a bettter base
to start from.
2019-03-29 14:30:13 +01:00
Alexander Larsson
90c5a5ff6b broadway: Update broadway_node_type_names 2019-03-29 14:30:13 +01:00
Alexander Larsson
9212727f53 broadway: Use css transforms
This allows generic transforms nodes to work.
2019-03-27 19:27:16 +01:00
Alexander Larsson
fbefec52a5 Broadway: Add id for nodes and reuse old ones
When sending render nodes from the client to the daemon we add an id,
and whenever we're about to re-send the entire tree node we instead
send the old id. We track all the nodes for the previous frame
of the surface this way.

Having the id on the daemon side will allow us do to much better deltas.
2019-03-26 17:07:47 +01:00
Alexander Larsson
b097f0a7d8 Broadway: Add node for debug nodes
This can be helpful when debugging broadway.
2019-03-26 17:07:47 +01:00
Alexander Larsson
1b5b1bfd0e broadway: Don't fall back for translation transform nodes
These are trivial anyway
2019-03-26 17:07:47 +01:00
Alexander Larsson
d141bd4121 broadway: Use "surface" instead of window/toplevel for browser object
Als fixes indentation/tabs and removes some unused code.
2017-12-05 15:50:34 +01:00
Alexander Larsson
e80ad0e0f9 broadway: Remove references to unused BROADWAY_EVENT_DELETE_NOTIFY 2017-12-05 15:50:34 +01:00
Alexander Larsson
61ea8e8676 broadway: Add some (disabled) debugging tools 2017-11-30 21:57:42 +01:00
Alexander Larsson
521b09cc96 broadway: Send diffs of node trees
Reusing pre-created nodes is a lot faster both in terms of
dom modifications and of transfer sizes.
2017-11-30 21:57:42 +01:00
Alexander Larsson
cfb76fedb6 broadway: Roundtrip each update to rate limit redraw 2017-11-23 10:48:29 +01:00
Alexander Larsson
b74959a605 broadway: Add clip node 2017-11-23 10:48:29 +01:00
Alexander Larsson
9e5a22bbe5 broadway: Add opacity node 2017-11-23 10:48:29 +01:00
Alexander Larsson
9b1f6acc2b broadway: Add shadow node 2017-11-23 10:48:29 +01:00
Alexander Larsson
278370c8e5 broadway: Add linear gradient node 2017-11-23 10:48:29 +01:00
Alexander Larsson
f7ff6dbb66 broadway: Add RoundedClip node 2017-11-23 10:48:29 +01:00
Alexander Larsson
0083c084e4 broadway: Add inset shadow 2017-11-23 10:48:29 +01:00
Alexander Larsson
35ceb8e626 broadway: Add outset shadow node 2017-11-23 10:48:29 +01:00
Alexander Larsson
cf03229a99 broadway: Add border node 2017-11-23 10:48:29 +01:00
Alexander Larsson
0b38ab339e broadway: Add color nodes 2017-11-23 10:48:29 +01:00
Alexander Larsson
54e7a8f0c0 broadway: Remove remaining unused window_update code 2017-11-23 10:48:29 +01:00
Alexander Larsson
f7d8ee041b broadway: Initial version of using actual render nodes 2017-11-23 10:48:29 +01:00
Alexander Larsson
cc7423855b broadway: Use textures to configure window contents
Instead of using the old buffer code, just use textures to define the
window contents.
2017-11-23 10:46:47 +01:00
Alexander Larsson
a4636a06a7 broadway: Actually upload textures to client 2017-11-23 10:46:47 +01:00
Alexander Larsson
48d587d255 broadway: Add support for uploading textures to daemon 2017-11-23 10:46:47 +01:00
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
ca89f5ab93 broadway: Send focus out events 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
d8c17d0739 broadway: Add raise/lower ops 2013-11-12 12:23:58 +01:00
Alexander Larsson
ddade66496 broadway: use 'click-to-focus' approach instead of 'focus-follows-mouse'
The broadway backend would move the focus from one window to another based on
where the mouse was (i.e. 'focus-follows-mouse' approach). Handling the focus
this wait didn't play well with widgets which rely on focus-in-event and
focus-out-event, like the GtkEntry when using a completion popup window, see
e.g:
  https://bugzilla.gnome.org/show_bug.cgi?id=708984

So instead, setup broadway to require a click in a window to move the focus
(i.e. 'click-to-focus' approach):

 * The implicit GDK_FOCUS_CHANGE events that were generated upon reception of
   BROADWAY_EVENT_ENTER or BROADWAY_EVENT_LEAVE are removed.

 * The broadway daemon will now keep track of which is the focused window

 * Whenever the daemon detects an incoming BROADWAY_EVENT_BUTTON_PRESS, it will
   trigger the focused window switch, which sends a new BROADWAY_EVENT_FOCUS to
   the client, specifying which windows holds the focus.

 * Upon reception of a BROADWAY_EVENT_FOCUS, the client will generate a new
   GDK_FOCUS_CHANGE.

 * gdk_broadway_window_focus() was also implemented, which now requests the
   focus to the broadway server using a new BROADWAY_REQUEST_FOCUS_WINDOW.

This is based on an initial patch from Aleksander Morgado <aleksander@lanedo.com>.
2013-11-12 12:03:50 +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
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
Alexander Larsson
8289f4cdc9 broadway: Add support for password authentication 2013-03-29 14:09:47 +01:00
Alexander Larsson
99cc5758b1 broadway: Ensure broadway request members are 32bit aligned 2013-03-18 16:41:02 +01:00
Alexander Larsson
d5812de2e6 broadway: Send window size to new clients
Tell all new clients about the current (last sent) window size.
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
4d7b822059 broadway: Make the InputMessage type a uint32
That way we don't get any holes in the structs.
2013-01-08 18:05:06 +01:00
Alexander Larsson
71e7912940 broadway: Remove last_serial from BroadwayReplyBase
This is not used anyway.
2013-01-08 18:05:05 +01:00
Alexander Larsson
fc96ef51d7 broadway: Initial version of separate broadway server
This kinda works but is very rudimentary
2012-12-27 22:56:03 +01:00
Alexander Larsson
4addb2108e broadway: Add OPs top protocol 2012-12-27 22:56:03 +01:00
Alexander Larsson
9aa36d8d0d broadway: Add enum for even types 2012-12-27 22:56:03 +01:00
Alexander Larsson
95a0c055da broadway: Break out broadway protocol in its own header 2012-12-27 22:56:03 +01:00