profile/ivi/weston-ivi-shell.git
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>
11 years agoevdev: Reference count input device's seat capabilities
Jonas Ådahl [Thu, 17 Oct 2013 21:04:05 +0000 (23:04 +0200)]
evdev: Reference count input device's seat capabilities

When the only input device of a certain seat capability is unplugged,
stop advertising the capability.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
11 years agocompositor-drm: Support configuring the framebuffer format from weston.ini
Kristian Høgsberg [Wed, 16 Oct 2013 23:31:42 +0000 (16:31 -0700)]
compositor-drm: Support configuring the framebuffer format from weston.ini

This patch adds a new weston.ini key, gbm-format, to the [core] section.
This new key can be rgb565, xrgb8888 or xrgb2101010, and makes the
compositor use the corresponding GBM format for the framebuffer.

11 years agocompositor-drm: Use a param struct for initialization like other backends
Kristian Høgsberg [Wed, 16 Oct 2013 23:15:11 +0000 (16:15 -0700)]
compositor-drm: Use a param struct for initialization like other backends

11 years agocompositor-drm: Make drm_output_check_scanout_format() work for all formats
Kristian Høgsberg [Wed, 16 Oct 2013 23:08:57 +0000 (16:08 -0700)]
compositor-drm: Make drm_output_check_scanout_format() work for all formats

This used to work only for ARGB8888 and XRGB8888 buffers, but this lets
us support pageflipping to any client buffer as long as it matches the
framebuffer format.

11 years agowindow: Set opaque region to window size if we're fullscreen
Kristian Høgsberg [Wed, 16 Oct 2013 23:06:18 +0000 (16:06 -0700)]
window: Set opaque region to window size if we're fullscreen

11 years agoshell: Add a new weston.ini to control the startup animation
Kristian Høgsberg [Wed, 16 Oct 2013 18:38:24 +0000 (11:38 -0700)]
shell: Add a new weston.ini to control the startup animation

The new key startup-animation in the [shell] section lets you
control the startup animation.  Default is fade, but with this patch
we can also do none, which just show the desktop as fast as possible.

11 years agocompositor: Stop the repaint loop if the compositor went to sleep
Kristian Høgsberg [Wed, 16 Oct 2013 18:10:12 +0000 (11:10 -0700)]
compositor: Stop the repaint loop if the compositor went to sleep

We check the state when we schedule a repaint, but we will still repaint
in weston_output_finish_frame() if a repaint is needed.  Now we check
whether we went to sleep while waiting for the page flip and stop repainting
in that case.

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

11 years agosimple-egl: Add support for using a 16 bpp EGLConfig
Kristian Høgsberg [Wed, 16 Oct 2013 05:03:31 +0000 (22:03 -0700)]
simple-egl: Add support for using a 16 bpp EGLConfig

11 years agofbdev: open launcher only once
David Herrmann [Tue, 15 Oct 2013 12:29:57 +0000 (14:29 +0200)]
fbdev: open launcher only once

We currently call launcher_connect() twice, which is redundant and
amazingly works (ugh?). Fix this and connect only once to the launcher.

11 years agoevdev: release devices on read() error
David Herrmann [Tue, 15 Oct 2013 12:29:56 +0000 (14:29 +0200)]
evdev: release devices on read() error

If read() fails without EAGAIN/EINTR, the device is very likely dead.
However, we must not remove the device as it might be muted/revoked. So we
simply remove the event-source to avoid polling the device and simply wait
for the udev-remove signal now.

Note that we cannot call evdev_device_destroy() as the caller created the
FD and might need custom code to close it (like weston_launcher_close()).

11 years agoevdev: Clear touch capability if we see a mouse-type button
Kristian Høgsberg [Mon, 14 Oct 2013 22:46:13 +0000 (15:46 -0700)]
evdev: Clear touch capability if we see a mouse-type button

If an input device has BTN_LEFT (typically) it's not a touch screen but
a touch pad.

11 years agoevdev: Only init a pointer if the evdev device has a button
Kristian Høgsberg [Mon, 14 Oct 2013 22:32:08 +0000 (15:32 -0700)]
evdev: Only init a pointer if the evdev device has a button

