Alexander Larsson
d12a9a5e99
[broadway] Add gdk_broadway_display_get_last_seen_time
2011-04-07 20:18:13 +02:00
Alexander Larsson
42cbed6759
[broadway] Fix up header guards to not refer to gdkx.h
2011-04-07 20:04:48 +02:00
Alexander Larsson
f0e1115f80
[broadway] Add gdkbroadway.h public header
2011-04-07 19:25:16 +02:00
Alexander Larsson
095ccf9c11
[broadway] Serialize event times
...
Event times come from the browser and may change weirdly when we reconnect
with another browser, so we normalize these to be strictly increasing
and with a 5 second gap for each reconnect.
2011-04-07 19:12:51 +02:00
Alexander Larsson
9d974ca13a
[broadway] Fix typo in implicit grab support
...
We do an implicit grab if there is no grab already, not only if there is
one.
2011-04-07 15:26:37 +02:00
Alexander Larsson
dd07f534f4
[broadway] Handle screen size
...
Without this menu placement doesn't work right
2011-04-07 15:10:39 +02:00
Alexander Larsson
8c20b476df
[broadway] Track and report last and future state
...
This fixes the drawing area demo in gtk-demo
2011-04-07 14:36:30 +02:00
Alexander Larsson
1a7b76d49d
[broadway] Report mouse pointer coordinates right
...
The windows argument to device_query_state can be a client side
window, but we must only handle the "native" part of it (i.e.
window->impl->wrapper).
2011-04-07 14:29:26 +02:00
Alexander Larsson
43aac66458
[broadway] Fix all unnecessary warnings
2011-04-07 10:03:17 +02:00
Alexander Larsson
3b1fe05e78
[broadway] Wire up the delete event
2011-04-07 10:03:17 +02:00
Alexander Larsson
06fc6e007e
[broadway] Report right root coors in toplevel mode
2011-04-07 10:03:17 +02:00
Alexander Larsson
adc05ae6b7
[broadway] Add configure event for browser-side geometry changes
...
Atm this only works for the useToplevelWindows case, but we can add
a browser wm to make use of it inside the browser too.
2011-04-07 10:03:17 +02:00
Alexander Larsson
1365e93fad
[broadway] Add experimental toplevel window mode
...
This mode makes each toplevel window get its own browser window, with
popup windows using the browser window of their transient parent.
Its not idea, as you can't get rid of all browser chrome by default, and
it means popups (like menus) can't extend outside the toplevels. But, it is
kinda cool.
2011-04-07 10:03:17 +02:00
Alexander Larsson
8831efa735
[broadway] Fixup ungrab reference to old time variable
2011-04-07 10:03:17 +02:00
Alexander Larsson
05bda376f6
[broadway] Break out document setup into its own function
...
In the future we might have more documents (one per toplevel browser
window).
2011-04-07 10:03:17 +02:00
Alexander Larsson
06ad0f52e2
[broadway] Remove unused grab.time on browser side
2011-04-07 10:03:17 +02:00
Alexander Larsson
f53771cc1d
[broadway] Break out all command handling to separate functions
...
We don't want to mix up the argument parsing with the actual implementation.
2011-04-07 10:03:17 +02:00
Alexander Larsson
7c20d59411
[broadway] Make the surface object a plain js object, not the context
2011-04-07 10:03:17 +02:00
Alexander Larsson
9f848aaf30
[broadway] Centralize surface creation code in js
2011-04-07 10:03:17 +02:00
Alexander Larsson
199cd1548f
[broadway] Track window type in browser
2011-04-07 10:03:17 +02:00
Alexander Larsson
9c5c4223e3
[broadway] Track transient_for
2011-04-07 10:03:17 +02:00
Alexander Larsson
e1dcd6735e
[broadway] Remove unused query pointer message
2011-04-07 10:03:16 +02:00
Alexander Larsson
5b645357d6
[broadway] Don't roundtrip for getting current pointer location
...
Roundtrips are bad, and this gets called a lot, so we use all currently
availible future info to "emulate" a full roundtrip, but with much lower
cost.
2011-04-07 10:03:16 +02:00
Alexander Larsson
a0048d5e70
[broadway] Add _gdk_broadway_display_consume_all_input
...
This parses and queues all currently availible input data non-blockingly.
Useful to ensure the latest up-to-date future info.
2011-04-07 10:03:16 +02:00
Alexander Larsson
fdc2059edb
[broadway] Track future pointer events locations during parsing
...
We want this info so that we can avoid roundtrips and still get
a somewhat better querying for pointer locations.
2011-04-07 10:03:16 +02:00
Alexander Larsson
1fa952fb04
[broadway] Add helper for processing input at idle
2011-04-07 10:03:16 +02:00
Alexander Larsson
e113cf26fb
[broadway] Keep track of current real cursor window (sans grabs)
...
We need this to be able to do a non-roundtripping get-window.
2011-04-07 10:03:16 +02:00
Alexander Larsson
ee1657d88e
[broadway] Break out _gdk_broadway_display_read_all_input_nonblocking
...
This is useful in other places, like when we want to iterate over
all messages recieved so far.
2011-04-07 10:03:16 +02:00
Alexander Larsson
d664e78c94
[broadway] Make pointer grabs not roundtrip
...
Since we're really only initializing grabs (except for implicit
grabs at least) from the client side we might as well do all the grab
time checks on the client side to avoid unnecassary roundtrips.
2011-04-07 10:03:16 +02:00
Alexander Larsson
56d05e093d
[broadway] Save last event time seen
2011-04-07 10:03:16 +02:00
Alexander Larsson
8aad17592e
[broadway] Parse broadway input messages earlier
...
We now parse the broadway messages as soon as they are read from the wire.
This will let us sanely do lookahead in the message queue later.
2011-04-07 10:03:15 +02:00
Cosimo Cecchi
69b9794d9e
broadway: fix a build warning
2011-03-16 10:48:24 -04:00
Alexander Larsson
9a26fd25af
broadway: Enable TCP_NODELAY for output socket
...
This makes us send data immediately, giving a much snappier
over-network experience.
2011-03-15 11:47:38 +01:00
Alexander Larsson
7605258890
broadway: Fix up whitespace and indentation for js code
2011-03-15 10:33:08 +01:00
Alexander Larsson
520dd09e8a
broadway: Use camelCase for all js code
2011-03-15 10:26:53 +01:00
Alexander Larsson
2635a27814
broadway: Fix flicker when resizing windows
...
Resizing a canvas causes a clear, so we have to save the previous
content and restore to avoid flickering.
2011-03-15 10:18:07 +01:00
Alexander Larsson
e3a2176a1f
broadway: double buffer window updates
...
Ensure that we're writing all the updates for a single rendering op
in one go without callbacks inbetween. That way some rendering will
be delayed, but the user will never see partial renderings.
2011-03-15 09:50:07 +01:00
Alexander Larsson
58c234e7d0
broadway: Don't crash if output is NULL
2011-03-15 08:50:18 +01:00
Alexander Larsson
4408e9d958
broadway: Implement gdk_broadway_device_window_at_position
...
This is required for ungrabs to work properly
2011-03-14 21:40:59 +01:00
Alexander Larsson
08f832908e
broadway: Ensure we begin a path when clipping
2011-03-14 20:59:28 +01:00
Alexander Larsson
acd72d0961
broadway: Do copy rects with compositing mode "copy"
2011-03-14 20:59:00 +01:00
Alexander Larsson
a5e5e2343c
broadway: Fix undefined variable error in js
2011-03-14 16:38:24 +01:00
Alexander Larsson
63c0198347
broadway: Start windows transparent rather than black
...
This avoids flashing
2011-03-14 16:04:34 +01:00
Alexander Larsson
084003953d
broadway: Make broadway port configurable with BROADWAY_DISPLAY
2011-03-14 15:58:55 +01:00
Alexander Larsson
9214796a4d
broadway: Report right coordinates on ungrab enter
2011-03-14 15:46:29 +01:00
Alexander Larsson
99d194b747
broadway: Fix various typos in mouse button event reporting
2011-03-14 15:24:25 +01:00
Alexander Larsson
ca203adc73
broadway: Fix up grab events, its "mode" not "detail" we send
2011-03-14 12:13:21 +01:00
Alexander Larsson
a1de735b87
broadway: Track button state
2011-03-14 12:09:19 +01:00
Alexander Larsson
e53abee805
broadway: Fix time in ungrab
2011-03-14 12:02:18 +01:00
Alexander Larsson
95b19bca33
broadway: Implement pointer grabs
2011-03-14 11:52:46 +01:00