Adds appid for all clients using the toolkit, flower, fullscreen, image,
resizor, scaler, smoke, stacking, subsurfaces, terminal,
touch-calibrator, transformed, etc.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
It was discovered in issue #99 that the implementations of the 90 and 270
degree rotations were actually the inverse of what the Wayland specification
spelled out. This patch fixes the libweston implementation to follow the
specification.
As a result, the behaviour of the the weston.ini transform key also changes. To
force all users to re-think their configuration, the transform key values are
also changed. Since Weston and libweston change their behaviour, the handling
of clients' buffer transform changes too.
All the functions had their 90/270 cases simply swapped, probably due to
confusion of whether WL_OUTPUT_TRANSFORM_* refers to rotating the monitor or
the content.
Hint: a key to understanding weston_matrix_rotate_xy(m, c, s) is that the
rotation matrix is formed as
c -s
s c
that is, it's column-major. This fooled me at first.
Fixing window.c fixes weston-terminal and weston-transformed.
In simple-damage, window_get_transformed_ball() is fixed to follow the proper
transform definitions, but the fix to the viewport path in redraw() is purely
mechanical. The viewport path looks broken to me in the presence of any
transform, but it is not this patch's job to fix it.
Screen-share fix just repeats the general code fix pattern, I did not even try
to understand that bit.
https://gitlab.freedesktop.org/wayland/weston/issues/99
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
The printf() format specifier "%m" is a glibc extension to print
the string returned by strerror(errno). While supported by other
libraries (e.g. uClibc and musl), it is not widely portable.
In Weston code the format string is often passed to a logging
function that calls other syscalls before the conversion of "%m"
takes place. If one of such syscall modifies the value in errno,
the conversion of "%m" will incorrectly report the error string
corresponding to the new value of errno.
Remove all the occurrences of the specifier "%m" in Weston code
by using directly the string returned by strerror(errno).
While there, fix some minor indentation issue.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
In many clients of weston, Display was not being destroyed so added it.
Also destroy windows, widgets which were not being destroyed.
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
There was an issue recently in screen-share.c where config.h was not
being included, resulting in the wrong definition for off_t being used on
32 bit systems. I checked and I don't think this problem is happening
elsewhere, but to help avoid this sort of problem in the future, I went
through and made sure that config.h is included first whenever system
headers are included.
The config.h header should be included before any system headers, failing
to do this can result in the wrong type sizes being defined on certain
systems, e.g. off_t from sys/types.h
Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
In a few cases, we set a motion handler just to be able to set a fixed
cursor. This adds a default cursor helper that can be used in those cases.
In case of the 'transformed' test case, we also avoid a brief flicker
of the pointer cursor, which is set on enter when the move grab is lifted.
This new client, called transformed, renders a cross with the top part
red and the right green, with the same transform as the output the
surface is in.
This is based on simple-egl.
If simple-egl is toggled fullscreen, the opqaue region is set for the surface
but never removed after exiting fullscreen. This patch resets the opaque region
to 0 if the surface is not fullscreen and -o was not passed. This fixes the
problem introduced sometime since d7f282b84e, when this was last fixed.
If clients don't set a cursor, they get whatever the last cursor was
before the pointer entered their window. That's a little confusing, so
set a pointer on enter to avoid that. The down-side is that simple EGL
isn't very simple anymore.
https://bugs.freedesktop.org/show_bug.cgi?id=52452
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.
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>
Make wl_surface.set_opaque_region double-buffered as required by the new
protocol. Also, do not reset the opaque region on surface size changes
anymore. Only explicit requests from the client will change the region
now.
In clients, make sure commit happens after setting the opaque region.
Mesa does not need a fix, as it never touches the opaque region.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Since commit 6a615d2621 [1], the opaque
region would be set only when running fullscreen. Having it set
properly for the windowed case is helpful to test the overlay path in
compositor-drm.
What this patch does is:
- reverts the above commit;
- remove the "if fullscreen make the window opaque" conditional, that
should have been removed when -o was introduced and was actually the
cause for the bug solved in [1];
- sets the opaque region when running fullscreen, regardless of the -o
switch.
[1] commit 6a615d2621
Author: Scott Moreau <oreaus@gmail.com>
Date: Thu Aug 30 14:44:16 2012 -0600
simple-egl: Only set alpha_size=0 when -o is passed.
v2: - Clarify in the commit message that this does not regress the bug
solved in [1].
- Use the correct sha1 for the reverted commit.
After explaining the problem on irc, Pekka dictated this solution which works.
The problem is that simple-egl can hang when toggling fullscreen because of a
race where (quoting Pekka) "if it dispatches the frame callback simple-egl
itself requested before the Mesa's own frame callback came, simple-egl will go
to its redraw routing and call eglSwapBuffers so you end up effectively calling
eglSwapBuffers from within eglSwapBuffers, and deadlock". This patch avoids
redrawing (which calls eglSwapBuffers) when there is a pending frame callback.
When starting simple-egl with -f for fullscreen and toggling to 'windowed' mode with F11,
the surface is opaque instead of semi-trnasparent as it is when starting without -f. We
only want to create the surface with alpha_size=0 when the user explicitly passes -o
because otherwise it will never have the ability to use alpha.
Make simple-egl toggle the fullscreen state whenever the key F11 is
pressed. A sync callback is used to stop drawing while the surface has
not received the configure event, to prevent a buffer with the windowed
size to be attached to the surface after the set_fullscreen request.
wl_input_device has been both renamed and split. wl_seat is now a
virtual object representing a group of logically related input devices
with related focus.
It now only generates one event: to let clients know that it has new
capabilities. It takes requests which hand back objects for the
wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all
provide the old input interface, just under different names.
This commit tracks these changes in weston and the clients, as well as
similar renames (e.g. weston_input_device -> weston_seat). Some other
changes were necessary, e.g. renaming the name for the visible mouse
sprite from 'pointer' to 'cursor' so as to not conflict.
For simplicity, every seat is always exposed with all three interfaces,
although this will change as time goes on.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This makes the compositor and demo clients work on the current nouveau
nvfx driver. Obviously does not fix any clients that actually want a
depth buffer, but this does allow more people to at least try wayland.
Destroy all wl objects and call EGL cleanup functions. Reduces leaks
reported by Valgrind considerably, though not to zero.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Add signal handler for SIGINT to simple-egl and simple-shm, so they can
be exited voluntarily, without killing them. Later we can add clean-up
code and destructors, and check with valgrind for leaks and errors.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>