We now handle the client-side xdg_surface_set_minimized()
call, and eventually hide the target surface by moving it
to a dedicated layer.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
'close' is more consistent with the purpose of the event than
'delete', and it is also c++ friendly, since 'delete' is a keyword.
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
weston_log() seems to be the standard elsewhere in the codebase for
errors. These are the only two instances where perror() is used
instead, and their error messages aren't that informative anyway.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
This patch removes the extra modes parameter for the RDP compositor. And
make it support any mode that is requested (be aware that RDP client may not
support all possible modes, especially odd resolution).
This new version fixes remarks done by Jason Ekstrand. It also fixes
some missing spaces between if and (.
This allows to test the effect of setting only source rectangle or
destination size, in addition to setting both.
In weston-scaler -h output, add descriptions on what the result in each
mode should look like.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bump wl_scaler and wl_viewport versions to 2. Add new requests
wl_viewport.set_source and .set_destination, which are meant to replace
wl_viewport.set request.
Now a client can set and unset just one of source rectangle and
destination size. Define the semantics when one of these is unset.
Implement these semantics changes in compositor and pixman renderer.
GL-renderer does not need changes.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Remove the explicit boolean variable, and use illegal width to denote
"not set".
Split the boolean into two, so we can later start having buffer.src_*
and surface.* set or not set independently. This may become useful when
the wl_viewport interface is changed to allow modifying them separately.
At the moment, both buffer.src_width and surface.width conditions are
always in sync.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Queueing in the Presentation extension requires splitting the viewport
state into buffer state and surface state. To conveniently allow
assigning only one, the other, or both, reorganize the
weston_buffer_viewport structure.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Fix one left-over case that directly assigned
weston_surface::width,height, and so missed view dirtying.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
There is no need for weston_subsurface_commit_to_cache() to leave the
pending.buffer set. Reset it to NULL.
This makes pending.buffer always NULL if pending.newly_attached == 0.
IOW, pending.buffer cannot be non-NULL unless
pending.newly_attached == 1.
Therefore no need to check pending.buffer nor cached.buffer_ref.buffer
for the weston_surface_attach() calls.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Merge more code into a common function. No functional changes.
At every site where weston_surface_set_size_from_buffer() was called,
weston_surface_attach() was called first. Move all calls of
set_size_from_buffer into weston_surface_attach.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
With protocol of wl_output version 2, after the output change,
it should send done event to all clients bound to it.
Signed-off-by: Quanxian Wang <quanxian.wang@intel.com>
This provides an example of keeping a weston_surface alive after the client
destroys it. We install a destroy listener for the resource, so that we'll
be notifified when the client destroys it. Then we increase the weston_surface
refcount so that we keep the surface and initiate an animation. When
the animation finishes we can finally destroy the surface.
While disable by default, passing --enable-libinput-backend to
./configure switches the input backend in weston's drm, fbdev and rpi
compositing backends to use libinput instead of udev-seat.c, evdev.c and
friends.
When enabled, weston now also depends on libinput >= 0.1.0.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
The gbm-format configuration option can now be specified per-output as
well as in the core config section. If it is not specified it will
default to the format specified in the core section. The
EGL_MESA_configless_context extension is required for this to work. If
this extension is available it will create a context without an
EGLConfig and then it will potentially use a different EGLConfig for
each output.
The gl-renderer interface has been changed so that it takes the EGL
attributes and visual ID in the create_output function as well as in
the create function.
Part of the gl_renderer_setup function only deals with checking EGL
extensions and doesn't need to have a current context. This patch
moves these checks so that they are done during gl_renderer_create
instead of waiting until we have an output. We will need this in a
later patch because some of the EGL extensions will affect how we
create the EGLSurface.
Commit fa1b3055 introducted a regression in the pixman renderer. In
particular, it would not draw properly with any output transform other
than normal, 180, 180-flipped, or 270-flipped. This patch fixes this
regression. The weston-scalar program appears to work normally at all
rotations with this patch. Therefore, this patch should fix the regression
while maintaining the added functionality from fa1b3055.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Rather than require that the client implement two methods for every state,
simply have one global request, change_state, and one global event,
request_change_state.
Clients that need to be redrawn when the focus changes do that by
listening to focus_changed and scheduling a redraw.
This was causing unnecessary redraws in the clients, as could be
easily seen by changing focus on weston-flower.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
When a view was destroyed while we were on exposay, we didn't
remove it from the list of views, and so when leaving exposay
we were trying to animate (and sometimes activate) a
non-existent view, causing a crash.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Add description of key:shell to CORE SECTION and move a example of desktop-shell from key:modules to key:shell.
Add cms-colord.so to key:modules of CORE SECTION.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
We were calling exit(0) when tests were skipped, which counted
them as passed instead of skipped. Fix this by properly exiting
with 77 (which is what automake expects for skipped tests) from
the tests themselves, then returning 77 again from weston-test-runner
if all the tests were skipped. Finally the weston-test.so module
catches weston-test-runner's exit code and uses it as an exit code,
which is what automake will see and use.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Other backends can be used by passing BACKEND=some-backend.so, e.g.
$ make check BACKEND=x11-backend.so
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
That is the case when using the headless backend. In the future
we may be able to use the mesa null egl platform but for now let's
just skip it.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
The noop-renderer doesn't read buffer contents, which means bad
buffers go undetected. Thus, read the buffer contents just for
the purpose of triggering SIGBUS (and having the client killed).
Fixes the bad-buffer test when run against the headless backend.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
This lets the compositor know the size of the surface as calculated
in weston_surface_set_size_from_buffer(), and fixes a couple of
tests when using the headless backend.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>