We used to test for abs | rel | button,  which inits a pointer device for
a device with just rel or abs capabilities.  We now make sure we have either
rel or abs as well as button.

11 years agoevdev: Stop looking for pointer buttons when we get to BTN_JOYSTICK
Kristian Høgsberg [Mon, 14 Oct 2013 22:28:01 +0000 (15:28 -0700)]
evdev: Stop looking for pointer buttons when we get to BTN_JOYSTICK

We don't want to mark a touchscreen as a button device just because it
exposes the BTN_TOUCH and BTN_TOOL buttons.

11 years agogl-renderer: Build as a loadable module
Ander Conselvan de Oliveira [Mon, 14 Oct 2013 12:57:11 +0000 (15:57 +0300)]
gl-renderer: Build as a loadable module

The time spent loading EGL and GLES libraries from disk can be a
considerable hit in some embedded use cases. If Weston is compiled
with EGL support, the binary will depend on those libraries, even if
a software renderer is in use.

This patch splits the GL renderer into a separate loadable module,
and moves the dependency on EGL and GLES to it. The backends still
need the EGL headers for the native types and EGLint. The function
load_module() is renamed to weston_load_module() and exported, so
that it can be used by the backends.

The gl renderer interface is changed so that there is only one symbol
that needs to be dlsym()'d. This symbol contains pointers to all the
functions and data necessary to interact with the renderer. As a side
effect, this change simplifies gl-renderer.h a great deal.

11 years agobuild: Add dependency between libdrm and compositor for drm backend
Ander Conselvan de Oliveira [Mon, 14 Oct 2013 12:57:10 +0000 (15:57 +0300)]
build: Add dependency between libdrm and compositor for drm backend

The compositor uses libdrm in launcher-util.c if the drm backend is
built, but there was no explicit requirement in the build. egl brings
libdrm implicity so the build doesn't fail.

This patch adds an explicit dependency between the compositor and
libdrm if the drm backend is built, so that changes to the compositor
modules don't cause build failures.

11 years agolauncher: Drop unecessary checks for drm_fd == -1
Kristian Høgsberg [Mon, 14 Oct 2013 20:59:53 +0000 (13:59 -0700)]
launcher: Drop unecessary checks for drm_fd == -1

We never get into this case, and if we do, we just want to pass the invalid
fd through to the underlying ioctl and get the error that way."

11 years agolauncher: Fix reverted sense of drm_check_master() wrapper
Kristian Høgsberg [Mon, 14 Oct 2013 20:57:44 +0000 (13:57 -0700)]
launcher: Fix reverted sense of drm_check_master() wrapper

Also rename to drm_is_master() to make it clearer what we're checking.

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

11 years agoDon't remove the touch grab until the last touch point is removed
Neil Roberts [Thu, 3 Oct 2013 15:43:07 +0000 (16:43 +0100)]
Don't remove the touch grab until the last touch point is removed

Previously if you move a window around and temporarily add a second
finger then it will cancel the grab even though the original finger is
still held on the screen. It seems more robust to avoid cancelling the
grab until all fingers have been removed.

11 years agoOnly update the touch grab position for the first finger
Neil Roberts [Thu, 3 Oct 2013 15:43:06 +0000 (16:43 +0100)]
Only update the touch grab position for the first finger

Previously if you add a second finger while moving a window with a
touch grab then the position will keep jumping between the position of
each finger as you move them around. This patch changes it so that it
keeps track of the first touch id that starts the grab and only
updates the grab position when that finger moves.

11 years agoAdd a touch move binding
Neil Roberts [Thu, 3 Oct 2013 15:43:05 +0000 (16:43 +0100)]
Add a touch move binding

When holding the compositor super key the touch events can now be used
to move a window.

11 years agoAdd a touch binding to activate a surface
Neil Roberts [Thu, 3 Oct 2013 15:43:04 +0000 (16:43 +0100)]
Add a touch binding to activate a surface

Adds a new binding type for touch events via the new function
weston_compositor_add_touch_binding. The binding can only be added for
a touch down with the first finger. The shell now uses this to install
a binding to activate the current surface.

