Commit graph

2432 commits

Author SHA1 Message Date
Pekka Paalanen 16b41e442b Add informal notes file
By request on the wayland-devel mailing list, we could start collecting
useful writings here.

However, this is not meant to be a substitute to proper documentation,
though I understand it may very well become one. Better than nothing, I
guess, and hopefully helps in writing real documentation.

Feel free to add stuff.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-25 15:00:42 -04:00
Pekka Paalanen 9249f93057 compositor-drm: remove a stale comment
This comment became stale in:

commit 65a11e1039
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Fri Aug 3 11:30:18 2012 -0400

    compositor: Accumulate damage per plane

Now it is just misleading. Remove it.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-25 14:59:30 -04:00
Pekka Paalanen 9564c75163 desktop-shell: background should be opaque
Toytoolkit does not support setting opaqueness for anything else than
the immediate child widget of the frame widget. Backgrounds do not have
frames, so we need to poke it in manually.

This should allow Weston to paint the background without blending.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-25 14:59:23 -04:00
Pekka Paalanen fedc527723 window: remove window_set_transparent() declaration
The function is not implemented.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-25 14:59:08 -04:00
Pekka Paalanen 035a0323ef gles2: check eglBindWaylandDisplayWL return value
If the bind fails, do not bother pretending the EGL Wayland extension
is usable, and no need to unbind, either.

Print some important details about the GLESv2 renderer configuration
into the log.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-25 14:58:59 -04:00
Pekka Paalanen 9c3fe25b4d gles2: log EGL config info
Interesting in new environments.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-25 14:57:17 -04:00
Kristian Høgsberg 00fbbe6b60 compositor: Clip pointer coordinates on pointer enter as well
When tiling window managers resize a non-resizable window they're violating
ICCCM.  Not some hippie-community standard like EWMH, but ICCCM, which is
about as old and sacred as the constitution.  If they want to force a window
to be a size it wasn't designed for, at least they could have the decency to
reparent the client window into a bigger containing window of whatever size
they think it should be.  But apparently ICCCM compliance is too much to ask.

Anyway, all that just to say that it's really not our fault when we get an
enter event with coordinates outside the valid output region.  But we'll
clip it anyway and work around mis-behaving tiling WMs.
2012-10-24 09:54:42 -04:00
Kristian Høgsberg 42470cfc49 configure.ac: Bump version to 1.0.0 2012-10-22 18:50:03 -04:00
Kristian Høgsberg 128ee2c342 test-client: Make sure we process pending eevents before we verify state
Since the send-button-state request comes in on one socket and the
wayland event we're looking for comes in on another socket, the order
that we process the two in is undefined.  Thus, button-test fails
intermittently, depending on which event we process first.

We change wl_display_flush() to wl_display_roundtrip(), to make sure that
we deal with all wayland events before handling test protocol requests.
2012-10-21 22:30:26 -04:00
Kristian Høgsberg 1d1e0a5ffa compositor-drm: Disable hw cursor if allocation fails
Instead of crashing later, we can just fall back to gl rendered cursors.
2012-10-21 13:29:26 -04:00
Kristian Høgsberg 8c31a4c025 Define our own container_of as well
Don't rely on libwayland-client/server to define this for us.
2012-10-19 23:05:37 -04:00
Kristian Høgsberg 5717b6dbf1 Stop relying on ARRAY_LENGTH being defined in wayland-util.h
Time to break a bad habit.
2012-10-19 17:12:38 -04:00
Jonas Ådahl f461eee2b0 window: Always pass focused widget to widget motion handlers
Grabbed widgets should always receive motion events as if it was the
widget that would receive it if no grab was active. This means that the
focused widget should always be passed as the widget argument to widget
motion handlers.

