Commit Graph

891 Commits

Author SHA1 Message Date
Robert Bragg
dcfaf4ec2d display: Adds wl_display_flush to send buffered commands
Previously for wayland clients to flush buffered connection data to the
compositor they needed to first register an event-mask-update-callback
via wl_display_get_fd() to determine if there is anything writeable
pending.  (NB: It's considered an error to iterate connection data with
an invalid mask)

Since it's only possible to register a single update callback currently
it's a bit awkward if you want to allow multiple orthogonal components
to flush the connection data, such as Cogl and Clutter which both want
to interact with wayland and may want to flush commands at different
times.

This adds a mechanism, wl_display_flush(), which makes it possible to
flush writeable connection data without first checking the event mask.
2011-05-10 13:07:06 -04:00
Benjamin Franzke
a77498d07c wayland-util: Drop unused struct wl_argument 2011-05-10 12:56:22 +02:00
jani.uusi-rantala@nokia.com
53200f05c7 Add configure option to disable scanner compilation
When cross-compiling Wayland, wayland-scanner should be picked up from
the host system instead of compiling and trying to run e.g. ARM
wayland-scanner on X86.

This patch adds --disable-scanner option for disabling the scanner
from the build and using existing wayland-scanner instead (from PATH)
which should help in most cross-compilation systems.

By default everything works as before.

Signed-off-by: Jani Uusi-Rantala <jani.uusi-rantala@nokia.com>
2011-05-06 17:35:23 -04:00
Benjamin Franzke
bd70dc185a Add a destroy_listener to wl_resource
Drop the one in wl_surface.
2011-05-06 15:39:59 -04:00
Benjamin Franzke
c861852536 connection: Define _GNU_SOURCE for F_DUPFD_CLOEXEC 2011-05-04 16:21:08 -04:00
Kristian Høgsberg
a9ac0eb249 scanner: Fail if there's a 'destroy' request not marked as a destructor 2011-05-04 15:51:47 -04:00
Kristian Høgsberg
c72ebf5df9 scanner: Initialize wl_message structs completely 2011-05-04 15:51:21 -04:00
Kristian Høgsberg
8600408ced connection: Handle fd passing in an CLOEXEC safe way 2011-05-04 12:35:16 -04:00
Kristian Høgsberg
92d61f13b9 mmap shm buffers read/write 2011-05-02 14:48:48 -04:00
Casey Dahlin
761af3ab0a Add some things related to wayland-scanner to .gitignore 2011-04-29 09:42:08 -04:00
Kristian Høgsberg
a0da7468f8 event-loop: Drop unused idle_list
Idle sources are now just a special case of a checked source.
2011-04-29 09:20:29 -04:00
Kristian Høgsberg
c964a5201e Don't define wl_shell in wayland-server.h 2011-04-22 17:54:18 -04:00
Kristian Høgsberg
6ae42181c0 event-loop: Idle callback are a special case of a checked source 2011-04-22 12:15:21 -04:00
Kristian Høgsberg
f8bb7f435b event-loop: Dont use a check callback just dispatch again
We pass the poll mask so the dispatch callback can know if there is
data on the fd or not.  The dispatch function must return true if
it dispatched something, in which case we need to do another round of
post-dispatch callbacks."
2011-04-22 12:06:36 -04:00
Benjamin Franzke
1c88cffa32 Add common shm-server code 2011-04-22 10:44:29 -04:00
Benjamin Franzke
3b2ce63015 Remove buffer.attach vfunc 2011-04-22 10:13:09 -04:00
Benjamin Franzke
0bf5285b44 Add buffer.damage request to the protocol
Thus remove the server-side used vfunc buffer::damage.
2011-04-22 10:11:12 -04:00
Kristian Høgsberg
589e581f76 event-loop: Add an optional post-dispatch source callout
This lets a source mark itself as ready to dispatch even though the fd
didn't trigger.   What can happen is that for the X11 socket, some other
source callback (the drm fd or a wayland client socket) can cause somebody
to do an X roundtrip (DRI2 get buffers, for example) and queue up events
in the xcb buffer.  When we get back to epoll, the X fd no longer polls
readable and we don't process those events until we get another X event.