11 years agoxwm: Fall back to xcb_kill_client() if window does support WM_DELETE_WINDOW
Kristian Høgsberg [Mon, 14 Oct 2013 05:11:07 +0000 (22:11 -0700)]
xwm: Fall back to xcb_kill_client() if window does support WM_DELETE_WINDOW

11 years agoxwayland: Use decoration frame from cairo-util
Jason Ekstrand [Mon, 14 Oct 2013 00:08:41 +0000 (19:08 -0500)]
xwayland: Use decoration frame from cairo-util

In particular, this gives us a close button on xwayland windows.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agoUse cairo-util frame in tinytoolkit
Jason Ekstrand [Mon, 14 Oct 2013 00:08:40 +0000 (19:08 -0500)]
Use cairo-util frame in tinytoolkit

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agoAdd decoration frame support to cairo-util
Jason Ekstrand [Mon, 14 Oct 2013 00:08:39 +0000 (19:08 -0500)]
Add decoration frame support to cairo-util

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agoRename frame_create and frame_set_child_size with a window_ prefix
Jason Ekstrand [Mon, 14 Oct 2013 00:08:38 +0000 (19:08 -0500)]
Rename frame_create and frame_set_child_size with a window_ prefix

This is to avoid a collision with an actual frame structure.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
11 years agoxwm: Redirect root window subwindows
Kristian Høgsberg [Fri, 11 Oct 2013 23:48:19 +0000 (16:48 -0700)]
xwm: Redirect root window subwindows

xwayland no longer does this for us, we have to request it now

11 years agofbdev: Fix compilation without EGL
Kristian Høgsberg [Fri, 11 Oct 2013 22:25:42 +0000 (15:25 -0700)]
fbdev: Fix compilation without EGL

We have to duplicate #defines and typedefs for the EGL types and constants
we use in gl-renderer.h so we can compile the fbdev backend without EGL.

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

11 years agocompositor-drm: fix EGL format type
Alexandru DAMIAN [Wed, 2 Oct 2013 16:51:05 +0000 (17:51 +0100)]
compositor-drm: fix EGL format type

EGLInt is not always uint32_t so we need
to make sure we use the right int size for the format.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
11 years agoclients: Update .gitignore for weston-multi-resource
Stefan Schmidt [Thu, 10 Oct 2013 13:28:30 +0000 (14:28 +0100)]
clients: Update .gitignore for weston-multi-resource

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
11 years agoxwayland: Remove unused call weston_wm_handle_configure_notify.
Stefan Schmidt [Thu, 10 Oct 2013 13:28:29 +0000 (14:28 +0100)]
xwayland: Remove unused call weston_wm_handle_configure_notify.

We get the child position but never use this information here. Just remove it.
Spotted by Christopher Michael.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
11 years agocompositor-drm: Avoid output_destroy happened before page_flip event
Xiong Zhang [Fri, 11 Oct 2013 06:43:07 +0000 (14:43 +0800)]
compositor-drm: Avoid output_destroy happened before page_flip event

Currently there is no guarentee that output remove event always happend after
page_flip event on the same output. So if the following situation occur:

  first: unplug a output
  second: output remove event arrive, output_destrory called adn free output
  third: page_flip event arrive on the destroyed output

the segment fault will happpen in page_flip_handler().

This patch add a variable drm_compositor->destroy_pending, if page flip
event is pending when output remove event arrive, output_destroy will be
delayed until page flip finished.

Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
11 years agomulti-resource: Don't include non-existing xmalloc.h
Kristian Høgsberg [Fri, 11 Oct 2013 02:21:05 +0000 (19:21 -0700)]
multi-resource: Don't include non-existing xmalloc.h

It existed on my local disk, of course.  Just copy over xzmalloc().

11 years agolauncher: Wrap drmGetMagic and drmAuthMagic so we can build without libdrm
Tomeu Vizoso [Wed, 9 Oct 2013 09:30:57 +0000 (11:30 +0200)]
launcher: Wrap drmGetMagic and drmAuthMagic so we can build without libdrm

