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
Rico Tzschichholz
b851db113e
broadway: Add rawinflate.min.js to EXTRA_DIST
...
In addition to 149b3af105
2013-11-07 17:44:08 +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
c6a3c0e4eb
broadway: Implement gdk_window_begin_move_drag()
2013-11-07 14:09:53 +01:00
Alexander Larsson
3be4038d02
broadway: Add gdkbroadwaydisplay.h include
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
0a40951f40
Revert "broadway: Fix gcc warning"
...
This reverts commit f0d3d72574
.
2013-11-05 11:14:01 -05:00
Benjamin Otte
f0d3d72574
broadway: Fix gcc warning
2013-11-04 16:36:11 +01:00
Jasper St. Pierre
e109f10017
broadway-server: Fix signedness issue
2013-10-31 12:20:04 -04:00
Manuel Bachmann
572e58123e
Broadway : Replaced be32toh() with win32-compatible ntohl()
2013-10-31 00:43:58 +01:00
Jasper St. Pierre
d7417580b7
broadway: Don't bother memdup-ing
...
If we're going to run off the end due to an invalid message,
we're going to run off the end. We'll protect this by doing
proper bounds checking in the future, but the malloc gives
us nothing for now.
2013-10-07 16:19:01 -04: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
b2113b7384
gdk: Add gdk_cursor_new_from_surface
...
We need this to be able to handle scaled cursor images.
We implement the new _from_pixbuf by converting to a surface and
assuming the scale was 1.
2013-08-07 13:34:10 +02:00
Alexander Larsson
71fe43543c
gdk: Add gdk_cursor_get_surface()
...
We want a surface so we can properly represent the scale factor for it.
All backends are converted to use surfaces and we reimplement the
backwards compat code in the generic code.
2013-08-07 13:34:10 +02:00
Alexander Larsson
e8b38fedbd
gdk: Convert mouse position to doubles, add new getters
...
We've long had double precision mouse coordinates on wayland (e.g.
when rotating a window) but with the new scaling we even have it on
X (and, its also in Xinput2), so convert all the internal mouse/device
position getters to use doubles and add new accessors for the
public APIs that take doubles instead of ints.
2013-07-03 14:39:25 +02:00
Chun-wei Fan
2268e9d6c9
Broadway: Allow Compilation on Windows/MSVC
...
-Don't include unistd.h unconditionally as it's not available in Visual
Studio, but include io.h where necessary.
-Avoid C99isms, and use _chsize_s in place of ftruncate when unistd.h is
not available (as in the case of Visual Studio)
2013-07-01 14:51:03 +02:00
Tarnyko
4b49c44b0a
win32: Make broadway build
2013-07-01 14:46:25 +02:00
Jani Välimaa
44b287a4ae
Ensure broadway backend links when using as-needed linking
...
Error message at:
http://pkgsubmit.mageia.org/uploads/failure/cauldron/core/release/20130617185755.wally.valstar.6794/log/gtk+3.0-3.9.4-1.mga4/build.0.20130617185804.log
<ovitters> mclasen_:
http://svnweb.mageia.org/packages/cauldron/gtk%2B3.0/current/SOURCES/gtk%2B-3.9.4-linking.patch?revision=444164&view=markup
<ovitters> mclasen_: gtk doesn't seem to link properly on Mageia
(as-needed thing probably)
<mclasen_> sure, looks fine
<ovitters> can I commit this?
<mclasen_> yes, please commit
2013-06-17 21:55:30 +02:00
Tarnyko
53a9311e2c
broadway: Add win32 support
2013-06-13 19:35:43 +02:00
Tarnyko
e2da2259ad
broadway: Support TCP displays
2013-06-13 19:12:46 +02:00
Tarnyko
d4dacc596f
broadway: Only use gio-unix on G_OS_UNIX
2013-06-13 18:15:10 +02:00
Tarnyko
050702494b
broadway: Remove unused includes
2013-06-13 18:09:32 +02:00
Tarnyko
b20d949470
broadway: Add configure checks for sys/mman.h
2013-06-13 18:01:44 +02:00
Alexander Larsson
19560bf0d4
gdkwindow: Remove translate vfunc
...
This is not used anymore
2013-05-07 16:33:00 +02:00
Matthias Clasen
8af16c5d44
New visibility handling in gdk
...
Change the visibility handling to be the same way we do it in
GLib now. We pass -fvisibility=hidden to gcc and decorate public
functions with __attribute__((visibility("default"))).
This commit just does this for GDK, GTK+ will follow later.
2013-05-05 15:38:48 -04:00
Matthias Clasen
ca81028901
Add GDK_AVAILABLE_IN_ALL annotations in gdk
...
This is in preparation to modernizing our handing
of exported symbols.
2013-05-05 15:38:46 -04:00
Benjamin Otte
d67880bf72
broadway: Remove displaymanager implementation
...
This is an API break, but the broadway backend is unsupported, so we can
get away with it.
2013-05-02 16:15:22 +02:00
Benjamin Otte
a6a4428f23
gdk: Unvfuncify gdk_display_manager_open_display()
...
This looks like a pretty stupid patch, but it's only a step towards the
ultimate end goal: Get rid of all the displaymanagers.
2013-04-19 16:23:43 -04:00
Benjamin Otte
c1607c14d5
broadway: Get rid of generic macros
...
Use existing API instead.
2013-04-19 16:18:25 -04:00
Benjamin Otte
f345051d36
displaymanager: Emit display-opened directly
...
Instead of letting every backend do it manually.
2013-04-19 16:18:25 -04:00
Benjamin Otte
065a8da87a
gdk: Refactor default key vfuncs
...
Instead of copying them all over the place, keep a default
implementation around.
2013-04-16 15:30:14 +02:00
Benjamin Otte
1651d9ac3e
broadway: Delete 2 files doing nothing
...
A function was doing nothing but calling a function that was in its own
source file doing nothing but calling a function in its own source file
that did nothing.
2013-04-16 15:30:14 +02:00
Benjamin Otte
aa9e974c86
gdk: Make atoms handled generically
...
This is another step towards making GdkDisplayManager backend-agnostic.
Most of the backends profit from this as their atom implementations
where generic anyway - x11 needed that to allow multiple X displays and
broadway, quartz and wayland don't have the concept of displays.
The X11 backend still did things, so I only #if 0'd some code but did
not actually update anything.
2013-04-15 15:43:27 +02:00
Benjamin Otte
7ef508ff4a
displaymanager: Handle list of displays in base class
...
This moves the add/remove_display() functions from the subclasses to
GdkDisplay and GdkDisplayManager. It also gets rid of the list_displays
vfunc.
2013-04-15 15:43:26 +02:00
Benjamin Otte
839f402191
displaymanager: Handle the default display
...
... instead of having every backend do it on their own.
2013-04-15 15:43:26 +02:00
Alexander Larsson
9a79c3d643
broadway: Unsure we clear the grab on window hide
2013-04-05 17:07:04 +02:00
Alexander Larsson
a6a768437d
broadway: Fix warning
...
Don't pass NULL source_device in grab/ungrab events
2013-04-05 17:07:03 +02:00
Alexander Larsson
8084e6e468
broadway: Ensure we allocate shm surface space early
...
This is nicer then getting random sigbus later
2013-04-03 15:58:42 +02:00
Alexander Larsson
c340dfeaf8
Broadway: Fix shm names
...
We were sometimes getting zero chars in the name, making them
shorter, due to an off-by-zero in the size.
2013-04-03 15:58:41 +02:00
Alexander Larsson
b7a1561fef
broadway: destroy old surface before creating new one
...
We were not using the old one anyway, and this may in some cases
use less memory (although in most cases the server has a ref to the
surface anyway).
2013-04-03 15:58:40 +02:00
Benjamin Otte
a55f1f4e95
broadway: Mark deprecated function call
...
... to avoid gcc warning us. Ideally, we'd not call a deprecated
function here, but I'm lazy.
2013-04-02 11:45:44 +02:00
Benjamin Otte
dc132a9895
broadway: Don't use deprecated API
2013-04-02 11:45:44 +02:00
Benjamin Otte
a6b29d73d7
gdkdisplay: Remove get_screen() and get_n_screens() vfuncs
2013-04-02 11:45:44 +02:00
Alexander Larsson
40c3062d33
broadway: Use wss: on https: uris
2013-04-01 17:44:33 +02:00
Alexander Larsson
e9b8b5c1f0
broadway: Reuse surfaces passed to server
...
This way we don't have to reopen all the time for pure updates,
and we can immediately unlink the shm file to avoid "leaking" them
on improper shutdown.
2013-03-29 14:09:47 +01:00
Alexander Larsson
c6baa9bc25
broadway: Move surface open to server
...
This way we can cache the last opened surface
2013-03-29 14:09:47 +01: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
1148a375e5
broadway: Limit window resize based on window geometry
2013-03-29 14:09:47 +01:00
Alexander Larsson
71b4557210
broadway: Sync surface updates with paint clock
...
We now only update surface data after we have painted. Before we painted
in an idle, which meant we might send black data some times if we e.g.
resized the window and had not painted yet. Also, it means we're updating
less often to the daemon, saving resources.
We still have to queue a flush in the idle for non-draw operations,
otherwise e.g. resize of a toplevel will never be flushed if the clock
is frozen (e.g. during toplevel resize).
2013-03-29 14:09:47 +01:00
Alexander Larsson
a20cb3dd25
broadway: Ensure window sizes are synched right
...
We don't want to update the window size on configure event, only
the position, as the size is client side controlled. We were
updating to an old size during resizes which causes us to send
surfaces of the wrong size to the daemon.
2013-03-29 14:09:46 +01:00
Alexander Larsson
19e683e62a
broadway: Clean up moveresize code
2013-03-29 14:09:46 +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
e9906138e5
broadway: Fix mouse position typo
2013-03-29 14:09:46 +01:00
Matthias Clasen
38eab78904
broadway: Don't use deprecated gdk_cursor_ref
2013-03-24 14:22:38 -04:00
Matthias Clasen
832c698776
Implement GInitable in GdkBroadwayDisplayManager
...
Add GInitable implementation and fail the initialisation if it is not
possible to set up a broadway server.
2013-03-23 00:48:25 -04:00
Alexander Larsson
8fb60cda19
broadway: Fix assert failure
...
Requests are not limited in size by BroadwayRequest, as
BroadwayRequestTranslation can be of variable size. No need
to copy the request anymore though, because requests are aligned
now.
2013-03-18 16:41:05 +01:00
Alexander Larsson
99cc5758b1
broadway: Ensure broadway request members are 32bit aligned
2013-03-18 16:41:02 +01:00
Benjamin Otte
c7cf937789
broadway: pointer targets differ in signedness
2013-03-01 16:25:14 +01:00
Benjamin Otte
9d55b3c6fd
broadway: variable 'broadway_display' set but not used
2013-03-01 16:25:14 +01:00
Owen W. Taylor
df3e19b449
Broadway/Quartz/Win32: make event source prepare()/check() note paused status
...
When events are paused, we should not return TRUE from prepare() or check().
GTK+ handles this for events that are already in the GTK+ queue, but
we also need suppress checks for events that are in the system queue - if we
return TRUE indicating that there are events in the system queue, then we'll
call dispatch(), and do nothing. The event source will spin, and will never
run the other phases of the paint clock.
(Broadway doesn't have a window system queue separate from the GDK event queue,
but we write the function the same way for consistency.)
https://bugzilla.gnome.org/show_bug.cgi?id=694274
2013-02-21 09:59:58 -05:00
Owen W. Taylor
645b5f398d
Reimplement _NET_WM_SYNC_REQUEST inside X11 backend
...
Deprecate gdk_window_enable_synchronized_configure() and
gdk_window_configure_done() and make them no-ops. Implement the
handling of _NET_WM_SYNC_REQUEST in terms of the frame cycle -
we know that all processing will be finished in the next frame
cycle after the ConfigureNotify is received.
2013-02-14 17:19:51 -05:00
Alexander Larsson
ada20f475d
broadway: Make /dev/shm names nicer
2013-01-10 23:59:23 +01:00
Alexander Larsson
da8ff82df5
broadway: Make Sec-WebSocket-Origin optional
...
Sometimes we get no Origin in the request
2013-01-10 22:50:03 +01:00
Alexander Larsson
2e76e5a543
broadway: Allow binding http server to an ip
2013-01-10 21:38:39 +01:00
Alexander Larsson
befde1f7de
broadway: Remove leftover typedef
2013-01-10 16:00:43 +01:00
Alexander Larsson
5708e2bc2c
broadway: Update TODO
2013-01-08 18:05:06 +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
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
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
f72d1a8d2b
broadway: Fix gdk_broadway_server_wait_for_reply
...
We didn't properly queue an idle to handle the read messages so they
were never serviced in some situations.
2013-01-08 18:05:06 +01:00
Alexander Larsson
6f910e5e02
broadway: Clean up broadwayd event sending code
...
Use the right size and put the client serial in the right place.
2013-01-08 18:05:06 +01:00
Alexander Larsson
c83d35d1df
broadway: Rewrite serials for clients
...
This seems right, but atm it breaks grabs.
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
Matthias Clasen
5adecf183b
Move single-include guards inside include guards
...
gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810
2012-12-28 09:57:56 -05:00
Alexander Larsson
ec45d2f8c7
broadway: Handle NULL surface in update
...
This happen if nothing has been drawn yet.
2012-12-27 22:56:04 +01:00
Alexander Larsson
e00bc73de8
broadway: Rename gdkbroadway-server-client.c to gdkbroadway-server.c
2012-12-27 22:56:04 +01:00
Alexander Larsson
6410a43b76
broadway: Make resize grip work again
2012-12-27 22:56:04 +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
9555478b9e
broadway: Add TODO.broadway
2012-12-27 22:56:04 +01:00
Alexander Larsson
f84df03513
broadway: Move broadwayd to bin
2012-12-27 22:56:04 +01:00
Alexander Larsson
63b6c07fe0
broadway: During pointer grabs, send pointer events only to one client
2012-12-27 22:56:04 +01:00
Alexander Larsson
75ee72f2ac
broadway: Make daemon side server "gdk independent".
2012-12-27 22:56:04 +01:00
Alexander Larsson
3558e655b4
broadway: Proper handling of http port and display nr
2012-12-27 22:56:04 +01:00
Alexander Larsson
59830a9001
broadway: Collect and document some TODOs
2012-12-27 22:56:04 +01:00
Alexander Larsson
329372a343
broadway: Track windows for client and kill on client exit
2012-12-27 22:56:04 +01:00
Alexander Larsson
5ee8b69418
broadway: Rename gdkbroadway-server.c to broadway-server.c
...
This way the broadway-*.c namespace is for the daemon and gdk* for the
gdk lib.
2012-12-27 22:56:03 +01:00
Alexander Larsson
8b9ccf4ee9
broadway: rename broadway-server to broadwayd
...
The "server" part is too confusing, there are to many servers around.
2012-12-27 22:56:03 +01:00
Alexander Larsson
e801d06229
broadway: Drop libbroadway.la
...
This is not needed anymore, its just used by the server.
2012-12-27 22:56:03 +01:00
Alexander Larsson
20b79b06ee
broadway: rename broadway.[ch] to broadway-output.[ch]
2012-12-27 22:56:03 +01:00
Alexander Larsson
3005f1b844
broadway: disconnect in idle when needed
...
This makes the ownership cleaner
2012-12-27 22:56:03 +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
Alexander Larsson
dfbabfbd6d
broadway: Use SOURCE operator when scrolling
2012-12-20 00:00:16 +01:00
Alexander Larsson
9e65be6c48
broadway: Allow reconnecting to a broadway page
2012-12-20 00:00:16 +01:00
Alexander Larsson
54714cb228
broadway: Fix possible access-after-free
...
We need to calculate the buf pointer after the realloc.
2012-12-20 00:00:16 +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
Aleksander Morgado
a61b359498
GdkBroadwayDisplay: include proper port number in error trace
2012-12-05 11:23:35 +01:00
Aleksander Morgado
4dabc8ba84
GdkBroadwayDisplay: initialize GError before using it
2012-12-05 11:23:28 +01:00
Jean Parpaillon
247bc3ad69
Fix out of source tree building for gdk/broadway
...
This patch fix compilation when building out of source tree (gdk/broadway dir).
Signed-off-by: Colin Walters <walters@verbum.org>
2012-10-22 11:30:37 -04:00
Alexander Larsson
db374a0a87
broadway: Use binary websockets if available
2012-10-01 14:58:57 +02:00
Alexander Larsson
86bcd1c22c
broadway: Output message data directly to buffer
...
This cleans up the code, as well as allows later format
changes for e.g. binary websockets
2012-10-01 14:58:57 +02:00
Alexander Larsson
17aea12417
broadway: Encode urls directly into message buffer
...
No need for a temporary buffer
2012-10-01 14:58:56 +02:00
Alexander Larsson
95d9b17f35
broadway: Restructure output
...
Now we queue all output commands in a single buffer, to
ensure we send everything in a single op even for v7plus.
2012-10-01 14:58:56 +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
Matthias Clasen
144a5687c9
gdk: Don't use GDK_THREADS_ENTER/LEAVE macros internally
...
These are just wrappers for the functions, and we want to
deprecate them. Stopping to use them internally is a good
first step.
2012-07-30 18:01:47 +02:00
Alexander Larsson
859b6888c7
[broadway] Fixup build
...
Seems the return value of device_query_state was removed, it was
TRUE always anyway.
2012-05-11 14:49:15 +02:00
Benjamin Otte
78638f798b
broadway: Fix vfunc prototype
2012-05-07 04:12:29 +02:00
Javier Jardón
9d0febc9a6
Change FSF Address
2012-02-27 17:06:11 +00:00
Michael Natterer
8c1c4dfd7c
gdk: pull more precondition checks into the generic gdkscreen.c
2012-02-24 16:44:44 +01:00
Michael Natterer
427b88f541
GdkScreen: fix precondition checks in the public API
...
Move g_return_if_fail() stuff from the backends to the public
functions in gdkscreen.c itself, and some fixes for ugly formatting in
the various gdkscreen-backend.c files.
2012-02-21 17:19:35 +01:00
Michael Meeks
0481fbf7ce
broadway: terminate v7 input to avoid parsing uninit memory.
2012-01-31 10:39:01 +00:00
Matthias Clasen
585a6652d5
Use G_SOURCE_CONTINUE/REMOVE
...
Now that GLib provides these macros, we should use them
to make the code more readable.
2012-01-30 19:12:27 -05:00
Alexander Larsson
fa6ad2ca04
broadway: Properly handle masked websocket messages
...
Thanks to Rafal Luzynski for pointing this out.
https://bugzilla.gnome.org/show_bug.cgi?id=656521
2012-01-25 11:47:16 +01:00
Javier Jardón
24360a8076
gdk/*: Use g_list_free_full convenience function
2012-01-05 04:22:42 +01:00
Matthias Clasen
c6df2828b7
Add gdk_screen_get_monitor_workarea
...
The function returns the part of a monitors area that should be
used for positioning popups, menus, etc. The only non-trivial
implementation atm is in the X backend, all the other backends
just return the full monitor area. The X implementation is
currently suboptimal, since it requires roundtrips to collect
the necessary information. It should be changed to monitor
the properties for changes, when XFixes allows to monitor
individual properties.
https://bugzilla.gnome.org/show_bug.cgi?id=641999
2011-12-18 14:29:16 -05:00
C. Scott Ananian
981efc90b4
Fix uninitialized digest_len field, causing WebSocket handshake to g_assert.
...
g_checksum_get_digest checks to ensure that the passed digest_len is long
enough to hold the digest, before setting it to the actual length of the
digest returned. Digest_len is uninitialized in the code, so if you're
lucky it will be larger than 20 and everything will work fine. If you're
unlucky, g_checksum_get_digest will return either -1 or some number less
than 20, and the g_assert(digest_len==20) will fail.
2011-11-14 09:55:19 +01: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
Matthias Clasen
810ef68679
Broadway: Adapt to GdkWindowImpl API change
2011-11-05 01:12:07 -04:00
Michael Natterer
616afadd78
gdk: s/gdk_cursor_unref/g_object_unref/
2011-10-15 14:35:28 +02:00
Michael Natterer
5b74ee38e8
gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and Broadway
...
In 2.x, the !HAVE_XCONVERTCASE fallback of keyval_convert_case() was
implicitly used as implementation for all !X11 backends.
In 3.x, when this function was virtualized in GdkDisplayManager,
this fallback was moved to the X11 backend and the other backends
"equipped" with /* FIXME implement */ implementations of
keyval_convert_case() which don't convert anything.
Move the fallback code back to gdk/ as default implementation
of GdkDisplayManager::keyval_convert_case() and remove its
implementations is all backends but X11. Also remove the
implementation in Wayland which was a plain copy of what
is now the default implementation.
(cherry picked from commit f46c1b76d8
)
2011-10-07 16:19:41 +02:00
Javier Jardón
32e00d1f43
Use AM_CPPFLAGS instead the obsolete INCLUDES
2011-07-06 15:58:32 +01:00
Javier Jardón
7c688cb8a6
gdk: Use const instead G_CONST_RETURN
2011-06-10 13:07:54 +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
cfd8150759
[broadway] Use cairo to generate png uris
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
2cb9ce954e
[broadway] Remove old demo code
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
1fdd4915fc
[broadway] Make close button text unselectable
2011-04-15 20:34:32 +02:00
Alexander Larsson
7f14b8bedf
[broadway] Implement gdk_window_begin_resize_drag
...
This makes the resize grip work.
2011-04-15 20:34:32 +02:00
Alexander Larsson
c331d397f0
[broadway] Remove window from hashtable when destroyed
2011-04-15 20:34:32 +02:00
Alexander Larsson
66231a29b8
[broadway] Ungrab if grabbed window is destroyed
2011-04-15 20:34:32 +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
01da867dac
[broadway] Emulate hardware keycodes in keyboard events
...
We can't really know the client side keymaps, so we use the keysym
as the hardware keycode (essentially claiming to have a keyboard with
one key for all possible keysyms). This is not ideal, but its hard to
do better with no knowledge of the client side keyboard mappings.
(And html keyboard events suck badly...)
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
Matthias Clasen
4a6f5a6247
Fix make dist in gdk/broadway
2011-04-13 17:48:48 -04: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
ddcbd8234b
[broadway] When resyncing, first create all windows then set attributes
...
Some attributes (like transient parent) depende on other windows being
there, so we create all first.
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
Alexander Larsson
7b3b4a6ad9
[broadway] Correctly track remote visible state
...
GDK_WINDOW_IS_MAPPED is not false for withdrawn windows, so we need
to track real visibility ourselves.
2011-04-11 12:09:43 +02:00
Alexander Larsson
33d16b16c9
[broadway] Clean up js side surface handling
...
* Always calculate the context, don't store in surface.
* Store the toplevel element (frame or canvas) for easy access.
* Always use visibility hidden rathern than display none to hide windows,
as this means we can always rely on dom positioning info.
2011-04-11 12:09:43 +02:00
Alexander Larsson
27c4d104fb
[broadway] Restack on window show to ensure all zIndexes are right
2011-04-11 12:09:43 +02:00
Alexander Larsson
c839f2910c
[broadway] Store surface, not id in stackingOrder list
2011-04-11 12:09:43 +02:00
Alexander Larsson
ace1c4c284
[broadway] Set transient-for before showing window
...
When syncing windows, make sure we set transient-for before showing
the window to avoid it being visible with the wrong transient-for
(i.e. possibly on the wrong browser window).
2011-04-11 12:09:43 +02:00
Alexander Larsson
05dfb7f594
[broadway] Fix css typo
...
rgb takes 3 params, rgba takes four.
2011-04-11 12:09:43 +02:00
Alexander Larsson
7a197e5b65
[broadway] Fix up frame size calculation
...
Turns out that offsetTop/Left doesn't contain the border, so we need
to manually add that in.
2011-04-11 12:09:43 +02:00
Alexander Larsson
2728cc9508
[broadway] Remove expensive transparency effects from css
2011-04-10 21:10:07 +02:00
Alexander Larsson
d6beabbff2
[broadway] Make the toplevel mode a url parameter
2011-04-10 20:16:13 +02:00
Alexander Larsson
fe79bbd618
[broadway] Position non-popup windows ourselves
...
We ignore the initial positions for non-popup windows, instead we
place the windows ourselves (or in the useToplevel mode by the WM).
2011-04-10 20:16:13 +02:00
Alexander Larsson
e5d8905cd2
[broadway] Fix up toplevel content visibility in useToplevel mode
...
surfaces.canvas may change if we move to another document, so
reupdate the element to show after ensureSurfaceInDocument.
2011-04-10 20:16:13 +02:00
Alexander Larsson
fadaced85f
[broadway] Move window to top when moving
2011-04-10 20:16:13 +02:00
Alexander Larsson
618dc872b0
[broadway] Add some initial work for in-window frames
...
The css is based on work by Jasper St Pierre:
http://magcius.mecheye.net/vista/
2011-04-10 20:16:13 +02:00
Alexander Larsson
69eafcc3c5
[broadway] Fix some typos in the js code
2011-04-10 20:16:13 +02:00
Alexander Larsson
930e43c710
[broadway] Use the right doctype for html5
2011-04-10 20:16:13 +02:00
Alexander Larsson
955f01cdf7
[broadway] Enable useToplevelWindow by default for now
2011-04-07 21:16:52 +02:00
Alexander Larsson
7128087cb4
[broadway] Implement selections
2011-04-07 20:21:22 +02:00
Alexander Larsson
cad40b24e2
[broadway] Remove unused hashtables
2011-04-07 20:20:51 +02:00
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
Alexander Larsson
7d2ff79ddf
broadway: Fix some window coordinate reporting issues
2011-03-14 11:28:57 +01:00
Alexander Larsson
cf6bf44184
broadway: Remove debug code and fix whitespace issues
2011-03-14 11:21:37 +01:00
Alexander Larsson
c2ce462486
broadway: Add debug logging framework for js
2011-03-14 10:05:24 +01:00
Alexander Larsson
e2f8215751
broadway: Fix typo that broke window hiding
2011-03-14 09:51:54 +01:00
Alexander Larsson
6713fe9ca4
broadway: Get query_state window coords from browser side
2011-03-11 21:39:11 +01:00
Alexander Larsson
27848432c7
broadway: Split out getPositionsFromAbsCoord from getPositionsFromEvent
2011-03-11 21:28:39 +01:00
Alexander Larsson
54905a8986
broadway: Fix up a bunch of js style issues
2011-03-11 21:12:57 +01:00
Alexander Larsson
cc808ae063
broadway: Move event coordinate calculation to browser side
2011-03-11 21:10:23 +01:00
Alexander Larsson
0cefd54122
broadway: Implement pointer query_status
2011-03-11 14:56:31 +01:00
Alexander Larsson
614eb3b3d7
broadway: Add _gdk_broadway_display_block_for_input
2011-03-11 14:45:13 +01:00
Alexander Larsson
e08396450d
broadway: Break out websockets parsing and message processing
...
We need this to be able to correctly handle the recieve buffer
during message processing. Without the split we would be
recursing over the use of it.
2011-03-11 14:41:03 +01:00
Alexander Larsson
7c12e5f27e
broadway: Implement gdk_display_flush
2011-03-11 14:37:39 +01:00
Alexander Larsson
71aa55d291
broadway: Call device vfunc to get device state
...
We want only one place where we get device state.
2011-03-11 08:26:37 +01:00
Alexander Larsson
0fa32e98a4
broadway: Change input handling to use polling rather than async reads
...
We do this because we need to be able to switch to using sync reads
when we're doing a roundtripping call, and that is too complex
with the async code.
2011-03-10 21:22:19 +01:00
Alexander Larsson
d4e2414d4a
broadway: Add serial tracking and roundtripping
2011-03-10 14:58:47 +01:00
Alexander Larsson
3914d0af38
broadway: Clean up protocol message writing a bit
...
Centralize the header writing so we can extend it later.
Don't opencode the size of element when increasing p.
2011-03-10 13:59:30 +01:00
Alexander Larsson
d8f061ad42
[broadway] Update to new GDK backend APIs
2011-02-11 15:59:50 +01:00
Alexander Larsson
a3b227ff9e
[broadway] Remove unused grab_count from GdkBroadwayDisplay
...
We don't need this anymore since server grabs is now an x-only feature
2011-01-20 13:40:41 +01:00