The check callback is called after a round of dispatching and lets a source
check if it has data to dispatch and mark itself ready.  Next round of
dispatching will then process it immediately instead of blocking in
epoll_wait().
2011-04-21 14:46:12 -04:00
Kristian Høgsberg
13ca937944 Pass version number to global bind function 2011-04-20 17:19:56 -04:00
Kristian Høgsberg
c5ec478d46 scanner: Don't hardcode the wl_ prefix in the code generator 2011-04-20 17:19:52 -04:00
Kristian Høgsberg
7e4f44e2ba Use wl_client_post_global() for connect events 2011-04-18 10:24:50 -04:00
Kristian Høgsberg
320a5634cf Introduce display.bind to request events from a global 2011-04-18 10:24:45 -04:00
Kristian Høgsberg
a0010d8f82 Print line numbers in scanner errors 2011-04-13 16:50:02 -04:00
Kristian Høgsberg
06c2ebf6ec Move proxy prototype to wayland-client.h
Let's try to avoid to generate more code than we need to.
2011-04-13 16:27:06 -04:00
Jørgen Lind
f04e05ad76 Add lockfile to the socket
This uses flock to detect if there is a process that is active. If not
then it unlinks the socket file if it exists, so that bind won't fail
2011-04-13 10:42:27 -04:00
Kristian Høgsberg
4378a80b08 Merge remote-tracking branch 'bnf/surface-frame-event' 2011-04-11 16:40:48 -04:00
Kristian Høgsberg
7cfcdc610d Make all fds close-on-exec 2011-04-11 09:24:11 -04:00
Kristian Høgsberg
8f081748f9 Make wl_client_create() public 2011-04-11 09:15:09 -04:00
Kristian Høgsberg
4d33e802e0 Support passing the Wayland fd in the environment 2011-04-11 09:14:43 -04:00
Harald Fernengel
0b29a2fec7 Fix usage help text in wayland-scanner 2011-04-06 09:42:43 -04:00
Benjamin Franzke
94fcdde0e2 Extent frame event to be surface dependent 2011-03-16 23:01:39 +01:00
Iskren Chernev
21e877f3f6 Close signal file descriptor in event loop on remove and failure.
When the signal handler is removed the corresponding fd is closed. This
should automatically remove it from the epoll set.
2011-03-14 11:56:43 +02:00
Iskren Chernev
1081bca2a8 Close timer file descriptors in event loop on remove and failure.
When the timer is removed the corresponding fd is closed. This should
automatically remove it from the epoll set.
2011-03-14 11:55:06 +02:00
Iskren Chernev
61ce8749a7 Stored signal_number in event_source structure.
signal_number was not previously stored, so the callbacks didn't get
a correct signal_number as their first argument.
2011-03-14 11:49:42 +02:00
Iskren Chernev
0ae92f9706 Fix event loop timer update.
It can now handle delays greater than 2 seconds without overflowing.
2011-03-14 11:49:42 +02:00
Kristian Høgsberg
6d22c1bdc7 Fix double remove from surface destroy_listener_list
We remove the listener when a device loses its pointer focus, but
doesn't insert it in another destroy_listener list if surface is NULL.
When we set another pointer focus surface, we remove it again.
Tracked down and tested by Iskren Chernev.
2011-03-12 22:09:30 -05:00
Iskren Chernev
5acf6b4b03 Server socket creation error handling. 2011-03-12 22:07:41 -05:00
Iskren Chernev
ecbad0341e Added wl_connection_create failure checks. 2011-03-12 21:56:49 -05:00
Iskren Chernev
fcd4caa0df Better handling of creation errors in display. 2011-03-12 21:56:25 -05:00
Iskren Chernev
c9a729260f Better cleanup on display creation failure. 2011-03-12 21:56:13 -05:00
Kristian Høgsberg
9061f91eb8 Merge branch 'setup_display' of git://anongit.freedesktop.org/~bnf/wayland 2011-03-01 17:04:33 -05:00
Benjamin Franzke
b038d93abf protocol/wayland: Drop drm interface (move into mesa) 2011-02-28 11:20:56 +01:00
Rico Tzschichholz
8105d2873c Add wayland-scanner.mk to EXTRA_DIST for make distcheck 2011-02-25 08:43:14 -05:00
Kristian Høgsberg
9136e05ebd Only allow one listener per proxy 2011-02-18 15:28:54 -05:00
Liu, Xinyun
9a2015562c Several typo fixes in specs/main.tex 2011-02-18 08:40:49 -05:00
Kristian Høgsberg
fcfb4e30a4 Split into a core repository that only holds the core Wayland libraries 2011-02-14 22:21:13 -05:00
Kristian Høgsberg
525e4c0bea compositor: Clip repaint to the damage region
Drop glScissor, and just clip the surface against the repaint region and
render each rectangle in the resulting region.
2011-02-14 10:39:54 -05:00
Benjamin Franzke
feb370e4ea compositor-drm: Flush before pageflipping
This fixes compositor-drm flickering on r600.
2011-02-14 08:28:44 -05:00
Kristian Høgsberg
fa4e2a7676 compositor: Switch away from using VBOs and just stream the vertex data
We avoid changing uniforms for each window and it will be easier to break up
a surface into a series of rectangles.
2011-02-13 13:45:01 -05:00
Kristian Høgsberg
31bd6c7ab1 Use pixman regions to reduce repainting
For now, we just use glScissor and clip to the extent of the damage region,
but we can do even better by clipping the repaint to the region rectangles.
2011-02-13 13:26:39 -05:00