11 years agorpi: Remove redundant cast
Tomeu Vizoso [Wed, 9 Oct 2013 09:29:45 +0000 (11:29 +0200)]
rpi: Remove redundant cast

11 years agoweston-test-client-helper: Use wl_fixed_to_double() when printing axis value
Kristian Høgsberg [Wed, 9 Oct 2013 21:23:00 +0000 (14:23 -0700)]
weston-test-client-helper: Use wl_fixed_to_double() when printing axis value

11 years agoweston-test-client-helper.c: Assert on failed allocations
Kristian Høgsberg [Wed, 9 Oct 2013 21:01:23 +0000 (14:01 -0700)]
weston-test-client-helper.c: Assert on failed allocations

11 years agovaapi-recorder: Don't leak fd on thread error path
Kristian Høgsberg [Wed, 9 Oct 2013 20:48:09 +0000 (13:48 -0700)]
vaapi-recorder: Don't leak fd on thread error path

If we successfully open the file but fail to create the thread we
leak the fd.

11 years agotests: Assert surface creation succeeds
Kristian Høgsberg [Wed, 9 Oct 2013 20:37:43 +0000 (13:37 -0700)]
tests: Assert surface creation succeeds

11 years agonested: Cast away warnings for differing arguments to eglQueryWaylandBufferWL
Kristian Høgsberg [Wed, 9 Oct 2013 20:34:35 +0000 (13:34 -0700)]
nested: Cast away warnings for differing arguments to eglQueryWaylandBufferWL

11 years agonested: Free client struct on launch_client error paths
Kristian Høgsberg [Wed, 9 Oct 2013 20:30:58 +0000 (13:30 -0700)]
nested: Free client struct on launch_client error paths

11 years agonested-client: Exit if we fail to create the nested client struct
Kristian Høgsberg [Wed, 9 Oct 2013 20:25:58 +0000 (13:25 -0700)]
nested-client: Exit if we fail to create the nested client struct

11 years agomulti-resource: Use xzmalloc() instead of malloc+memset and calloc
Kristian Høgsberg [Wed, 9 Oct 2013 20:09:51 +0000 (13:09 -0700)]
multi-resource: Use xzmalloc() instead of malloc+memset and calloc

11 years agolauncher: Remove left-over debug logging
Kristian Høgsberg [Wed, 9 Oct 2013 20:10:42 +0000 (13:10 -0700)]
launcher: Remove left-over debug logging

11 years agotablet-shell: Avoid leaking icon or path strings from invalid launcher section
Kristian Høgsberg [Wed, 9 Oct 2013 20:05:55 +0000 (13:05 -0700)]
tablet-shell: Avoid leaking icon or path strings from invalid launcher section

11 years agowindow.c: Free cursor theme name once we're done with it
Kristian Høgsberg [Wed, 9 Oct 2013 20:02:04 +0000 (13:02 -0700)]
window.c: Free cursor theme name once we're done with it

11 years agoweston-launch: Only store drm fd if we successfully opened and stat'ed it
Kristian Høgsberg [Wed, 9 Oct 2013 18:25:14 +0000 (11:25 -0700)]
weston-launch: Only store drm fd if we successfully opened and stat'ed it

11 years agolauncher: Don't leak tty file descriptor on error
Kristian Høgsberg [Wed, 9 Oct 2013 18:19:11 +0000 (11:19 -0700)]
launcher: Don't leak tty file descriptor on error

11 years agolauncher: Don't leak tty file descriptor on launcher destroy
Kristian Høgsberg [Wed, 9 Oct 2013 18:03:39 +0000 (11:03 -0700)]
launcher: Don't leak tty file descriptor on launcher destroy

11 years agocompositor-fbdev: Fix a fd leak in the fbdev backend
Kristian Høgsberg [Wed, 9 Oct 2013 16:59:06 +0000 (09:59 -0700)]
compositor-fbdev: Fix a fd leak in the fbdev backend

fbdev_frame_buffer_map() closes the fb fd, so we have to close it
manually in case we're using the hybris renderer (ie !pixman).

11 years agoconfigure.ac: Bump version to 1.3
Kristian Høgsberg [Wed, 9 Oct 2013 23:20:50 +0000 (16:20 -0700)]
configure.ac: Bump version to 1.3

