Jonas Ådahl [Mon, 2 Dec 2013 21:05:05 +0000 (22:05 +0100)]
input: Reset pointer state when last pointer device was removed
Reset pointer button count in case the driver did not emit appropriate
number of number button released events.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Mon, 2 Dec 2013 21:05:04 +0000 (22:05 +0100)]
input: Reset touch state when last touch device was removed
Reset the touch point count in case the driver did not emit appropriate
number of touch up events.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Mon, 2 Dec 2013 21:05:03 +0000 (22:05 +0100)]
input: Keep track of number of touch points inside touch struct
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Mon, 2 Dec 2013 21:05:02 +0000 (22:05 +0100)]
rpi: Use common udev_input for input device handling
The purpose of this patch is to move away from separating evdev
functionality from udev functionality in order to rely on a separate
library to do this for us.
This patch is only compile tested and I have no idea how much it breaks.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Philip Withnall [Mon, 25 Nov 2013 18:01:46 +0000 (18:01 +0000)]
shell: Change stacking order calculation for popup surfaces
Always put them as the top-most layer in the layer list of their parent.
This ensures that, for example, the popup menu produced by
right-clicking on a surface (which is not currently at the top of the
stacking order in the current workspace) is displayed at the top of the
stacking order.
Philip Withnall [Mon, 25 Nov 2013 18:01:45 +0000 (18:01 +0000)]
shell: Fix a potential NULL pointer dereference
get_shell_surface() may return NULL. Found by scan-build.
Philip Withnall [Mon, 25 Nov 2013 18:01:44 +0000 (18:01 +0000)]
shell: Store parent–child links between shsurfs for window stacking
This ensures transient surfaces are included in the layer of their
parent, even if the parent later changes layers. It achieves this by
recursively changing the layers of all children of a surface when that
surface’s layer is changed. The recursion is unbounded unless transient
surfaces are restricted to not being children of other popup or transient
surfaces.
This fixes a bug whereby a surface which is transient for a fullscreen
surface could end up being stacked below it.
https://bugs.freedesktop.org/show_bug.cgi?id=69443
Philip Withnall [Mon, 25 Nov 2013 18:01:43 +0000 (18:01 +0000)]
shell: Factor out common code to create fullscreen black surfaces
Philip Withnall [Mon, 25 Nov 2013 18:01:42 +0000 (18:01 +0000)]
shell: Remove weston_view_restack()
It’s tied too deeply into the shell’s window stacking and ordering code
to legitimately be split out into compositor.c. Inline it in the shell,
and refactor some code around it a little, tidying up the stacking
behaviour for fullscreen surfaces.
Philip Withnall [Mon, 25 Nov 2013 18:01:41 +0000 (18:01 +0000)]
shell: Update a shsurf’s layer when its surface type changes
Philip Withnall [Mon, 25 Nov 2013 18:01:40 +0000 (18:01 +0000)]
shell: Factor out code to set the layer for a shsurf
This will be used more extensively in the next few commits, where shsurf
layering is handled more explicitly when changing the type of a surface.
This commit introduces the minor functional change that map() will now
always add the new surface to a layer list, as
shell_surface_calculate_layer_link() always returns a non-NULL link
element. This affects fullscreen and ‘none’ surfaces (which are now added
to the fullscreen and current workspace’s layer list, respectively).
Philip Withnall [Mon, 25 Nov 2013 18:01:39 +0000 (18:01 +0000)]
shell: Don’t change popups’ window types until the next configure event
This standardises their behaviour with that of the other window types,
where the type change is only committed on configure.
Philip Withnall [Mon, 25 Nov 2013 18:01:38 +0000 (18:01 +0000)]
shell: Factor out code to set a shsurf’s parent
This is in preparation for unifying how surface layering works. It
introduces the small functional change that fullscreen, maximized and
top-level surfaces now explicitly have no parent surface. Only popup and
transient surfaces have a non-NULL parent.
Philip Withnall [Mon, 25 Nov 2013 18:01:37 +0000 (18:01 +0000)]
shell: Tidy up unset_fullscreen()
No functional changes, merely some presentational cleanup.
Philip Withnall [Mon, 25 Nov 2013 18:01:36 +0000 (18:01 +0000)]
shell: Refactor workspace code to operate on shsurfs rather than views
This is needed for the work to refactor window stacking and ordering, as
window order operates on shsurfs, not views.
Philip Withnall [Mon, 25 Nov 2013 18:01:35 +0000 (18:01 +0000)]
shell: Factor out common code to set a shsurf’s output
Philip Withnall [Mon, 25 Nov 2013 18:01:34 +0000 (18:01 +0000)]
clients: Add a new weston-stacking demo
This allows creation of a variety of window types, for the purposes of
testing window ordering and stacking in Weston.
Philip Withnall [Mon, 25 Nov 2013 18:01:33 +0000 (18:01 +0000)]
clients: Add window_is_transient() helper to the toy toolkit window
Philip Withnall [Mon, 25 Nov 2013 18:01:32 +0000 (18:01 +0000)]
shell: Add missing cases to switch statements for animations and fading
This fixes two GCC warnings when compiling with -Wswitch-enum
-Wswitch-default, and makes it clearer that those cases have been
thought about explicitly when writing the code, rather than just being
forgotten.
Philip Withnall [Mon, 25 Nov 2013 18:01:31 +0000 (18:01 +0000)]
shell: Add missing cases to switch statements for surface types
This fixes a load of GCC warnings when compiling with -Wswitch-enum
-Wswitch-default, and makes it clearer that those cases have been
thought about explicitly when writing the code, rather than just being
forgotten.
Philip Withnall [Mon, 25 Nov 2013 18:01:30 +0000 (18:01 +0000)]
shell: Reorganise set/unset methods for fullscreen/maximize/popup/transient
Move them to be next to each other, and standardise the naming scheme so
they’re more greppable. This should make maintenance easier.
Xiong Zhang [Fri, 29 Nov 2013 03:18:14 +0000 (11:18 +0800)]
src/shell.c: set black_surface->width and height
full screen black_surface doesn't have associated wl_buffer, so
black_surface->width and height can't get value through
weston_surface_commit(). then weston_surface_damage(black_surface)
will be wrong in shell_stack_fullscreen(), the result is that we
can't see a full screen view whe APP window's size isn't equal to
output's size like running weston-gears
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Tomeu Vizoso [Mon, 2 Dec 2013 16:18:58 +0000 (17:18 +0100)]
rpi: Support opaque regions
This is needed for XWayland surfaces with alpha channel, as X will be
sending crap in there that should be discarded.
This is currently done with a copy in the compositor, while we wait for
support in the VideoCore side.
Pekka Paalanen [Tue, 26 Nov 2013 17:19:43 +0000 (18:19 +0100)]
compositor: merge surface size from buffer size funcs
Replace the two functions getting the intended surface dimensions from
the surface's buffer and buffer transformation parameters by a single
function that just set the surface size according to all the buffer
state.
The old functions were always called in pairs, and always assigned to
the surface dimension variables.
This function also deals with a NULL buffer by setting the dimensions to
zero, just like the callers used to do.
The new function has no users outside this source file, so do not export
it. This basically unexports the old functions.
Pekka Paalanen [Tue, 26 Nov 2013 17:19:42 +0000 (18:19 +0100)]
compositor: do not recompute size on pointer_set_cursor
This removes the calls to weston_surface_buffer_width/height() from
input.c, which are the last external calls to them.
Instead, use the cached values from weston_surface::width,height. These
have already been set by weston_surface_commit(), because that is the
only way a weston_surface can get a buffer.
Pekka Paalanen [Tue, 26 Nov 2013 17:19:41 +0000 (18:19 +0100)]
compositor: gather buffer_transform and _scale into a struct
Gather the variables affecting the coordinate transformations between
buffer and local coordinates into a new struct weston_buffer_viewport.
This will be more useful later, when the crop & scale extension is
implemented.
Axel Davy [Fri, 8 Nov 2013 11:59:34 +0000 (12:59 +0100)]
Do not set output->current_mode in compositor.c
The field is already set - correctly - in the backend switch_mode.
setting output->current_mode to mode in compositor.c leads to bugs,
since mode can be freed by the shell.
For example, the shell allocates it on the stack for
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER
Signed-off-by: Axel Davy <axel.davy@ens.fr>
MoD [Thu, 28 Nov 2013 05:24:21 +0000 (05:24 +0000)]
compositor-x11: Allow r5g6b5 visuals for X11 backend SHM
The support is already present in the pixman renderer, so we can just
check and use it.
Ander Conselvan de Oliveira [Wed, 27 Nov 2013 15:43:51 +0000 (17:43 +0200)]
gl-renderer: Fix support for Y_XUXV buffers
Due to a copy and paste error, the pointer to the vertex shader source
was NULL and the program failed to link.
Tomeu Vizoso [Wed, 27 Nov 2013 12:22:42 +0000 (13:22 +0100)]
Remove dependency on <GLES2/gl2.h> by replacing GLfloat with float
Emilio Pozuelo Monfort [Wed, 27 Nov 2013 09:49:08 +0000 (10:49 +0100)]
exposay: properly go away when the modifier is pressed
We no longer receive an exposay_binding() call while exposay
is in-flight as we have grabbed the keyboard, so we need to
listen on the modifiers callback for the modifier press and
release.
Emilio Pozuelo Monfort [Wed, 27 Nov 2013 09:34:32 +0000 (10:34 +0100)]
input: don't run modifier bindings when the kbd is grabbed
We don't want bindings to be run while the keyboard is grabbed.
Otherwise the binding handler may grab the keyboard too, making
the old grab go away without even being cancelled.
Pekka Paalanen [Fri, 22 Nov 2013 15:30:39 +0000 (17:30 +0200)]
rpi: avoid vc_dispmanx_set_wl_buffer_in_use without EGL
The symbol is needed only for the EGL buffer path. If --disable-egl is
given to ./configure, there is no need for it, so fix it to actually not
look for that symbol needlessly.
This should fix the runtime error:
Failed to load module: .../rpi-backend.so: undefined symbol:
vc_dispmanx_set_wl_buffer_in_use
when you use --disable-egl and do not have a recent enough
libraspberrypi package (/opt/vc, a.k.a userland.git) that would provide
vc_dispmanx_set_wl_buffer_in_use. Apparently no released version of
userland yet provides this.
The calls are organized into two helper functions to avoid a boolean
argument, and put the #ifdefs away from the main parts of the code.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Emilio Pozuelo Monfort [Tue, 26 Nov 2013 12:32:08 +0000 (13:32 +0100)]
exposay: provide a cancel func to the ptr grab iface
Fixes a crash when cancel is called while exposay is in progress.
Neil Roberts [Fri, 22 Nov 2013 16:46:00 +0000 (16:46 +0000)]
Automatically generate weston.ini with the right paths
Previously weston.ini had hardcoded paths for the weston-* clients in
/usr/bin and /usr/libexec. This was a bit annoying when testing Weston
because you wouldn't usually install those in the system prefix. This
patch adds a make rule to automatically generate weston.ini from a
template file with some replacement markers for the paths so that they
can have the right prefix.
Xiong Zhang [Mon, 25 Nov 2013 10:42:51 +0000 (18:42 +0800)]
distinguish touch screen and pointer dnd in client
Data device interface in client just handle with pointer's dnd.
If a touch screen trigger dnd, it will use pointer struct like i
nput->sx, input->sy, input->pointer_focus. So if pointer is moving
when touch screen trigeer a dnd, wrong behaviore will occur.
Before touch screen start dnd, system call touch_grab()
to mark the following drag and drop operation is generated by
touch screen.
Defined some common variables in struct input to track dnd.
Note, touch screen and pointer can't generate drag and drop at the
same time, becuae data device protocol can't identify the drag
and drop event is generated by touch screen or pointer.
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Reviewed-by: Kristian Hogsberg <hoegsberg@gmail.com>
Xiong Zhang [Mon, 25 Nov 2013 10:42:50 +0000 (18:42 +0800)]
client/dnd.c: add dnd support for touch screen in client
Adding the interface for touch screen event in clients/dnd.c, once
user touch down on this app, it will trigger a touch and drag
operation.
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Reviewed-by: Kristian Hogsberg <hoegsberg@gmail.com>
Xiong Zhang [Mon, 25 Nov 2013 10:42:49 +0000 (18:42 +0800)]
src/data_device.c: add dnd support for touch screen
Adding the drag and drop grab interface for touch screen in
src/data-device.c, so the server can handle touch screen
drag and drop operation.
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Reviewed-by: Kristian Hogsberg <hoegsberg@gmail.com>
Kristian Høgsberg [Mon, 25 Nov 2013 21:54:30 +0000 (13:54 -0800)]
Makefile.am: The wayland rpi doesn't libsession-helper.la
Marco Barisione [Mon, 25 Nov 2013 18:00:48 +0000 (18:00 +0000)]
Makefile.am: The rpi backend needs libsession-helper.la
Signed-off-by: Marco Barisione <marco.barisione@collabora.co.uk>
Xiong Zhang [Mon, 25 Nov 2013 10:42:52 +0000 (18:42 +0800)]
terminal: add touch screen selection support
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Reviewed-by: Kristian Hogsberg <hoegsberg@gmail.com>
Xiong Zhang [Mon, 25 Nov 2013 07:22:50 +0000 (15:22 +0800)]
src/Makefile.am: correct compile failure for launcher-util.c
The following error message is generated during compile
In file included from launcher-util.c:43:0:
compositor.h:35:28: fatal error: wayland-server.h: No such file or directory
#include <wayland-server.h>
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Kristian Høgsberg [Mon, 25 Nov 2013 00:54:12 +0000 (16:54 -0800)]
terminal: Update terminal->end whenever we write a character
We used to only update it on newline, which breaks when somebody moves
the cursor below terminal->end and writes stuff. Instead update it whenever
we write a character to the terminal.
https://bugs.freedesktop.org/show_bug.cgi?id=71935
Kristian Høgsberg [Sun, 24 Nov 2013 23:10:19 +0000 (15:10 -0800)]
Makefile.am: Move launcher helpers in to libsession-helper.la library
Kristian Høgsberg [Sun, 24 Nov 2013 22:45:23 +0000 (14:45 -0800)]
configure.ac: The drm backend no longer requires EGL
We can run with just the pixman renderer and 'dumb' kms buffers.
Kristian Høgsberg [Sun, 24 Nov 2013 22:37:07 +0000 (14:37 -0800)]
configure.ac: Make libdrm optional in weston-launch
If libdrm is available, weston-launch and launcer-util.c will support
getting the drm device and setting and dropping drm master, otherwise
we'll only support getting input devices.
Kristian Høgsberg [Sat, 23 Nov 2013 20:59:01 +0000 (12:59 -0800)]
tests: Remove an unecessary Makefile.am variable
Kristian Høgsberg [Sat, 23 Nov 2013 20:53:16 +0000 (12:53 -0800)]
tests: Use a helper library for weston-test clients
Kristian Høgsberg [Sat, 23 Nov 2013 20:40:34 +0000 (12:40 -0800)]
tests: Use TEST_CLIENT for test client modules
We abused SIMPLE_CLIENT_LIBS before, but if you disable simple clients,
the test suite fails to link. Use test client specific variables instead.
https://bugs.freedesktop.org/show_bug.cgi?id=71530
Kristian Høgsberg [Sat, 23 Nov 2013 06:43:20 +0000 (22:43 -0800)]
terminal: Init tab ruler after setting terminal->width
terminal_init_tabs() needs an accurate terminal->width to be able
to correctly initialize the tab ruler.
Kristian Høgsberg [Sat, 23 Nov 2013 05:12:19 +0000 (21:12 -0800)]
input: Cancel pointer grabs when compositor loses kb focus
This makes sure we pop down popups when the X backend loses keyboard
focus or when the kms backend vt-switches away.
Emilio Pozuelo Monfort [Fri, 22 Nov 2013 15:21:20 +0000 (16:21 +0100)]
shell: don't crash if a pointer's focus is null
It's possible for a pointer's focus to be null, e.g. because
the focus surface has been bestroyed. Prevent a crash when
that happens and a client takes too long to respond to a ping.
Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Kristian Høgsberg [Fri, 22 Nov 2013 19:37:16 +0000 (11:37 -0800)]
dnd: Simplify drag icon creation
We used to have to composite the pointer on top of the drag icon, but
the final protocol allows us to specify both a drag icon and a cursor.
Remove the complexity that dealt with that.
Giulio Camuffo [Fri, 15 Nov 2013 21:06:15 +0000 (22:06 +0100)]
compositor: set weston_surface:resource to NULL when destroyed
with the previous patch the resource isn't used inside weston_surface_destroy()
anymore (aside sending events unuseful for a closing client), so we can safely
reset it.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Pekka Paalanen [Thu, 21 Nov 2013 14:23:58 +0000 (16:23 +0200)]
tests: .gitignore log files
Pekka Paalanen [Thu, 21 Nov 2013 14:23:57 +0000 (16:23 +0200)]
tests: allow weston test plugin to keep on running
If the environment variable WESTON_TEST_CLIENT_PATH is not set, do not
quit Weston in the test plugin.
This allows one to start Weston with the test plugin manually, and then
run any tests also manually, while observing Weston's behaviour over
time. This is useful for:
- Running a test multiple times and checking if Weston leaks (e.g. with
Valgrind)
- Running tests manually on a backend that is not x11 or wayland,
especially the backends that require weston-launch, and therefore
cannot be used with the 'make check' machinery.
This change should not affect 'make check' behaviour, because there
WESTON_TEST_CLIENT_PATH is always set.
Cc: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
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>