Domenico Tortorella
43bddd205b
BroadwayServer support for unix socket listening
...
At the present time broadway listens only for TCP/IP incoming
display connections. This patch implements the support for listening
on unix domain sockets too, adding the broadway_server_on_unix_socket_new()
constructor and the commandline option --unixsocket [path] to broadwayd.
https://bugzilla.gnome.org/show_bug.cgi?id=734420
2014-08-14 20:24:10 -04:00
Jasper St. Pierre
58715796d2
gdkwindow: Provide a default implementation of process_updates_recurse
...
As a quick code cleanup.
2014-06-22 10:20:50 -04:00
Jasper St. Pierre
a1fb252eba
gdkwindow-broadway: Move the dirty flag setting to end_paint
...
This is where it belongs -- process_updates_recurse is the wrong place
for it.
2014-06-22 10:20:50 -04:00
Jasper St. Pierre
0dfd506b3c
gdkwidow: Make queue_antiexpose optional
2014-06-21 18:45:41 -04:00
Jasper St. Pierre
c767d504c5
gdkwindow: Don't bother with a return parameter for queue_antiexpose
...
Standard refcounting works perfectly well. Don't give us the opportunity
for more memory leaks.
2014-06-21 18:45:39 -04:00
Jasper St. Pierre
dcef61ac44
gdkwindow-broadway: Squash memory leak
...
We don't need to hang on to the update_area.
2014-06-21 18:45:39 -04:00
Jasper St. Pierre
bb7bf07af6
gdkwindow-broadway: Make queue_antiexpose implementation private
2014-06-21 18:45:38 -04:00
Jasper St. Pierre
d48adf9cee
gdkwindow: Remove the internal cairo_surface used for out-of-band painting
...
Traditionally, the way painting was done in GTK+ was with the
"expose-event" handler, where you'd use GDK methods to do drawing on
your surface. In GTK+ 2.24, we added cairo support with gdk_cairo_create,
so you could paint your graphics with cairo.
Since then, we've added client-side windows, double buffering, the paint
clock, and various other enhancements, and the modern way to do drawing
is to connect to the "draw" signal on GtkWidget, which hands you a
cairo_t. To do double-buffering, the cairo_t we hand you is actually on
a secret surface, not the actual backing store of the window, and when
the draw handler completes we blit it into the main backing store
atomically.
The code to do this is with the APIs gdk_window_begin_paint_region,
which creates the temporary surface, and gdk_window_end_paint which
blits it back into the backing store. GTK+'s implementation of the
"draw" signal uses these APIs.
We've always sort-of supported people calling gdk_cairo_create
"outside" of a begin_paint / end_paint like old times, but then you're
not getting the benefit of double-buffering, and it's harder for GDK to
optimize.
Additionally, newer backends like Mir and Wayland can't actually support
this model, since they're based on double-buffering and swapping buffers
at various points in time. If we hand you a random cairo_t, we have no
idea when is a good time to swap.
Remove support for this.
This is technically a GDK API break: a warning is added in cases where
gdk_cairo_create is called outside of a paint cycle, and the returned
surface is a dummy that won't ever be composited back onto the main
surface. Testing with complex applications like Ardour didn't produce
any warnings.
2014-06-20 20:41:54 -04:00
Antoine Jacoutot
be9d1e0b3b
broadway backend: allow building on OpenBSD
...
On OpenBSD shm_open(3) is part of libc and there is not librt, so add an
according check.
Check if we have posix_fallocate before using it.
https://bugzilla.gnome.org/show_bug.cgi?id=728272
2014-04-18 18:20:34 +02:00
Bastien Nocera
f71f7215ab
all: Name more idles and timeouts
...
Following up from 438cd857c4
,
name more timeouts and idles.
The original grep was missing checking for gdk_threads_add_*()
functions (at least for some of the files).
https://bugzilla.gnome.org/show_bug.cgi?id=726870
2014-03-26 20:09:30 -04:00
Pierre-Eric Pelloux-Prayer
ad39298f6d
broadway: make sure color/delta run length do not overflow
...
Fixes bug 723045.
2014-03-21 21:45:04 +01:00
Jasper St. Pierre
efdd68b3b0
Implement get_root_origin generically for all backends
...
It seems that some backends implemented get_root_origin wrong
and returned the client window coordinates, not the frame window
coordinates. Since it's possible to implement generically for all
windows, let's do that instead of having a separate impl vfunc.
2014-03-17 15:51:46 -04:00
Ryan Lortie
ff0c470e34
broadway: remove unused libcrypt
...
eb1ab0dac2
removed support for authentication
based on crypt()-hashed passwords but it didn't remove the header.
Finish up with the removal.
This allows the broadway backend to build on FreeBSD (which has no
crypt.h).
https://bugzilla.gnome.org/show_bug.cgi?id=726149
2014-03-12 00:17:09 -04:00
Benjamin Otte
32a420b7d6
broadway: Print a useful error message
...
.. instead of the generic "failed to open display".
2014-03-05 21:03:36 +01:00
Jasper St. Pierre
b922e0e213
Remove the return value of GdkWindowImpl::get_root_coords
...
It's unused by callers, and the historical return values are
undocumented, so just remove it now.
2014-02-27 21:06:35 -05:00
Giovanni Campagna
ad2f96ff48
Gdk: fix wrong user_data handling in resize_cairo_surface()
...
Instead of destroying the surface in the backend if this is
unable to resize, let the core code do it, and do it properly.
Based on a patch by Benjamin Otte.
https://bugzilla.gnome.org/show_bug.cgi?id=725172
2014-02-26 00:04:41 +01:00
William Jon McCann
e34bd4137d
docs: use apostrophes in *n't
2014-02-07 13:32:47 -05: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
4e8fa55827
broadway: Support window resize/drag via touch
2013-11-12 16:45:14 +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
e331d17626
broadway: Raise window on first click.
2013-11-12 12:36:05 +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
Owen W. Taylor
f50a3af1b7
Handle recursion from motion event handlers
...
If a motion event handler (or other handler running from the flush-events
phase of the frame clock) recursed the main loop then flushing wouldn't
complete until after the recursed main loop returned, and various aspects
of the state would get out of sync.
To fix this, change flushing of the event queue to simply mark events as
ready to flush, and let normal event delivery handle the rest.
https://bugzilla.gnome.org/show_bug.cgi?id=705176
2013-11-11 23:17:14 -05: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
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
Alexander Larsson
cbc324d846
[broadway] Prefix internal functions with broadway
2011-01-20 13:40:34 +01:00
Alexander Larsson
2c0012b76b
[broadway] Remove gdk_set_locale
2011-01-20 13:19:01 +01:00
Alexander Larsson
549610a8dd
[broadway] Remove unused input window stuff
2011-01-20 13:18:15 +01:00
Alexander Larsson
60c2b80bf0
[broadway] Remove all leftover _gdk_windowing_ functions
2011-01-20 13:12:26 +01:00
Alexander Larsson
07db0e38b0
[broadway] Make broadway build with new gdk-backend setup
...
Convert all global functions to vtable calls, etc.
2011-01-19 19:52:51 +01:00
Alexander Larsson
190f533258
[broadway] Remove unnecessary backend-specific function
...
These were just blindly copied from the X backend
2010-12-04 22:59:04 +01:00
Alexander Larsson
7dbbc54370
[broadway] Remove unneeded _gdk_window_impl_get_type call
2010-12-04 22:54:45 +01:00
Alexander Larsson
895922569e
[broadway] Update to the new drawable-less APIs
2010-12-04 22:31:28 +01:00
Alexander Larsson
80f332308f
[broadway] Add initial keyboard event support
2010-11-25 22:09:34 +01:00
Alexander Larsson
4aac045a30
[broadway] Don't return undefined counts in keymap calls
2010-11-25 22:09:34 +01:00
Alexander Larsson
667d23aa7c
[broadway] Hook mousewheel scrolling
2010-11-25 22:09:33 +01:00
Alexander Larsson
d6029949e6
[broadway] Disable context menu so rmb works
2010-11-25 22:09:33 +01:00
Alexander Larsson
4004882b92
[broadway] Only change window positioning for toplevels not e.g. menus
2010-11-25 22:09:33 +01:00
Alexander Larsson
c1a35afa5f
[broadway] Don't have mouse_in_toplevel point to hidden or destroyed window
2010-11-25 22:09:33 +01:00
Alexander Larsson
0b6265b76a
[broadway] Only allow one input session
2010-11-25 22:09:33 +01:00
Alexander Larsson
a4fc901c07
[broadway] Handle errors in input nicer
...
Also, fix a leak
2010-11-25 22:09:33 +01:00
Alexander Larsson
9cc073803f
[broadway] Only open one websocket for input!
2010-11-25 22:09:33 +01:00
Alexander Larsson
e7169f75e6
Move send_error up
2010-11-25 22:09:33 +01:00
Alexander Larsson
1b3efb3599
Save current input request
2010-11-25 22:09:33 +01:00
Alexander Larsson
1ba38a48d7
[broadway] Remove old unused declarations
2010-11-25 22:09:33 +01:00
Alexander Larsson
7667ad456b
[broadway] Avoid crash if mask is NULL
2010-11-25 22:09:33 +01:00
Alexander Larsson
b23fd41449
[broadway] Fix warning
2010-11-25 22:09:33 +01:00
Alexander Larsson
ccab600fb4
Move event generation to gdkeventsource.c
2010-11-25 22:09:33 +01:00
Alexander Larsson
0539303dfc
Handle output errors correctly
2010-11-25 22:09:33 +01:00
Alexander Larsson
0ca5a1a574
[broadway] Track errors in BroadwayOutput
2010-11-25 22:09:33 +01:00
Alexander Larsson
ce5cccf0ab
[broadway] Fix typo in assignment
2010-11-25 22:09:33 +01:00
Alexander Larsson
e8117544a0
[broadway] Convert broadway.c to use glib stuff
2010-11-25 22:09:33 +01:00
Alexander Larsson
fcce2986ce
[broadway] Keep track of the GSocketConnection for the output
2010-11-25 22:09:32 +01:00
Alexander Larsson
f407b4a5f5
Rename BroadwayClient to BroadwayOutput
2010-11-25 22:09:32 +01:00
Alexander Larsson
5a9f7a1e35
[broadway] Fix warning in demo
2010-11-25 22:09:32 +01:00
Alexander Larsson
1bc7bc5542
[broadway] Initialize masks to zero everywhere to avoid valgrind warnings
2010-11-25 22:09:32 +01:00
Alexander Larsson
77907fec79
Move global window list to per-display
2010-11-25 22:09:32 +01:00
Alexander Larsson
08a180a699
[broadway] Hack up window placement for demo
2010-11-25 22:09:32 +01:00
Alexander Larsson
b82ed84709
[broadway] Implement window resize
2010-11-25 22:09:32 +01:00
Alexander Larsson
65f767a363
[broadway] NULL out ref_surface on resize too
2010-11-25 22:09:32 +01:00
Alexander Larsson
2e1f6e09e5
[broadway] Add some fuzz to rectangle scanner
...
We don't want a bazillion tiny rectangles, so add some fuzz
to the rectangle scanners so we get less but larger rectangles.
2010-11-25 22:09:32 +01:00
Alexander Larsson
5ec2531e9b
[broadway] Switch autocrop to smarter rectangle search
2010-11-25 22:09:32 +01:00
Alexander Larsson
e88a18e0ea
[broadway] Add realloc wrapper
2010-11-25 22:09:32 +01:00
Alexander Larsson
d0e403c54d
[broadway] Fix up scrolling
2010-11-25 22:09:32 +01:00
Alexander Larsson
bed0ccba9d
[broadway] Handle window moves
2010-11-25 22:09:32 +01:00
Alexander Larsson
ec4a6c4a5f
[broadway] Implement _gdk_windowing_window_at_device_position
2010-11-25 22:09:31 +01:00
Alexander Larsson
93fec05183
[broadway] Track last mouse position
2010-11-25 22:09:30 +01:00
Alexander Larsson
e64a38eeef
[broadway] Fix x/y mismatch in canvas position
2010-11-25 22:09:30 +01:00
Alexander Larsson
5a49bfe96a
Fix some type warnings
2010-11-25 22:09:30 +01:00
Alexander Larsson
e6c340519c
[broadway] Send diffs as bilevel rgba instead of true diff
...
The true diff only works if the destination keeps perfect 32bit
canvas data, which is not always true. So, instead we send only
changed pixels, masking the others to 0 via alpha 0.
2010-11-25 22:09:30 +01:00
Alexander Larsson
6fe849d4f1
[broadway] Send and use canvas ids in events
2010-11-25 22:09:30 +01:00
Alexander Larsson
d211d78eef
[broadway] Track window<->id mapping
2010-11-25 22:09:30 +01:00
Alexander Larsson
cdd274a55c
[broadway] Missed a place to use event time
2010-11-25 22:09:30 +01:00
Alexander Larsson
8f9c6eb1a9
[broadway] clean up input sending js
2010-11-25 22:09:30 +01:00
Alexander Larsson
65d4edbd5b
[broadway] Send event timestamps from client
2010-11-25 22:09:30 +01:00
Alexander Larsson
2e8f21cb1b
[broadway] Allow loading client.html as "/" only
2010-11-25 22:09:30 +01:00
Alexander Larsson
2ee6dbd998
Remove unneeded copy of region
2010-11-25 22:09:30 +01:00
Alexander Larsson
163a278d13
Fix button numbers in events (starts with 1, not 0)
2010-11-25 22:09:30 +01:00
Alexander Larsson
884527a958
[broadway] Initial work on mouse events
2010-11-25 22:09:30 +01:00
Alexander Larsson
ee6b07bf15
[broadway] remove some spew
2010-11-25 22:09:29 +01:00
Alexander Larsson
95df67f47b
[broadway] don't sync the root window
2010-11-25 22:09:29 +01:00
Alexander Larsson
0a20ab58fa
[brodway] Don't send 0x0 deltas, they confuse the client
2010-11-25 22:09:29 +01:00
Alexander Larsson
1e3dffeee9
Send mouse events from js
2010-11-25 22:09:29 +01:00
Alexander Larsson
852b317b4f
Initial sketch of websockets support
2010-11-25 22:09:29 +01:00
Alexander Larsson
f11a7d2fde
Don't put output on stdin, instead do it on http connection
2010-11-25 22:09:29 +01:00
Alexander Larsson
8a0429b42d
Flesh out http server to handle client.html and broadway.js
2010-11-25 22:09:29 +01:00
Alexander Larsson
b07ead64ed
Add makerules to turn client.html and broadway.js into #include files
2010-11-25 22:09:29 +01:00
Alexander Larsson
ded9bc698b
Add initial http server
2010-11-25 22:09:29 +01:00
Alexander Larsson
0b85341737
Add broadway javascript and html part
2010-11-25 22:09:29 +01:00
Alexander Larsson
6651eab293
[broadway] Initial hookup of broadway client
2010-11-25 22:09:29 +01:00
Alexander Larsson
cb056e3738
[broadway] Fix up nvisuals handling
2010-11-25 22:09:29 +01:00
Alexander Larsson
db288f3233
[broadway] Ensure gdk_ref_cairo_surface object can be destroyed
...
If we return a direct ref that is not possible, since we own a ref to it.
This is problematic as the gdkwindow.c code uses destruction to track
outstanding surfaces.
We fix this by returning a subsurface.
2010-11-25 22:09:29 +01:00
Alexander Larsson
f02b7c9ed2
[broadway] Copy regions on last_surface during translations too
...
This will help make scrolling more efficient
2010-11-25 22:09:29 +01:00
Alexander Larsson
60cf2d53eb
Track last_surface properly
2010-11-25 22:09:29 +01:00
Alexander Larsson
7f0e43c0fd
[broadway] Import broadway lib
...
We put this in gtk+ for now since it will be synced initially, but
it avoids using glib so that it can be used lower in the stack if
required (e.g. in cairo later).
2010-11-25 22:09:29 +01:00
Alexander Larsson
d707d057c2
[broadway] Rename X11 -> Broadway in all code
...
This just runs:
for i in *.[ch]; do
sed -i s/DisplayX11/DisplayBroadway/g $i;
sed -i s/PrivateX11/PrivateBroadway/g $i;
sed -i s/ImplX11/ImplBroadway/g $i;
sed -i s/KeymapX11/KeymapBroadway/g $i;
sed -i s/ScreenX11/ScreenBroadway/g $i;
sed -i s/GdkX11Monitor/GdkBroadwayMonitor/g $i;
sed -i s/_X11/_BROADWAY/g $i;
sed -i s/x11/broadway/g $i;
done
2010-11-25 22:09:29 +01:00
Alexander Larsson
ce6ae54607
[broadway] Send MAP/UNMAP events for impl windows
2010-11-25 22:09:29 +01:00
Alexander Larsson
2ecaeb149f
[broadway] Implement window translation
2010-11-25 22:09:28 +01:00
Alexander Larsson
73f9c0cc00
[broadway] Track dirty windows
2010-11-25 22:09:28 +01:00
Alexander Larsson
85515b7775
[broadway] Keep track of all (toplevel) windows
2010-11-25 22:09:28 +01:00
Alexander Larsson
c456e98880
Remove X use from broadway backend
2010-11-25 22:09:28 +01:00
Alexander Larsson
dffa6e0da7
Remove X based dnd
2010-11-25 22:09:28 +01:00
Alexander Larsson
a54e556ad8
Remove event translators
2010-11-25 22:09:28 +01:00
Alexander Larsson
5b480e1b0d
[broadway] Copy X backend to broadway
2010-11-25 22:09:19 +01:00