11 years agoRevert "Resize the shell when the mode is switched"
Kristian Høgsberg [Wed, 9 Oct 2013 22:17:01 +0000 (15:17 -0700)]
Revert "Resize the shell when the mode is switched"

This breaks panel resizing as it doesn't account for output rotation.

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

This reverts commit a356f7b1ef08fd9c2ad69cada89d68841e71a6bb.

11 years agoinput: Don't send modifiers if client doesn't have a pointer resource
Kristian Høgsberg [Wed, 9 Oct 2013 17:54:03 +0000 (10:54 -0700)]
input: Don't send modifiers if client doesn't have a pointer resource

This fixes an uninitialized serial error, were we could send out the
modifier event even if the client didn't have a pointer resource.  We
send out the modifier event to let clients know the modifer mask when
they receive a pointer button event.  Thus, if the client doesn't have
a pointer we don't need to send the modifier event.

Additionally we would send out the modifier event with an
uninitialized serial number.

Finally, this commit restores the order of sending the modifier event
before the enter, like it used to be.  Not likely to be an issue,
since the client will always receive the modifier event before any
button event, but it's a little nicer to give the client the modifier
events before it receives any pointer events.

11 years agorpi: Add support for EGL buffers
Tomeu Vizoso [Mon, 7 Oct 2013 09:02:20 +0000 (11:02 +0200)]
rpi: Add support for EGL buffers

The EGL implementation on the RPi allocates a front and a back
DispmanX resources for each EGLSurface, which we composite along
the others.

11 years agoconfigure.ac: Bump version to 1.2.92
Kristian Høgsberg [Thu, 3 Oct 2013 05:14:23 +0000 (22:14 -0700)]
configure.ac: Bump version to 1.2.92

11 years agolauncher: Print a more descriptive error message when we don't get a VT
Kristian Høgsberg [Wed, 2 Oct 2013 20:06:02 +0000 (13:06 -0700)]
launcher: Print a more descriptive error message when we don't get a VT

weston-launch has two supported use cases now: either launch from
and VT login as a regular user (running within that session) or
from an init script (systemd or such) with the -u option to create
a session for the specified user.  Running from within X or ssh is
not possible.  It's still possible to run weston as root from X or ssh
but that's strictly a development/debug/test feature.

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

11 years agolauncher: Add back support for specifying VT to run on
Kristian Høgsberg [Wed, 2 Oct 2013 17:53:33 +0000 (10:53 -0700)]
launcher: Add back support for specifying VT to run on

This is only available when running weston directly as root typically for
ssh logins.  It's a somewhat destructive option, as it will take over any
existing VT completely, unless there's already an display server running
there.

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

11 years agolauncher: Bail out if we can't be drm master
Kristian Høgsberg [Wed, 2 Oct 2013 17:49:05 +0000 (10:49 -0700)]
launcher: Bail out if we can't be drm master

If we can't be drm master, we won't be able to do anything useful with
the drm device.

11 years agolauncher: Set make sure we're drm master when opening the drm device
Kristian Høgsberg [Tue, 1 Oct 2013 22:37:09 +0000 (15:37 -0700)]
launcher: Set make sure we're drm master when opening the drm device

In case we try to run on a tty where some other process is already
drm master, back off and exit with an error message.

11 years agolauncher: Fail weston_launcher_create() if tty setup fails
Kristian Høgsberg [Tue, 1 Oct 2013 19:54:55 +0000 (12:54 -0700)]
launcher: Fail weston_launcher_create() if tty setup fails

11 years agoSet new state before emitting wake signal in weston_compsitor_wake
Neil Roberts [Mon, 30 Sep 2013 12:14:47 +0000 (13:14 +0100)]
Set new state before emitting wake signal in weston_compsitor_wake

The wake handler set up by the shell will try to unlock the screen
which works by setting up an animation which fades in the display. The
animation is started by first scheduling a repaint. Subsequent
repaints are scheduled whenever the previous frame is finished.
However in the case of the wake up signal the state is still
WESTON_COMPOSITOR_SLEEPING when the animation is started.
weston_output_schedule_repaint() ignores attempts to schedule a
repaint if the compositor is sleeping which means the animation never
gets run and will never complete.

