Pekka Paalanen [Thu, 21 Nov 2013 14:47:02 +0000 (16:47 +0200)]
tests: add a test causing SIGBUS to the compositor
This tests the wl_shm buffer access wrappers, that are supposed to catch
the invalid accesses to a memory-mapped file beyond EOF.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Emilio Pozuelo Monfort [Wed, 20 Nov 2013 12:22:30 +0000 (13:22 +0100)]
man: document new focus-animation config entry
Emilio Pozuelo Monfort [Wed, 20 Nov 2013 12:22:29 +0000 (13:22 +0100)]
shell: add a client config entry
David Herrmann [Thu, 21 Nov 2013 08:14:46 +0000 (09:14 +0100)]
logind: change to -1+errno
Set errno and return -1 in public API calls like all other weston code
does. Most systemd+dbus calls return negative error-codes instead of -1
and setting errno. Thus, we need to explicitly set errno before returning.
Also note that we must set errno _after_ the cleanup path. Calling
functions like close() in the cleanup path might overwrite errno (which is
not what we want). So protect errno until the final return -1;
Kristian Høgsberg [Thu, 21 Nov 2013 00:37:07 +0000 (16:37 -0800)]
logind: Use dbus_bool_t for bool types in dbus calls
The gcc built-in 'bool' type is not the same size as dbus_bool_t, which is
an uint32_t. Passing a pointer to bool where dbus expects a uint32_t *
doesn't work.
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Giulio Camuffo [Wed, 20 Nov 2013 17:00:24 +0000 (18:00 +0100)]
input: set the focus to NULL when the focus's resource is destroyed
with the surface ref-count feature a surface may live on after its
resource was destroyed. so listen for the resource destroy signal
and set the focus to NULL.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Kristian Høgsberg [Wed, 20 Nov 2013 21:54:00 +0000 (13:54 -0800)]
weston-info: Handle shm formats better
Use a switch for this and don't fall back to XRGB8888 if we don't
recognize the format.
Jason Ekstrand [Sun, 10 Nov 2013 23:26:28 +0000 (17:26 -0600)]
Update the weston man page to include the new Wayland backend options
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Fri, 15 Nov 2013 02:52:35 +0000 (20:52 -0600)]
compositor-drm: Release the correct buffer in drm_output_release_fb
Jason Ekstrand [Fri, 15 Nov 2013 02:06:16 +0000 (20:06 -0600)]
input: Fix a segfault in focus checking
Without this, weston will segfault whenever the focus is a non-client
surface such as the black surface in fullscreen.
Ander Conselvan de Oliveira [Tue, 19 Nov 2013 13:22:05 +0000 (15:22 +0200)]
gl-renderer: Attach buffer during surface state creation if possible
When a renderer switch happens, it is possible that when the surface
state is created, a buffer for the given surface is already available.
In that case, run the attach routine so that the pixel contents are
properly set. Otherwise, it would only be set when a new attach request
is made for that surface.
Also, change the drm backend so that it keeps the buffer reference in
the weston_surface when running with the pixman renderer. The pixman
renderer keeps a reference to it anyway, so it is never released
early.
This makes the renderer transition seamless, without leaving a black
screen as before.
Ander Conselvan de Oliveira [Tue, 19 Nov 2013 13:22:04 +0000 (15:22 +0200)]
compositor-drm: Add key binding to switch from pixman to GL renderer
When running with the pixman renderer, the debug binding 'W'
(mod-shift-space W) will cause the compositor to load gl-renderer.so
and start using it instead of the pixman renderer.
Pekka Paalanen [Tue, 19 Nov 2013 12:03:35 +0000 (14:03 +0200)]
compositor: fix sub-surface view stacking order
If you opened a window with sub-surfaces, and then raised another window
on top of that, the underlaying window's main surface was stacked
properly, but the sub-surfaces remained on top of the raised window.
IOW, the raised window was in between the other window and its
sub-surfaces.
This got broken in
a7af70436b7dccfacd736626d6719b3e751fd985, "Split the
geometry information from weston_surface out into weston_view".
Fix the issues:
In view_list_add_subsurface_view(), the views need to be added to the
end of the list, not to the head. This alone fixes the above problem,
but causes the sub-surface views to be stacked irrespective of their
surface stacking order. The stacking order in this test case is fixed by
the changes to view_list_add(), but for sub-sub-surfaces a similar
change is needed in view_list_add_subsurface_view() too.
In view_list_add(), build the view list in the sub-surface stacking
order, instead of pulling the parent surface always on top. Also handle
the case, when the subsurface_list is completely empty: the parent
surface's view must still be added.
Reported-by: Julien Isorce <julien.isorce@collabora.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Emilio Pozuelo Monfort [Tue, 19 Nov 2013 11:14:53 +0000 (12:14 +0100)]
exposay: move the pointer in our motion handler
This is necessary since commit 1959ab.
Emilio Pozuelo Monfort [Tue, 19 Nov 2013 10:37:19 +0000 (11:37 +0100)]
shell: Set output on the focus_surfaces' view
Otherwise we crash when animating the view.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Tue, 19 Nov 2013 10:37:18 +0000 (11:37 +0100)]
exposay: Activate a surface when hovering it
This causes the surface to get the keyboard focus, which in turn
causes focus-animation to nicely work with exposay, making the
not focused surfaces to be dimmed.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Tue, 19 Nov 2013 10:37:17 +0000 (11:37 +0100)]
exposay: add cancel impl to the kbd grab iface
Otherwise we'll crash when cancel is called.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Tue, 19 Nov 2013 10:37:16 +0000 (11:37 +0100)]
shell: Implement alt-tab switcher
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Emilio Pozuelo Monfort [Tue, 19 Nov 2013 10:37:15 +0000 (11:37 +0100)]
input: Don't send leave events to destroyed views
If a view which has focus is destroyed, we would send a leave
event while changing focus, causing a segfault. Prevent this
by listening to the view's destroy signal and removing it from
the pointer focus.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Daniel Stone [Tue, 19 Nov 2013 10:37:14 +0000 (11:37 +0100)]
Add Exposay
Exposay provides window overview functions which, when a key which
produces the binding modifier is pressed on its own, scales all
currently-open windows down to be shown overlaid on the desktop,
providing keyboard and mouse navigation to be able to switch window
focus.
[pochu: rebased, ported to weston_view]
Daniel Stone [Tue, 19 Nov 2013 10:37:13 +0000 (11:37 +0100)]
Add move/scale animation
Add an animation which moves a surface to a new location, at the same
time as also rescaling it to a different size from the origin, rather
than the existing scale animation which resizes from the centre.
[pochu: rebased, ported to weston_view]
Daniel Stone [Tue, 19 Nov 2013 10:37:12 +0000 (11:37 +0100)]
Add modifier-only binding
Add the ability to bind to modifiers; the binding is armed when a key
which sets the requested modifier is pressed, and triggered if the key
is released with no other keys having been pressed in the meantime, as
well as mouse buttons or scroll axes.
This only works for direct modifiers (e.g. Shift and Alt), not modifiers
which latch or lock.
[pochu: rebased]
Louis-Francis Ratté-Boulianne [Tue, 19 Nov 2013 10:37:11 +0000 (11:37 +0100)]
animation, shell: add kbd focus change animation
When enabled, this will make all but the keyboard-focused window dim.
Also the background gets dimmed, if there are any windows open. The
panel is not dimmed.
When the keyboard focus changes, the change in dimming is animated.
The dimming is implemented with transparent solid-color surfaces, two at
most. The net effect of two overlapping dim surfaces is kept constant
during animations (stable fade animation).
There is a new weston.ini option "focus-animation", that defaults to
none, and can be set to "dim-layer" to enable the focus change
animation.
[pq: Sliced, squashed, and rebased the patch series. Fixed surface alpha
interaction with the switcher. Wrote the commit message.]
[pochu: rebased, ported to weston_view]
Axel Davy [Sun, 17 Nov 2013 20:34:16 +0000 (21:34 +0100)]
Wayland backend: set the opaque region when starting fullscreen
The opaque region is not set when we start the nested
compositor fullscreen. This patch fixes this.
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Pekka Paalanen [Fri, 15 Nov 2013 14:12:13 +0000 (16:12 +0200)]
protocol: move sub-surfaces to Wayland
This reverts commit
2396aec6842c709a714f3825dbad9fd88478f2e6.
This exact version of the sub-surface protocol has been copied into
Wayland core. Therefore it must be removed from here to avoid build
conflicts and useless duplication.
No other changes to sub-surface protocol consumers are needed, the
identical API is now offered by libwayland-client and libwayland-server.
The commit adding sub-surfaces to Wayland is:
Author: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
protocol: add sub-surfaces to the core
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Lubomir Rintel [Fri, 15 Nov 2013 13:18:15 +0000 (14:18 +0100)]
Add [core] backend option
This allows specifying a particular backend to load in a manner similar to
modules.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Giulio Camuffo [Thu, 14 Nov 2013 22:42:53 +0000 (23:42 +0100)]
compositor: add a way to override the default pointer grab
Giulio Camuffo [Thu, 14 Nov 2013 22:42:52 +0000 (23:42 +0100)]
input: let the pointer motion handlers move the pointer
this allows to implement pointer barriers by using a custom handler
Giulio Camuffo [Thu, 14 Nov 2013 22:42:51 +0000 (23:42 +0100)]
zoom: use the new pointer motion signal to move the zoom frame.
Giulio Camuffo [Thu, 14 Nov 2013 22:42:50 +0000 (23:42 +0100)]
input: add a motion signal to weston_pointer
The signal will be emitted after the pointer is moved. A shell plugin
can listen to the signal and activate certain effects when the pointer
touches the screen corners, for instance.
Kristian Høgsberg [Thu, 14 Nov 2013 05:55:57 +0000 (21:55 -0800)]
weston-test: Always update transform when moving surface
weston_view_update_transform() will post damage in the old and new
positions of the view and thus make sure we always repaint properly.
In particular, in bug 66133, the test suite moves the surface off
any output and weston_surface_schedule_repaint() in commit fails to
do anything, since the surface is not on any output.
After changing view geometry, we have to either call
weston_compositor_schedule_repaint(), which is what shell.c typically
does, though that repaints all outputs, or call
weston_view_update_transform() to force update the transformation
and queue repaints on affected outputs.
https://bugs.freedesktop.org/show_bug.cgi?id=66133
Kristian Høgsberg [Thu, 14 Nov 2013 05:33:43 +0000 (21:33 -0800)]
compositor: Schedule a repaint in weston_view_damage_below()
We always want a repaint if the view was damaged or changed. In
particular, we want weston_view_update_transform() to schedule a
repaint for the old and new position if we change the view transform.
Jasper St. Pierre [Wed, 13 Nov 2013 01:20:00 +0000 (20:20 -0500)]
westoy: Remove some accessors for wl_shell / wl_shell_surface
We want to remove support for these deprecated interfaces. Since
nothing is using them, this is a simple change.
Jasper St. Pierre [Wed, 13 Nov 2013 01:19:58 +0000 (20:19 -0500)]
westoy: Remove unused support for window parents
It seems that this was only used by the popup menu infrastructure,
which can handle this all on its own. Implementing e.g. transients
in the future can be done with a simple xdg_shell_set_transient_for.
Jasper St. Pierre [Wed, 13 Nov 2013 01:19:57 +0000 (20:19 -0500)]
westoy: Remove window_touch_move
It seems to be the same as window_move, except it ignores the passed
in serial (???) and instead just uses the one of the display.
Neil Roberts [Wed, 13 Nov 2013 15:44:06 +0000 (15:44 +0000)]
Add calls to wl_shm_buffer_begin/end_access
This wraps all accesses to an SHM buffer between wl_shm_buffer_begin
and end so that wayland-shm can install a handler for SIGBUS and catch
attempts to pass the compositor a buffer that is too small.
Jonas Ådahl [Tue, 12 Nov 2013 21:55:06 +0000 (22:55 +0100)]
filter: Remove unused variable
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Tue, 12 Nov 2013 21:55:05 +0000 (22:55 +0100)]
evdev: Synchronize keys only if seat is keyboard capable
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jasper St. Pierre [Tue, 12 Nov 2013 19:37:20 +0000 (14:37 -0500)]
westoy: Fix the version number we request for wl_seat
If the compositor supports a lower version, like version 2, we need
to request that instead of version 3.
Jason Ekstrand [Fri, 8 Nov 2013 02:13:33 +0000 (20:13 -0600)]
compositor-wayland: Add fullscreen support
This adds fullscreen support to the wayland backend. You can make any
output fullscreen by the shortcut CTRL+ALT+F. You can also run weston with
the --fullscreen option which causes it to create a single fullscreen
output.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Fri, 8 Nov 2013 02:13:32 +0000 (20:13 -0600)]
compositor-wayland: Add a --scale option
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Fri, 8 Nov 2013 02:13:31 +0000 (20:13 -0600)]
compositor-wayland: Move config parsing into backend_init
This cleans up the configuration and command parsing and separates it from
compositor/output initialization.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Fri, 8 Nov 2013 02:13:30 +0000 (20:13 -0600)]
compositor-wayland: Fix cursor coordinate transforms so it works on translated outputs
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Fri, 8 Nov 2013 02:13:29 +0000 (20:13 -0600)]
compositor-wayland: rename wayland_compositor.inputs to input_list
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Fri, 8 Nov 2013 02:13:28 +0000 (20:13 -0600)]
compositor-wayland: Remove unused output handling code
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:25:03 +0000 (22:25 -0500)]
cairo-util: Rework frame button handling
This makes button handling more correct concerning drags. Also,
frame_pointer_button returns the original button location in the case of a
release. This makes filtering of button events much easier for users of
the cair-util frame code.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:25:02 +0000 (22:25 -0500)]
compositor-wayland: Parse [output] config sections and more options
This commit makes the wayland backend search through the config for
[output] sections with names starting with "WL" and create outputs
accordingly. Outputs created due to the config file support mode, scale,
and transform parameters. It also listens for the --output-count
command-line option.
This brings the wayland backend almost up to par, in terms of functionality
with the X11 backend.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:25:01 +0000 (22:25 -0500)]
Move region transformation code to weston_transformed_region
Both the Pixman renderer and the X11 backend contained effectively the same
region transformation code. This commit adds a weston_transformed_region
function and changes pixman-renderer and compositor-x11 to use it.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:25:00 +0000 (22:25 -0500)]
Make weston_output_transform_coordinate more sane
The output is renamed "output" from "x11_output" and the input coordinates
are changed to wl_fixed_t from int. This way it is useable in
compositor-wayland as well as compositor-x11 and evdev.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:24:59 +0000 (22:24 -0500)]
Remove the concept of a border from weston_output.
The only user for this was the wayland backend with the GL renderer. It is
not needed in the Pixman renderer because you can easily create subimages.
All of the fancy output matrix calculations can be replaced by a single
glViewport call. Also, it didn't work with outputs located anywhere but
(0, 0) and I'm pretty sure output transformed outputs would break it too.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:24:58 +0000 (22:24 -0500)]
compositor-wayland: Add pixman/SHM fallback mode
This also adds a --use-pixman command-line option to enable the pixman
renderer explicitly.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:24:56 +0000 (22:24 -0500)]
gl-renderer: Remove the renderer-global border support
This was only ever used by the wayland backend and is no longer used there.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:24:55 +0000 (22:24 -0500)]
compositor-wayland: Add an actual frame around the compositor window
This adds a window frame with a close button. Similar to the X11 backend,
The window supports dragging but not resizing.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:24:54 +0000 (22:24 -0500)]
gl-renderer: Add support for per-output multi-texture borders.
The first advantage of this new API is that it is per-output instead of
global to the gl_renderer instance. This means that different windows can
have different titles, different button states, etc. The new api also uses
four textures (one for each side) instead of one. This allows you to draw
real borders with text and buttons in them instead of a simple image that
gets streached.
Images will be scaled as needed, so the right and left can be one pixel
tall if desired.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Jason Ekstrand [Mon, 28 Oct 2013 03:24:53 +0000 (22:24 -0500)]
compositor-wayland: Rename structure members and make things more consistant
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Kristian Høgsberg [Thu, 31 Oct 2013 06:46:08 +0000 (23:46 -0700)]
xwm: Set input region for fullscreen surfaces correctly
The logic here broke at some point so that we would only update the
input region for non-fullscreen windows. Thus, a fullscreen window would
be stuck with whatever size the most recent non-fullscreen size was.
https://bugs.freedesktop.org/show_bug.cgi?id=69219
Jason Ekstrand [Mon, 28 Oct 2013 03:24:57 +0000 (22:24 -0500)]
compositor-wayland: Flush the display on commit
This fixes the problem where animations will wait to play until input is
received. In general, it also makes the backend far more responsive.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
https://bugs.freedesktop.org/show_bug.cgi?id=68221
Kristian Høgsberg [Thu, 31 Oct 2013 06:15:44 +0000 (23:15 -0700)]
compositor-wayland: Handle HUP or ERR from event loop
Otherwise we end up in a busy loop instead of exiting nicely.
Kristian Høgsberg [Wed, 30 Oct 2013 23:27:16 +0000 (16:27 -0700)]
launcher: Make sure we drop drm master before we allow VT switches
On shutdown, we can risk having a pending vt switch that we normally
handle in the vt signal handler. However as we put the vt back in VT_AUTO
mode, the pending VT switch will go through and if we haven't dropped
drm master at that point, we could switch to another display server
without dropping drm master. That will typically crash the other server,
so let's try to make sure we don't do that.
https://bugs.freedesktop.org/show_bug.cgi?id=70877
Kristian Høgsberg [Wed, 30 Oct 2013 22:49:45 +0000 (15:49 -0700)]
shell: Create view for lock surface
Nothing created the view for the lock surface and weston would crash
when trying to display it.
https://bugs.freedesktop.org/show_bug.cgi?id=70873
Kristian Høgsberg [Wed, 30 Oct 2013 20:53:01 +0000 (13:53 -0700)]
logind: Return proper error value when tty or seat doesn't match
If the seat or tty doesn't match we return with r == 0, which looks like
success to weston_launcher_connect(), which then fails to fall back
to the legacy path.
https://bugs.freedesktop.org/show_bug.cgi?id=70876
Kristian Høgsberg [Wed, 30 Oct 2013 16:07:04 +0000 (09:07 -0700)]
animation.c: Schedule a repaint when the animation is done
Otherwise we don't repaint with the final state of the surface and
we're stuck with the second-to-last frame of the animation until
something else (moving the mouse or such) triggers a redraw.
https://bugs.freedesktop.org/show_bug.cgi?id=70930
Kristian Høgsberg [Wed, 30 Oct 2013 15:59:55 +0000 (08:59 -0700)]
Fall back to ANIMATION_NONE if startup-animation is zoom
get_animation_type() parses "none", "zoom" and "fade" but for the
startup animation, we only support "none" and "fade". If we get "zoom"
just fall back to "none" like we do for all unrecognized strings.
https://bugs.freedesktop.org/show_bug.cgi?id=71006
Jason Ekstrand [Mon, 28 Oct 2013 02:32:54 +0000 (21:32 -0500)]
toytoolkit: Don't segfault on window close
Without this commit, the client will segmentation fault due to accessing
the frame after everything has been destroyed.
Kristian Høgsberg [Tue, 29 Oct 2013 05:06:11 +0000 (22:06 -0700)]
window.c: Don't ungrab input after displaying the menu
We used to ungrab first to stop any existing grab and then grab after
showing the menu. That was broken in
c680e904897dfb19331f8f296ab, which
moved the ungrab down below the grab, and as a result menus are now
shown without a grab. This commit moves the grab back up.
Kristian Høgsberg [Mon, 28 Oct 2013 22:32:02 +0000 (15:32 -0700)]
input.c: Rename default grab functions to be consistent
Jonas recent patches made the inconsistency obvious, this patch fixes it.
Jonas Ådahl [Fri, 25 Oct 2013 21:18:05 +0000 (23:18 +0200)]
Add cancel function to grab interfaces
A grab can potentially allocate memory and would normally end the grab
itself, freeing the allocated memory in the process. However at in some
situations the compositor may want to abort a grab. The grab owner still
needs to free some memory and abort the grab properly. To do this a new
function 'cancel' is introduced in all the grab interfaces instructing
the grabs owner to abort the grab.
This patch also hooks up grab cancelling to seat device releasing and
when the compositor looses focus, which would potentially leak memory
before.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Fri, 25 Oct 2013 21:18:04 +0000 (23:18 +0200)]
shell: Don't leak weston_touch_move_grab structs
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Fri, 25 Oct 2013 21:18:03 +0000 (23:18 +0200)]
input: Remove unused variable
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Fri, 25 Oct 2013 21:18:02 +0000 (23:18 +0200)]
configure.ac: Report if built with XCB-XKB or not
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Fri, 25 Oct 2013 21:18:01 +0000 (23:18 +0200)]
compositor-x11: Hide update_xkb_keymap behind #ifdef HAVE_XCB_XKB
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Fri, 25 Oct 2013 21:18:00 +0000 (23:18 +0200)]
tests/.gitignore: Add *.trs
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Tomeu Vizoso [Mon, 28 Oct 2013 09:17:45 +0000 (10:17 +0100)]
rpi: Remove create_view and destroy_view implementations
And also remove the vfunc definitions from the compositor as they
are unused now.
Kristian Høgsberg [Fri, 25 Oct 2013 23:18:17 +0000 (16:18 -0700)]
configure.ac: Require wayland >= 1.3.91
Kristian Høgsberg [Fri, 25 Oct 2013 20:34:58 +0000 (13:34 -0700)]
weston-launch: Revoke and close input fds when we vt switch away
We used to leak the input fds, as weston would reopen all fds on vt
enter. We could just close them after sending the open fd through the
socket, but this patch also adds support for the new EVIOCREVOKE evdev
ioctl, that revokes the fd in question (including the copy that we
sent to the compositor).
https://bugs.freedesktop.org/show_bug.cgi?id=70849
Kristian Høgsberg [Fri, 25 Oct 2013 19:49:00 +0000 (12:49 -0700)]
configure.ac: Require at least version 0.3.0 of xkbcommon
https://bugs.freedesktop.org/show_bug.cgi?id=70870
Kristian Høgsberg [Fri, 25 Oct 2013 19:15:42 +0000 (12:15 -0700)]
.gitignore: Add .valid files
Ander Conselvan de Oliveira [Fri, 25 Oct 2013 13:26:34 +0000 (16:26 +0300)]
pixman-renderer, gl-renderer: Destroy surface state with the renderer
Previously the renderers destroy function assumed they are only called
when the compositor is shutting down and that the compositor had
already destroyed all the surfaces. However, if a runtime renderer
switch would be done, the surface state would be leaked.
This patch adds a destroy_signal to the pixman and gl renderers. The
surface state objects will listen for that signal and destroy
themselves if needed.
This is a step towards runtime switchable renderers.
Ander Conselvan de Oliveira [Fri, 25 Oct 2013 13:26:33 +0000 (16:26 +0300)]
compositor: Let renderers create and destroy surface state on their own
Remove create_surface() and destroy_surface() from the renderer
interface and change the renderers to create surface state on demand
and destroy it using the weston_surface's destroy signal.
Also make sure the surfaces' renderer state is reset to NULL on
destruction.
This is a step towards runtime switchable renderers.
(rpi-renderer changes are only compile-tested)
Ander Conselvan de Oliveira [Fri, 25 Oct 2013 13:26:32 +0000 (16:26 +0300)]
pixman-renderer, gl-renderer: Destroy debug bindings on clean up
Also make sure backends destroy the renderers before shutting down the
compositor to avoid a double call to weston_binding_destroy().
This is a step towards making renderers switchable during runtime.
Ander Conselvan de Oliveira [Fri, 25 Oct 2013 13:26:31 +0000 (16:26 +0300)]
pixman-renderer: Initialize pixman-renderer struct with zeros
Othrewise a crash may happen because of an unitialized value of the
create_view field.
Tomeu Vizoso [Fri, 25 Oct 2013 08:34:38 +0000 (10:34 +0200)]
rpi: Protect in-use DispmanX resources from premature deletion
The compositor will check if the client destroyed the wl_buffer
while it was in use in a display update, and delete the resource
itself once the update has finished.
Tomeu Vizoso [Fri, 25 Oct 2013 08:34:37 +0000 (10:34 +0200)]
rpi: Remove dangling reference to weston_view
This also marks the rpir_view for destroy in rpi_renderer_finish_frame()
Tomeu Vizoso [Thu, 24 Oct 2013 13:38:33 +0000 (15:38 +0200)]
rpi: Only check for prematurely destroyed wl_buffers in the EGL case
Tomeu Vizoso [Thu, 24 Oct 2013 13:38:32 +0000 (15:38 +0200)]
rpi: EGL surfaces need to be swapped always that we have an incoming back buffer
Tomeu Vizoso [Thu, 24 Oct 2013 13:38:31 +0000 (15:38 +0200)]
rpi: Fix logging of buffer swaps for the EGL case
Tomeu Vizoso [Thu, 24 Oct 2013 13:38:30 +0000 (15:38 +0200)]
rpi: Initialize surface's list of views
Tomeu Vizoso [Thu, 24 Oct 2013 13:38:29 +0000 (15:38 +0200)]
rpi: Link with EGL if ENABLE_EGL
Peter Hutterer [Wed, 23 Oct 2013 04:57:02 +0000 (14:57 +1000)]
protocol: hook up xmllint to check validity
Kristian Høgsberg [Thu, 24 Oct 2013 23:52:00 +0000 (16:52 -0700)]
shell.c: Prevent moving a window from more than one source
It was possible to start a move or resize with a pointer and then
start another move for the same surface with touch or a pointer from
another seat, which would make the window flicker around. With this
commit, we now reject any attempts to move or resize a surface that is
currently grabbed.
Kristian Høgsberg [Thu, 24 Oct 2013 23:29:51 +0000 (16:29 -0700)]
shell.c: Don't overwrite focus surface argument in activate_binding()
We need either the pointer or touch focus, which is passed in to
activate_binding(). Don't overwrite this with the pointer focus.
Kristian Høgsberg [Thu, 24 Oct 2013 23:21:39 +0000 (16:21 -0700)]
shell: Don't cast weston_view to surface when we just need view->surface
Most of the shell.c bindings take effect on the current pointer or
touch focus. That's now a view, but we need a surface in these cases.
Just get the surface from view->surface instead of trying to cast a
view to a surface.
Kristian Høgsberg [Thu, 24 Oct 2013 22:54:49 +0000 (15:54 -0700)]
compositor: Remove two unused variables
Kristian Høgsberg [Thu, 24 Oct 2013 22:51:35 +0000 (15:51 -0700)]
shell: Create a view for the grab_surface
Without the view, we can't set pointer and touch focus to the grab_surface
and touch moving fails.
Kristian Høgsberg [Thu, 24 Oct 2013 21:21:53 +0000 (14:21 -0700)]
input: Properly handle setting touch focus to NULL
This happens on TOUCH_UP, and we unconditionally dereference view->surface.
Kristian Høgsberg [Thu, 24 Oct 2013 06:38:50 +0000 (23:38 -0700)]
compositor-x11: Use the fullscreen size provided by the configure event
Make sure we initialize the x11 shm state using the right window size.
https://bugs.freedesktop.org/show_bug.cgi?id=70590
Kristian Høgsberg [Thu, 24 Oct 2013 06:36:04 +0000 (23:36 -0700)]
shell: Add the right output object to the shell output_list
Error on my part while renaming the shell_output variable.
Xiong Zhang [Wed, 23 Oct 2013 05:58:32 +0000 (13:58 +0800)]
shell: register output->destroy_signal handler
setup_output_destroy_handler() deal with output created at
drm backend initialize time.
handle_output_create() deal with output created by hot plug handler
output_destroy_handler is removed when output was unplugged or
shell is destroyed.
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Xiong Zhang [Wed, 23 Oct 2013 05:58:35 +0000 (13:58 +0800)]
window, desktop-shell: deal with output unplug on client side
when output is removed, weston-desktop-shell should destroy panel
and background surface on destroyed output.
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Xiong Zhang [Wed, 23 Oct 2013 05:58:31 +0000 (13:58 +0800)]
compositor: set surface->plane from destroyed plane to NULL
In drm backend, the cursor_surface->plane point to
drm_output->cursor_plane.when this output is removed,
drm_output->cursor_plane is destroyed, butcursor_surface->plane
still point to destroyed plane. So once mouse move to this
cursor_surface and system will repaint this cursor_surface,
segment fault will generate in weston_surface_damage_below() function.
V2:
-set surface->plane to NULL whose plane point to unplugged output,
then change weston_surface_damage_below() to do nothing if
surface->plane is NULL (Kristian)
-set surface->plane to NULL in weston_surface_unmap(),
so that all surfaces that have a non-NULL plane pointer wil be
on compositor->surface_list (Kristian).
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69777
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>