This reverts commit 8c9c8fcf6e.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-19 16:56:08 -04:00
Jonas Ådahl f82eda5247 window: Don't set pointer image when requesting to move a surface
Since it's the server who moves the surface it's the server who sets the
pointer image.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-19 16:54:42 -04:00
Ander Conselvan de Oliveira d0f24cf6ec simple-shm: Don't use ret variable in main() uninitialized 2012-10-17 16:51:07 -04:00
Kristian Høgsberg 3146756adf clients: Don't ask for EGL_PIXMAP_BIT when choosing configs 2012-10-16 15:31:31 -04:00
Kristian Høgsberg a17f7a13fd clients: Check return value of wl_display_dispatch()
The simple clients all just call wl_display_dispatch() in a while loop
without checking the return value.  Now, if the server dies or other
error occurs, we get a -1 return value instead and need to break the loop.
2012-10-16 13:17:16 -04:00
John Kåre Alsaker 7a92ea494c util: Check result of weston_surface_animation_run. 2012-10-16 11:51:53 -04:00
John Kåre Alsaker 5e48a85e6b compositor-x11: Fix a memory leak. 2012-10-16 11:50:05 -04:00
John Kåre Alsaker e2e3d07beb compositor: Check if surface creation failed in weston_compositor_fade. 2012-10-16 11:39:09 -04:00
John Kåre Alsaker 143a898fcc compositor-x11: Clean up event handling. 2012-10-16 11:31:45 -04:00
John Kåre Alsaker 011a1ce350 Remove some dead code. 2012-10-16 11:29:10 -04:00
John Kåre Alsaker 5b90d8f374 weston-launch: Check result of pam_start. 2012-10-16 11:26:00 -04:00
Pekka Paalanen 379d3d140d configure: build tablet-shell client conditionally
Do not build the tablet-shell client if --disable-tablet-shell is given.

Change --enable-tablet-shell to --disable-tablet-shell in ./configure
--help output, since it is enabled by default. Add a description.

Use proper quoting in the conditional.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-16 10:49:08 -04:00
Pekka Paalanen 392c5f275d simple-touch: do not include GL headers
since it doesn't use any of them. Fixes a build failure on systems,
where (E)GL headers are in non-standard path.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-16 10:48:55 -04:00
Pekka Paalanen 5f8a67cce8 configure: separate simple EGL clients from others
Separate simple EGL clients from other simple clients. This allows to
build either simple-shm or simple-egl, whichever you want. We avoid
linking libEGL and GLESv2 into simple-shm, and we can build simple-shm
even if nothing provides EGL, GLESv2, or wayland-egl APIs.

Change the options in configure --help from --enable to --disable, since
these are enabled by default, and you would normally only ever give the
--disable flavor. Add descriptions.

Remove the #define BUILD_SIMPLE_CLIENTS since it is not used.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-16 10:48:19 -04:00
Pekka Paalanen fb39d8d23c toytoolkit: make all EGL code dependant on cairo-egl
configure.ac: The toytoolkit clients used to get libEGL linked to them
even if there was no cairo-egl. This is useless, and actually harmful on
platforms, where libEGL absolutely requires one of the GL ES libraries
to be linked in, too.

Look for EGL-related packages only for cairo-egl with toytoolkit.

window.c: protect all GL header includes with HAVE_CAIRO_EGL, since that
is the only case we can support EGL, GL, or GLESv2 at all. In the case
we do not have cairo-egl, add enough definitions to let us build the
stubs for EGL-related functions.

Remove some #ifdefs that were inside of the same #ifdef already.