The animation gets unstuck and continues if anything else schedules a
repaint after the state has been changed so the bug only gets hit in
certain conditions. The first wake up creates the lock surface which
causes a redraw when the first buffer is attached so the first wake up
is always ok. A redraw can be triggered in the subsequent wake ups
just by moving the mouse.

A good way to trigger the bug is to try to wake up the compositor by
pressing the shift key. If you let the compositor go back to sleep
after waking it up without unlocking it, the second press of the shift
key will not cause a redraw so the animation will not run and it won't
fade in.

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

11 years agoweston-egl: Update weston-egl-ext.h: s/wl_buffer/wl_resource
Tomeu Vizoso [Tue, 1 Oct 2013 10:27:19 +0000 (12:27 +0200)]
weston-egl: Update weston-egl-ext.h: s/wl_buffer/wl_resource

As struct wl_buffer has been deprecated since 1.2.

11 years agoweston-launch: Only drop privileges if running as root
Tomeu Vizoso [Tue, 1 Oct 2013 10:20:29 +0000 (12:20 +0200)]
weston-launch: Only drop privileges if running as root

11 years agocompositor: fix typo in error message
Aaron Faanes [Tue, 1 Oct 2013 03:06:39 +0000 (22:06 -0500)]
compositor: fix typo in error message

11 years agolauncher-util: pull in drm only for compositor-drm
Adrian Negreanu [Fri, 27 Sep 2013 17:58:45 +0000 (20:58 +0300)]
launcher-util: pull in drm only for compositor-drm

Add drm_set_master and drm_drop_master
as wrappers for drm(Set|Drop)Master, when building compositor-drm
or as empty functions otherwise.

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
11 years agoResize the shell when the mode is switched
Hardening [Mon, 23 Sep 2013 22:45:53 +0000 (00:45 +0200)]
Resize the shell when the mode is switched

Resize the panel and the background when we're notified of a mode
switch.

11 years agoconfig: Don't crash if we don't have a config file
Alexandru DAMIAN [Thu, 26 Sep 2013 09:27:16 +0000 (10:27 +0100)]
config: Don't crash if we don't have a config file

Adding a check in weston_config_full_path so that
we don't crash if we started without a config file.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
11 years agocompositor-fbdev: drop dependency on libdrm
Adrian Negreanu [Thu, 26 Sep 2013 16:31:32 +0000 (19:31 +0300)]
compositor-fbdev: drop dependency on libdrm

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
11 years agocompositor: check if seteuid worked
Alexandru DAMIAN [Wed, 25 Sep 2013 13:47:47 +0000 (14:47 +0100)]
compositor: check if seteuid worked

Checking the return value from seteuid in
order to not launch clients with the wrong effective uid.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
11 years agocompositor-drm: Match the EGLConfig native visual ID if it has one
Kristian Høgsberg [Wed, 25 Sep 2013 22:46:42 +0000 (15:46 -0700)]
compositor-drm: Match the EGLConfig native visual ID if it has one

We'll add the GBM format code as the native visual ID for EGLConfigs
when running on GBM.  This patch lets the drm backend pass in the
format code it's using with KMS and make sure we get a confing that
matches.  In the future, mesa will add support for 10 bpc configs
which will match the "at least 8 color bits" requirement.  By also
matching the native visual ID, we avoid rendering XRGB2101010 into a
XRGB8888 KMS framebuffer.

11 years agoevdev: Process touch up events of single-touch devices
Neil Roberts [Tue, 24 Sep 2013 19:05:07 +0000 (20:05 +0100)]
evdev: Process touch up events of single-touch devices

Previously only the touch up key event was used for single-touch
devices and the touch down event was generated on the first motion
event. This was breaking if the touch up and down events were sent
without a motion in-between because the evdev driver wouldn't generate
a touch down event and Weston would lose track of the number of touch
points that are down. This patch changes it to track the up and down
key events as pending events similar to how it does for multi-touch
devices.

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