profile/ivi/weston-ivi-shell.git
11 years agoinput: let the pointer motion handlers move the pointer
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

11 years agozoom: use the new pointer motion signal to move the zoom frame.
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.

11 years agoinput: add a motion signal to weston_pointer
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.

11 years agoweston-test: Always update transform when moving surface
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

11 years agocompositor: Schedule a repaint in weston_view_damage_below()
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.

11 years agowestoy: Remove some accessors for wl_shell / wl_shell_surface
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.

11 years agowestoy: Remove unused support for window parents
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.

11 years agowestoy: Remove window_touch_move
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.

11 years agoAdd calls to wl_shm_buffer_begin/end_access
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.

11 years agofilter: Remove unused variable
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>
11 years agoevdev: Synchronize keys only if seat is keyboard capable
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>
11 years agowestoy: Fix the version number we request for wl_seat
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.

11 years agocompositor-wayland: Add fullscreen support
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>
11 years agocompositor-wayland: Add a --scale option
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>
11 years agocompositor-wayland: Move config parsing into backend_init
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>
11 years agocompositor-wayland: Fix cursor coordinate transforms so it works on translated outputs
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>
11 years agocompositor-wayland: rename wayland_compositor.inputs to input_list
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>
11 years agocompositor-wayland: Remove unused output handling code
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>
11 years agocairo-util: Rework frame button handling
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>
11 years agocompositor-wayland: Parse [output] config sections and more options
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>
11 years agoMove region transformation code to weston_transformed_region
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>
11 years agoMake weston_output_transform_coordinate more sane
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>
11 years agoRemove the concept of a border from weston_output.
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>
11 years agocompositor-wayland: Add pixman/SHM fallback mode
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>
11 years agogl-renderer: Remove the renderer-global border support
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>
11 years agocompositor-wayland: Add an actual frame around the compositor window
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>
11 years agogl-renderer: Add support for per-output multi-texture borders.
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>
11 years agocompositor-wayland: Rename structure members and make things more consistant
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>
11 years agoxwm: Set input region for fullscreen surfaces correctly
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

11 years agocompositor-wayland: Flush the display on commit
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

11 years agocompositor-wayland: Handle HUP or ERR from event loop
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.

11 years agolauncher: Make sure we drop drm master before we allow VT switches
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

11 years agoshell: Create view for lock surface
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

11 years agologind: Return proper error value when tty or seat doesn't match
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

11 years agoanimation.c: Schedule a repaint when the animation is done
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

11 years agoFall back to ANIMATION_NONE if startup-animation is zoom
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

11 years agotoytoolkit: Don't segfault on window close
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.

11 years agowindow.c: Don't ungrab input after displaying the menu
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.

11 years agoinput.c: Rename default grab functions to be consistent
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.

11 years agoAdd cancel function to grab interfaces
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>
11 years agoshell: Don't leak weston_touch_move_grab structs
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>
11 years agoinput: Remove unused variable
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>
11 years agoconfigure.ac: Report if built with XCB-XKB or not
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>
11 years agocompositor-x11: Hide update_xkb_keymap behind #ifdef HAVE_XCB_XKB
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>
11 years agotests/.gitignore: Add *.trs
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>
11 years agorpi: Remove create_view and destroy_view implementations
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.

11 years agoconfigure.ac: Require wayland >= 1.3.91
Kristian Høgsberg [Fri, 25 Oct 2013 23:18:17 +0000 (16:18 -0700)]
configure.ac: Require wayland >= 1.3.91

11 years agoweston-launch: Revoke and close input fds when we vt switch away
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

11 years agoconfigure.ac: Require at least version 0.3.0 of xkbcommon
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

11 years ago.gitignore: Add .valid files
Kristian Høgsberg [Fri, 25 Oct 2013 19:15:42 +0000 (12:15 -0700)]
.gitignore: Add .valid files

11 years agopixman-renderer, gl-renderer: Destroy surface state with the renderer
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.

11 years agocompositor: Let renderers create and destroy surface state on their own
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)

11 years agopixman-renderer, gl-renderer: Destroy debug bindings on clean up
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.