These changes allow to build sorfware rendering toytoolkit clients
without any bits of EGL libs or headers.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-16 10:47:22 -04:00
Pekka Paalanen de7fe62a54 configure: fix --without-cairo-glesv2
Make it do what you would think it does, instead of enabling GLESv2.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-16 10:46:52 -04:00
Pekka Paalanen e46289795f configure: tell why cairo-egl could not be used
Otherwise the user has no indication which package is missing for
CAIRO_EGL, and has to dig into config.log for it.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-16 10:46:32 -04:00
Pekka Paalanen 53e58485a5 window: remove dead EGL code
- remove unimplemented function from header
- remove the egl function pointers that were not used

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-16 10:46:15 -04:00
Jonas Ådahl b984e40c28 evdev: Update axis notifications to follow protocol
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-16 10:33:03 -04:00
Kristian Høgsberg f255690e54 configure.ac: Bump version to 0.99.0 2012-10-15 21:49:23 -04:00
Kristian Høgsberg 5ca8728ece Make distcheck pass 2012-10-15 21:10:10 -04:00
Matt Roper 47c1b98292 compositor: Call into grab handler for touch events
Rather than delivering touch events directly to clients, we'll now
call through the touch grab handler.  The default handler (in
wayland-server) will deliver these events the same way they worked
before.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2012-10-15 20:54:43 -04:00
Kristian Høgsberg 3fb613effe window: Set input region also when we go fullscreen
We used to rely on the compositor resetting this as a side effect of
changing size, but it doesn't work like that any more.
2012-10-15 20:54:43 -04:00
Jonas Ådahl 972d506de3 clients: image: Add support for panning and zooming
Support for zooming by using ctrl + the vertical axis (scrolling upwards
zooms in) and panning by both the horizontal and vertical axis as well
as click and drag was added to demonstrate how axis should work.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-15 20:54:43 -04:00
Jonas Ådahl d9f6b078b6 window: Update modifier state directly after receiving a modifier event
If the keyboard modifier event was received after the key event the
modifier state would end up incorrect.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-15 20:54:43 -04:00
Jonas Ådahl d9f5819e8f evdev-touchpad: Implement two finger scroll
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-15 20:54:43 -04:00
Jonas Ådahl b0b87baf7c shell: Update bindings to conform to pointer axis protocol
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-15 20:54:43 -04:00
Jonas Ådahl 62efe20cb9 compositor-x11: Update axis notifications to follow protocol
Axis events are in the same coordinate space as motion events, thus
measured in pixels. To emulate axis events for discrete events move the
axis by a number of pixels every step.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-15 20:54:43 -04:00
Jonas Ådahl 87b0735273 evdev-touchpad: Add a finite-state machine
The finite-state machine is so far used to implement support for tapping
and dragging.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-15 20:54:43 -04:00
Jonas Ådahl c689493b1a evdev-touchpad: Cleanup and refactoring
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-10-15 20:54:43 -04:00
Pekka Paalanen b2f957a9f1 window: don't call output configure uninitialised
Callbacks registered via display_set_output_configure_handler() are
promised to be called when we know the current mode for the output. If
the following order of events happens:
1. toytoolkit binds to a wl_output global
2. application registers an output configure handler
3. the wl_output.mode events are received

Then in step 2 we would call the callback with uninitialised output
informations, giving it a 0x0 size.

To avoid such race, do not call the callback from
display_set_output_configure_handler() if the output has 0x0 size.

The wl_output.mode event will be received later, and that will trigger
the right call to the callback.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-15 20:54:43 -04:00
Kristian Høgsberg feb3c1d33b clients: Use wl_display_dispatch_pending() 2012-10-15 20:54:43 -04:00
Kristian Høgsberg d1ecb284ba tests: Update tests to new APIs 2012-10-11 10:07:31 -04:00
Ander Conselvan de Oliveira 5fd5580c88 compositor: Unmap drag icon surface when its released
libwayland-server was changed to emit the new drag icon signal instead
of faking an attach event with a NULL buffer so this has to be done on
this side.
2012-10-11 09:47:50 -04:00
Pekka Paalanen 8ec4ab64f0 compositor: fix event-test
event-test assumes, that even without the very first wl_surface.attach
(and commit), the surface will have infinite (previously undef) input
region. event-test simply has test-client to create a wl_surface, and
then it forcefully sets its position and size, and assumes the input
region is now the full surface, so that notify_motion() will hit it.

Change Weston to initialize the input region to infinite, instead of
empty.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-10 21:39:23 -04:00
Pekka Paalanen bc10638cd9 compositor, clients: apply wl_surface.frame on commit
Apply wl_surface.frame request only on the next wl_surface.commit
according to the new protocol.

This makes it explicit, which repaint actually triggered the frame
callback, since commit schedules a repaint. Otherwise, something causing
a repaint before a commit could trigger the frame callback too early.

Ensure all demo clients send commit after wl_surface.frame. Note, that
GL apps rely on eglSwapBuffers() sending commit. In toytoolkit, it is
assumed that window_flush() always does a commit.

compositor-wayland assumes renderer->repaint_output does a commit.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-10 21:39:11 -04:00
Pekka Paalanen 6c71ee1ba2 compositor: fix surface pointer cast
In weston, the wl_resource:data field for a wl_surface object always
contains struct weston_surface *, never struct wl_surface *.

Even though this is just a cosmetic fix, it should reduce confusion.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-10 21:39:00 -04:00
Pekka Paalanen b89b004e57 shell: do not double-init input region
weston_surface_create() already inits the input region.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-10-10 21:38:52 -04:00