11 years agopixman-renderer: Initialize pixman-renderer struct with zeros
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.

11 years agorpi: Protect in-use DispmanX resources from premature deletion
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.

11 years agorpi: Remove dangling reference to weston_view
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()

11 years agorpi: Only check for prematurely destroyed wl_buffers in the EGL case
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

11 years agorpi: EGL surfaces need to be swapped always that we have an incoming back buffer
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

11 years agorpi: Fix logging of buffer swaps for the EGL case
Tomeu Vizoso [Thu, 24 Oct 2013 13:38:31 +0000 (15:38 +0200)]
rpi: Fix logging of buffer swaps for the EGL case

11 years agorpi: Initialize surface's list of views
Tomeu Vizoso [Thu, 24 Oct 2013 13:38:30 +0000 (15:38 +0200)]
rpi: Initialize surface's list of views

11 years agorpi: Link with EGL if ENABLE_EGL
Tomeu Vizoso [Thu, 24 Oct 2013 13:38:29 +0000 (15:38 +0200)]
rpi: Link with EGL if ENABLE_EGL

11 years agoprotocol: hook up xmllint to check validity
Peter Hutterer [Wed, 23 Oct 2013 04:57:02 +0000 (14:57 +1000)]
protocol: hook up xmllint to check validity

11 years agoshell.c: Prevent moving a window from more than one source
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.

11 years agoshell.c: Don't overwrite focus surface argument in activate_binding()
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.

11 years agoshell: Don't cast weston_view to surface when we just need view->surface
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.

11 years agocompositor: Remove two unused variables
Kristian Høgsberg [Thu, 24 Oct 2013 22:54:49 +0000 (15:54 -0700)]
compositor: Remove two unused variables

11 years agoshell: Create a view for the grab_surface
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.

11 years agoinput: Properly handle setting touch focus to NULL
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.

11 years agocompositor-x11: Use the fullscreen size provided by the configure event
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

11 years agoshell: Add the right output object to the shell output_list
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.

11 years agoshell: register output->destroy_signal handler
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>
11 years agowindow, desktop-shell: deal with output unplug on client side
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>
11 years agocompositor: set surface->plane from destroyed plane to NULL
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>
11 years agowindow.c: Don't put titlebars on menu windows
Kristian Høgsberg [Thu, 24 Oct 2013 05:12:13 +0000 (22:12 -0700)]
window.c: Don't put titlebars on menu windows

11 years agowindow.c: Use frame code for drawing menus
Kristian Høgsberg [Thu, 24 Oct 2013 04:49:30 +0000 (21:49 -0700)]
window.c: Use frame code for drawing menus

This gives us a nice frame and drop shadows for the menus.

11 years agoterminal: Show character grid size in header bar when resizing
Kristian Høgsberg [Thu, 24 Oct 2013 03:47:35 +0000 (20:47 -0700)]
terminal: Show character grid size in header bar when resizing

We don't have a reliable way to know when to clear this indicator.
Typically the pointer will still be over the window when the resize is
done and we'll get an enter event, but if the window sets a max size
the pointer may be over another window when the resize is done.

We'll need a new wl_shell (or more likely xdg_shell) event for this.

11 years agoterminal: Add context menu with new terminal/copy/paste
Kristian Høgsberg [Wed, 23 Oct 2013 23:52:05 +0000 (16:52 -0700)]
terminal: Add context menu with new terminal/copy/paste

11 years agoterminal: Add scroll-back history
Kristian Høgsberg [Wed, 23 Oct 2013 23:29:14 +0000 (16:29 -0700)]
terminal: Add scroll-back history

Ctrl-Shift-UP/DOWN to scroll through the history.

11 years agoconfigure.ac: Bump version to 1.3.90 for the master branch
Kristian Høgsberg [Wed, 23 Oct 2013 16:30:48 +0000 (09:30 -0700)]
configure.ac: Bump version to 1.3.90 for the master branch

11 years agoclients/window: Dispose of previous keymap and state on keymap change
Rui Matos [Thu, 10 Oct 2013 17:44:22 +0000 (19:44 +0200)]
clients/window: Dispose of previous keymap and state on keymap change

11 years agocompositor-wayland: Handle keymap changes
Rui Matos [Thu, 10 Oct 2013 17:44:21 +0000 (19:44 +0200)]
compositor-wayland: Handle keymap changes

11 years agocompositor-x11: Update keymap when XKB keymap changes
Rui Matos [Thu, 10 Oct 2013 17:44:20 +0000 (19:44 +0200)]
compositor-x11: Update keymap when XKB keymap changes

11 years agoinput: Add core API to update the keymap
Rui Matos [Thu, 10 Oct 2013 17:44:19 +0000 (19:44 +0200)]
input: Add core API to update the keymap

How and when to update the keymap is left to each backend.

The new keymap only becomes effective when no keys are pressed and we
keep latched and locked modifiers from the previous state.

11 years agoSplit the geometry information from weston_surface out into weston_view
Jason Ekstrand [Sun, 13 Oct 2013 03:38:11 +0000 (22:38 -0500)]
Split the geometry information from weston_surface out into weston_view

The weston_surface structure is split into two structures:

 * The weston_surface structure storres everything required for a
   client-side or server-side surface.  This includes buffers; callbacks;
   backend private data; input, damage, and opaque regions; and a few other
   bookkeeping bits.

 * The weston_view structure represents an entity in the scenegraph and
   storres all of the geometry information.  This includes clip region,
   alpha, position, and the transformation list as well as all of the
   temporary information derived from the geometry state.  Because a view,
   and not a surface, is a scenegraph element, the view is what is placed
   in layers and planes.

There are a few things worth noting about the surface/view split:

 1. This is *not* a modification to the protocol.  It is, instead, a
    modification to Weston's internal scenegraph to allow a single surface
    to exist in multiple places at a time.  Clients are completely unaware
    of how many views to a particular surface exist.

 2. A view is considered a direct child of a surface and is destroyed when
    the surface is destroyed.  Because of this, the view.surface pointer is
    always valid and non-null.

 3. The compositor's surface_list is replaced with a view_list.  Due to
    subsurfaces, building the view list is a little more complicated than
    it used to be and involves building a tree of views on the fly whenever
    subsurfaces are used.  However, this means that backends can remain
    completely subsurface-agnostic.

 4. Surfaces and views both keep track of which outputs they are on.

 5. The weston_surface structure now has width and height fields.  These
    are populated when a new buffer is attached before surface.configure
    is called.  This is because there are many surface-based operations
    that really require the width and height and digging through the views
    didn't work well.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agologind: Remove missing 'else'
Kristian Høgsberg [Tue, 22 Oct 2013 20:19:23 +0000 (13:19 -0700)]
logind: Remove missing 'else'

Only fall through to cleaning up weston-launch or standalone state
if we didn't use logind.

11 years agocompositor: Remove redundant and not well-defined focus field
Kristian Høgsberg [Tue, 22 Oct 2013 19:40:54 +0000 (12:40 -0700)]
compositor: Remove redundant and not well-defined focus field

It was never clear what this field really did.

11 years agocompositor-drm: Don't call drop/set master anymore
Kristian Høgsberg [Tue, 22 Oct 2013 19:27:46 +0000 (12:27 -0700)]
compositor-drm: Don't call drop/set master anymore

This is done by either laucnher-util.c directly, weston-launch or
logind, depending on how we're launched.

11 years agocompositor: finish frame if redraw fails
David Herrmann [Tue, 22 Oct 2013 15:11:26 +0000 (17:11 +0200)]
compositor: finish frame if redraw fails

If we are about to finish a frame, but a redraw is pending and we let the
compositor redraw, we need to check for errors. If the redraw fails and
the backend cannot schedule a page-flip, we need to finish the frame,
anyway.

All backends except DRM use a timer to schedule frames. Hence, they cannot
fail. But for DRM, we need to be able to handle drmModePageFlip() failures
in case access got revoked.

This fixes a bug where logind+drm caused keyboard input to be missed as we
didn't reenable it after a failed page-flip during deactivation.

11 years agocompositor-drm: finish frame if initial page-flip fails
David Herrmann [Tue, 22 Oct 2013 15:11:25 +0000 (17:11 +0200)]
compositor-drm: finish frame if initial page-flip fails

If the initial page-flip fails, immediately finish the frame to avoid
being stuck in the given frame. We already do this if we have no fbo
available. Now we do the same if the page-flip fails.

11 years agoRename invocations of frame_create that were missed by ee7fefcf
Cameron Stewart [Fri, 18 Oct 2013 01:56:41 +0000 (01:56 +0000)]
Rename invocations of frame_create that were missed by ee7fefcf

For some reason it not only compiled with different parameters but the
method succeeded and just failed later.

11 years agolauncher: add logind backend
David Herrmann [Mon, 21 Oct 2013 22:28:09 +0000 (00:28 +0200)]
launcher: add logind backend

Instead of connecting to weston-launch from launcher-util, we now try to
connect to logind first. If logind provides session-devices, we use them.
If not, we fall back to the old weston-launch facility.

11 years agolauncher: add weston_launcher_close() dummy
David Herrmann [Mon, 21 Oct 2013 22:28:08 +0000 (00:28 +0200)]
launcher: add weston_launcher_close() dummy

If you request a device via weston_launcher_open(), you should now release
it via weston_launcher_close() instead of close(). This is currently not
needed but will be required for logind devices.

11 years agodbus: add dbus-match helpers
David Herrmann [Mon, 21 Oct 2013 22:28:07 +0000 (00:28 +0200)]
dbus: add dbus-match helpers

These helpers simplify adding dbus-matches by allowing var-arg arguments
to assemble the matching rules.

11 years agoAdd optional dbus helpers
David Herrmann [Mon, 21 Oct 2013 22:28:06 +0000 (00:28 +0200)]
Add optional dbus helpers

This adds optional libdbus integration for weston. If libdbus is available
and not disabled via --disable-dbus during weston build, we now provide
basic DBusConnection main-loop integration for weston.

The dbus.c file provides a new helper to integrate any DBusConnection
object into a wl_event_loop object. This avoids any glib/qt/..
dependencies but instead only uses the low-level libdbus library.

Note that we do not provide dummy fallbacks for dbus helpers in case
dbus-support is disabled. The reason for that is that you need dbus/dbus.h
for nearly any operation you want to do via dbus. Therefore, only the most
basic helpers which can be used independently provide a "static inline"
dummy fallback to avoid #ifdef all over the code.

11 years agowindow: Only clamp min size for windows with frame
Kristian Høgsberg [Mon, 21 Oct 2013 22:23:17 +0000 (15:23 -0700)]
window: Only clamp min size for windows with frame

Also fix width/height typo.

11 years agoweston-launch: Use /bin/sh for launching weston
Kristian Høgsberg [Mon, 21 Oct 2013 22:14:44 +0000 (15:14 -0700)]
weston-launch: Use /bin/sh for launching weston

https://bugs.freedesktop.org/show_bug.cgi?id=68739

11 years agowindow: Set a minimum size for toytoolkit windows
Kristian Høgsberg [Mon, 21 Oct 2013 22:05:49 +0000 (15:05 -0700)]
window: Set a minimum size for toytoolkit windows

The decorations tiles start to overlap and look weird if we go below
200x200 size windows.  Just set that as a minimum size if the app
doesn't provide a bigger minimum size.

https://bugs.freedesktop.org/show_bug.cgi?id=66794

11 years agoudev-seat: Repick seat after a new device was added
Jonas Ådahl [Thu, 17 Oct 2013 21:04:08 +0000 (23:04 +0200)]
udev-seat: Repick seat after a new device was added

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
11 years agoinput: Unmap pointer sprite when no more pointer devices are connected
Jonas Ådahl [Thu, 17 Oct 2013 21:04:07 +0000 (23:04 +0200)]
input: Unmap pointer sprite when no more pointer devices are connected

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
11 years agoinput: Unset focus of seat device when releasing last reference
Jonas Ådahl [Thu, 17 Oct 2013 21:04:06 +0000 (23:04 +0200)]
input: Unset focus of seat device when releasing last reference

When the last input device with a certain capability is removed, unset
the focus of the seat device associated with the capability.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>