Marek Chalupa [Wed, 12 Aug 2015 07:55:12 +0000 (09:55 +0200)]
xwm: flush xcb connection only when we processed some event
xwayland source is checked, so it dispatches twice on any event.
If the other turn has no events to dispatch, we flush the connection
redundantly
v2. do not flood logs with 'unhandled event' messages
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Seedo Eldho Paul [Fri, 4 Sep 2015 18:17:09 +0000 (23:47 +0530)]
tests: Convert 'xalloc's to 'zalloc's
xalloc terminates the program abruptly if the requested amount of
memory couldn't be allocated. To insure that the errors are handled
cleanly, use zalloc instead.
Signed-off-by: Seedo Eldho Paul <seedoeldhopaul@gmail.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Fri, 11 Sep 2015 19:28:15 +0000 (14:28 -0500)]
clients: ungrab the correct input when menus close
We need to input_ungrab() on the stored input, not the one that caused
the release - otherwise bad things can happen in multi-seat environments
when a seat that didn't open the menu closes it.
To reproduce:
configure two seats
launch weston terminal
open the right click pop up
select a menu item from the other seat
The next click from the seat that opened the menu will cause a segfault.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
John-John Tedro [Sun, 20 Sep 2015 00:47:37 +0000 (02:47 +0200)]
ivi-shell: initialize all fields in create_layout_transition
create_layout_transition does not initialize is_transition_func.
This patch initializes it to NULL.
Signed-off-by: John-John Tedro <johnjohn.tedro@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Lucas Tanure [Sun, 20 Sep 2015 14:12:50 +0000 (11:12 -0300)]
vaapi-recorder: Fix allocator sizeof operand mismatch
Result of 'calloc' is converted to a pointer of type 'unsigned int', which is
incompatible with sizeof operand type 'int'
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Lucas Tanure [Sat, 19 Sep 2015 21:24:58 +0000 (18:24 -0300)]
ivi_layout_surface_add_notification: Fix potential leak of memory pointed to by 'notification'
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Lucas Tanure [Mon, 21 Sep 2015 17:10:33 +0000 (14:10 -0300)]
ivi-layout-transition: Fix potential leak of memory pointed to by transition
Check if layout_transition_register worked, otherwise destroy transition
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Lucas Tanure [Mon, 21 Sep 2015 17:10:32 +0000 (14:10 -0300)]
ivi-layout-transition: Change layout_transition_register return type
layout_transition_register could not work and we need to free trans in
the calling function.
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Lucas Tanure [Mon, 21 Sep 2015 14:24:35 +0000 (11:24 -0300)]
ivi-layout-transition: Fix potential leak of memory pointed to by transition
Free transition before return. We don't need to use layout_transition_destroy,
because transition was not registered yet.
v2: consolidate memory leaks fixes
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Bryce Harrington [Tue, 22 Sep 2015 20:40:43 +0000 (13:40 -0700)]
releasing: Update command path to reflect new scripts dir in wayland-web
Bryce Harrington [Tue, 22 Sep 2015 20:38:12 +0000 (13:38 -0700)]
configure.ac: bump to version 1.9.90 for open development
Master is open for new feature development again.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Bryce Harrington [Tue, 22 Sep 2015 01:11:26 +0000 (18:11 -0700)]
configure.ac: bump to version 1.9.0 for the official release
Bryce Harrington [Thu, 17 Sep 2015 23:33:48 +0000 (16:33 -0700)]
releasing: Note need for pgp signing announcement
Bryce Harrington [Wed, 16 Sep 2015 03:20:37 +0000 (20:20 -0700)]
configure.ac: bump to version 1.8.93 for the RC1 release
Derek Foreman [Fri, 11 Sep 2015 19:27:40 +0000 (14:27 -0500)]
clients: If available, prefer top level surfaces for move or rotate
This stops us from rotating or moving pop-up menus by instead rotating
their parents.
This is easiest to see using a multi-seat configuration.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Fri, 11 Sep 2015 19:30:39 +0000 (14:30 -0500)]
shell: Make sure we actually have a resource in end_busy_cursor
It's actually possible to get here after the surface has been destroyed,
especially when running client apps under valgrind.
That probably shouldn't be able to segfault the compositor.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
John Sadler [Sat, 5 Sep 2015 14:01:38 +0000 (15:01 +0100)]
rpi: fix segfault at startup in rpi_flippipe_init() v2
When running with the RPi backend, Weston now segfaults at startup on the
line:
flippipe->clk_id = output->base.compositor->presentation_clock;
in `rpi_flippipe_init()`.
This is because `output->base.compositor` is NULL. This problem did not
exist on 1.8.0, and it looks like it may have been introduced by
954f183e2f.
This commit ensures that the `compositor` is initialised in `rpi_backend`
and that flippipe init uses the compositor pointer from backend.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91885
Signed-off-by: John Sadler <deathofathousandpapercuts@gmail.com>
Changes in v2:
- fix summary to not break the build
- use output->backend->compositor in rpi_flippipe_init() instead of
output->base.compositor. The latter is set by weston_output_init()
which gets called later than rpi_flippipe_init().
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: John Sadler <deathofathousandpapercuts@gmail.com>
Derek Foreman [Wed, 2 Sep 2015 21:21:54 +0000 (16:21 -0500)]
terminal: Don't crash when selecting non-ascii characters
So it turns out if you cat /dev/urandom and drag select in the mess
you can crash weston-terminal. There may also be more legitimate
ways of doing this.
The reason is that isalpha() and isdigit() only accept values that
fit within an unsigned char or are EOF.
By treating values < 0 the same as values > 127 we prevent this crash.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Wed, 2 Sep 2015 18:45:20 +0000 (13:45 -0500)]
compositor-fbdev: Remove bizarre division by sizeof
Really not sure why this was even here - it worked because
we were dividing by 1.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Pekka Paalanen [Mon, 7 Sep 2015 12:38:43 +0000 (15:38 +0300)]
Revert "compositor-drm: disable hardware cursors"
This reverts commit
6858383d51b12632481370fdc7d886a1e6bb4ebd.
The main reason for the original patch was a regression on the Intel
drivers causing compositor framerate to drop to half during cursor
updates or motion. The Intel problem was fixed in
https://github.com/torvalds/linux/commit/
2e7f43c41c042d6fed4d67aceeaae32d8f102e98
The fix is included in Linux 4.1-rc6 and 4.0.5.
The comment in the original patch is still true, but arguably the
possible minor glitches with cursor updates are less bad than not using
cursor planes at all.
Cc: nerdopolis <bluescreen_avenger@verizon.net>
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Giulio Camuffo <giuliocamuffo@gmail.com>
Cc: David FORT <contact@hardening-consulting.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Bryce Harrington [Wed, 9 Sep 2015 02:24:12 +0000 (19:24 -0700)]
clients: Fix height typo in clamp_view()
We should be checking our scaled image height against the allocation
height rather than the allocation width.
Fixes vertical image motion when horizontal motion restricted, i.e.
when window is wide and short compared to the image.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
John Sadler [Sat, 5 Sep 2015 14:01:40 +0000 (15:01 +0100)]
rpi: prevent segfault on shut-down due to NULL backend
When running with the RPi backend, Weston sefaults during shutdown. This is
due to the fact that `compositor->backend` is never initialised, and there
is no NULL check prior to calling `destroy()`.
This commit fixes the issue by making `rpi_backend_create()` intialise
`compositor->backend` - just like the X11 backend does.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91886
Signed-off-by: John Sadler <deathofathousandpapercuts@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
John Sadler [Sat, 5 Sep 2015 14:01:39 +0000 (15:01 +0100)]
rpi: avoid segfault in rpir_view_compute_rects() when EGL client destroys buffer
This commit works-around a serious issue when running with the RPi backend.
When an EGL client shuts down and destroys it's EGL window, Weston dies with
a segmentation fault in the above function (because `buffer` is now NULL).
The addition of a simple NULL check avoids the problem.
This is a minor re-formatting of the patch already submitted here:
http://patchwork.freedesktop.org/patch/34885
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85167
Signed-off-by: John Sadler <deathofathousandpapercuts@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Bryce Harrington [Tue, 1 Sep 2015 23:58:25 +0000 (16:58 -0700)]
configure.ac: bump to version 1.8.92 for the beta release
Nobuhiko Tanibata [Mon, 24 Aug 2015 00:12:37 +0000 (09:12 +0900)]
hmi-controller: fix wrong width and height are set to a layer of workspace.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Nobuhiko Tanibata [Mon, 24 Aug 2015 00:12:23 +0000 (09:12 +0900)]
hmi-controller: fix the laucher layer width
A layer for workspace is used to display icons for invoking applications
in several pages. These pages are swapped from one to next page. The
width of the layer was decided as a size of screen before reading
weston.ini. This worked correctly because there was no feature of
clipping of layer so the width of layer was not taken account.
Now clipping feature is supported. So the width shall be set to correct
one after reading weston.ini.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Nobuhiko Tanibata [Mon, 24 Aug 2015 01:24:15 +0000 (10:24 +0900)]
ivi-layout: implement surface clipping
View clip region is set in surface-local coordinates. To compute that
region, the ivi-layer destination rectangle in the global coordinates
are transformed back into the surface-local coordinates.
The transformation is computed by first forming the transformation
matric for the forward mappings, and then inverting it. The inverse
matric is used to transform the destination rectangles to the
surface-local coordinate system. The intersection of the rectangles is
the view clip mask.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Pekka Paalanen [Mon, 24 Aug 2015 11:27:07 +0000 (14:27 +0300)]
build, compositor-drm: fix output name constants another way
Bumping libdrm requirement by 3 years just for output connector name
constants was a bit much. Fix the problem introduced in
89c49b3060a115e846ba1e7fbef94d14894244f2 by conditionally using the new
additions.
Both VIRTUAL and DSI came in the same libdrm commit
566c3ce877a4be72697e15cdfc421ce965f7c37d, so we check only for DSI.
This patch also reverts
faee330c5e027011941d50533156683be3a67ca3.
Reported-by: Eugen Friedrich <friedrix@gmail.com>
Cc: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Sat, 22 Aug 2015 04:06:02 +0000 (23:06 -0500)]
build: Require newer version of libdrm
commit
89c49b3060a115e846ba1e7fbef94d14894244f2 changed the way we name
outputs, but it also added the new output names VIRTUAL and DSI.
These aren't available until libdrm 2.4.59
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Jonas Ådahl [Mon, 26 Jan 2015 10:19:05 +0000 (18:19 +0800)]
clients: Drop deadlock circumvention hack now that we don't need it
mesa supports EGLSwapInterval 0 now, so lets remove this hack. As a
bonus we don't conflict with the XDG shell protocol that doesn't allow
committing a null-buffer, which was a side effect of this hack.
This patch reverts
e9297f8e7ee09fa39b1d4293fad6e97705ccff21. See that
commit for an explanation how this worked.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
[Pekka: added reference to the original commit]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Dawid Gajownik [Fri, 21 Aug 2015 03:20:54 +0000 (00:20 -0300)]
gl-renderer: gl_renderer_create display cleanup on error
Clean up display connection via eglTerminate() in case of EGL
initialisation error.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Wed, 19 Aug 2015 12:25:57 +0000 (15:25 +0300)]
compositor-drm: rename outputs to follow kernel style
The problem with the old table of names is that it contains duplicates.
It is possible to end up with multiple outputs with the same name. In
that case you cannot write individual configurations for these outputs
in weston.ini, because they are matched by the name.
Change all names to follow the kernel naming scheme set in
drivers/gpu/drm/drm_crtc.c. The snprintf format now follows the kernel
style, too. Use the DRM_MODE_CONNECTOR_* macros rather than implicit
table ordering.
Completely new entries in the table are "Virtual" and "DSI".
There should not be any gaps in the macro values, but if there are, deal
with a NULL entry.
Also change "UNKNOWN" to "UNNAMED" so it's easier to distinguish from
"Unknown" by the kernel.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89361
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Drew DeVault <sir@cmpwn.com>
Ucan, Emre (ADITG/SW1) [Thu, 20 Aug 2015 14:13:33 +0000 (14:13 +0000)]
ivi-shell: remove redundant wl_list_empty/init calls
Checking wl_list_empty() on a link offers no information: if it returns
true, wl_list_remove() is safe to do. If it returns false, you still do
not know if wl_list_remove() is safe; the link could be part of a list,
or the link could be "uninitialized" (e.g. just wl_list_remove()'d).
(From Pekka Paalanen's comment at
http://lists.freedesktop.org/archives/wayland-devel/2015-August/023987.html).
Calling wl_list_init just before wl_list_insert is redundant. Because
the links of the list are not read before it is overwritten by
wl_list_insert.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
[Pekka: line-wrapped commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Ucan, Emre (ADITG/SW1) [Thu, 20 Aug 2015 14:13:30 +0000 (14:13 +0000)]
ivi-shell: clear order.layer_list before reordering it
It is only possible to remove a layer from the order.layer_list of a
screen, when ivi_layout_screen_set_render_order is called with an empty
array. Therefore, list of layers are cumulated if the API is called
many times with different list of layers.
Change how the flags are set:
- Introduce the dirty parameter for triggering the render order change.
- IVI_NOTIFICATION_REMOVE/ADD flags are set only at commit_screen_list.
Checking wl_list_empty() on a link offers no information: if it returns
true, wl_list_remove() is safe to do. If it returns false, you still do
not know if wl_list_remove() is safe; the link could be part of a list,
or the link could be "uninitialized" (e.g. just wl_list_remove()'d).
(From Pekka Paalanen's comment at
http://lists.freedesktop.org/archives/wayland-devel/2015-August/023987.html).
Calling wl_list_init just before wl_list_insert is redundant. Because
the links of the list are not read before it is overwritten by
wl_list_insert.
Use assert to control if the ivilayer->order.surface_list is empty.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
[Pekka: line-wrapped commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Ucan, Emre (ADITG/SW1) [Thu, 20 Aug 2015 14:13:29 +0000 (14:13 +0000)]
ivi-shell: clear order.surface_list before reordering it
It is only possible to remove a surface from the order.surface_list of a
layer, when ivi_layout_layer_set_render_order is called with an empty
array. Therefore, list of surfaces are cumulated if the API is called
many times with different list of surfaces.
Change how the flags are set:
- Introduce the dirty parameter for triggering the render order change.
- IVI_NOTIFICATION_REMOVE/ADD flags are set only at commit_layer_list.
Checking wl_list_empty() on a link offers no information: if it returns
true, wl_list_remove() is safe to do. If it returns false, you still do
not know if wl_list_remove() is safe; the link could be part of a list,
or the link could be "uninitialized" (e.g. just wl_list_remove()'d).
(From Pekka Paalanen's comment at
http://lists.freedesktop.org/archives/wayland-devel/2015-August/023987.html).
Calling wl_list_init just before wl_list_insert is redundant, because
the links of the list are not read before it is overwritten by
wl_list_insert.
Use assert to control if the ivilayer->order.surface_list is empty.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
[Pekka: wrapped the commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
[Earlier version Reviewed-by: Nobuhiko Tanibata
<NOBUHIKO_TANIBATA@xddp.denso.co.jp>]
Ucan, Emre (ADITG/SW1) [Wed, 19 Aug 2015 11:25:01 +0000 (11:25 +0000)]
ivi-shell: bugfix, list of surfaces on a layer are cumulated when set render order is called several time in one commitchanges.
The final list of surfaces of set render order shall be applied. So link
of surfaces and list of surfaces in a layer shall be initialized. And
then the order of surfaces shall be restructured.
Use existing clear_surface_pending_list function to clear the list.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Tested-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Pekka Paalanen [Wed, 19 Aug 2015 10:52:47 +0000 (13:52 +0300)]
compositor-fbdev: fix VT switching crash
This bug was introduced in
954f183e2f9891b241c1efc0ea61ed56019a4326.
The session_notify() data was accidentally cast to fbdev_backend while
it is weston_compositor. This was possibly due to the code before the
mentioned commit casting data directly to fbdev_compositor without going
through the intended type first, which worked only because
weston_compositor was the first member in struct fbdev_compositor.
Fix the casts to be the right way around.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91654
Cc: nerdopolis1@verizon.net
Cc: Giulio Camuffo <giuliocamuffo@gmail.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Dawid Gajownik [Mon, 17 Aug 2015 21:46:43 +0000 (18:46 -0300)]
compositor-drm: cast surface to EGLNativeWindowType
gl_renderer_output_create expects `window_for_legacy' variable to be of
type EGLNativeWindowType, not EGLNativeDisplayType. This variable is
used later in eglCreateWindowSurface().
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Pekka Paalanen [Mon, 17 Aug 2015 06:59:13 +0000 (09:59 +0300)]
configure: fix enable_simple_intel_dmabuf_client=auto
When the user does not specify --enable nor
--disable-simple-intel-dmabuf-client, we want to autodetect based on
dependencies.
cb512c018e8db66574b4e0d1263c52a05267918c implemented this,
but forgot to actually enable it if the autodetect comes positive.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Bryce Harrington [Sun, 16 Aug 2015 21:17:17 +0000 (14:17 -0700)]
configure.ac: bump to version 1.8.91 for the alpha release
Bryce Harrington [Sun, 16 Aug 2015 21:16:26 +0000 (14:16 -0700)]
releasing: Soften suggestion to update the wayland version dependency
Bryce Harrington [Sun, 16 Aug 2015 21:00:05 +0000 (14:00 -0700)]
releasing: Update release names
Bryce Harrington [Fri, 14 Aug 2015 19:44:50 +0000 (12:44 -0700)]
Fix armhf configure breakage due to missing libdrm_intel package
The buildbots discovered that recent changes break on Ubuntu 15.04's
armhf images:
configure:16137: checking for SIMPLE_DMABUF_CLIENT
configure:16144: $PKG_CONFIG --exists --print-errors "wayland-client libdrm libdrm_intel"
Package libdrm_intel was not found in the pkg-config search path.
...
configure:16194: error: Package requirements (wayland-client libdrm libdrm_intel) were not met:
No package 'libdrm_intel' found
This patch was provided by Daniel Stone. I've not tested it other than
verifying it does not cause build problems on x86_64.
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Bryce Harrington [Fri, 14 Aug 2015 19:23:13 +0000 (12:23 -0700)]
Fix build breakage when using older gbm lacking dmabuf import
The buildbots discovered this issue on Ubuntu 14.04, which carries
libgbm 10.1.3-0ubuntu0.4. The dmabuf changes need gbm 10.2, so it fails
during build like this:
src/compositor-drm.c: In function ‘drm_output_prepare_overlay_view’:
src/compositor-drm.c:984:10: error: variable ‘gbm_dmabuf’ has
initializer but incomplete type
struct gbm_import_fd_data gbm_dmabuf = {
^
etc.
Proposed fix is to conditionalize the gbm fd import feature in
compositor-drm.
This fix was suggested by daniels. I set up a synthetic test
environment to reproduce the issue as found by the buildbots and tweaked
the patch to get it to build both with and without gbm 10.2.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
George Kiagiadakis [Thu, 12 Jun 2014 14:26:49 +0000 (16:26 +0200)]
clients: add simple-dmabuf client
v2:
- adapted to protocol changes
- added TODO comments
- minor clean-up
- change y-invert from per-plane boolean to per-buffer flag
v3:
- fix a typo: 1 -> i (noticed by Carlos Olmedo Escobar)
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 12 Jun 2014 14:12:12 +0000 (17:12 +0300)]
compositor-drm: dmabuf GBM import
v2:
- add TODO note about multi-planar import and how we should do it
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 12 Jun 2014 12:12:48 +0000 (15:12 +0300)]
compositor-drm: init linux_dmabuf support
v2 changes:
- only initialize linux_dmabuf if renderer supports it
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 12 Jun 2014 13:52:53 +0000 (16:52 +0300)]
compositor-x11: init linux_dmabuf support
v2 changes:
- only initialize linux_dmabuf if renderer supports it
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Thu, 12 Jun 2014 13:49:29 +0000 (16:49 +0300)]
gl-renderer: add dmabuf import
Import dmabuf as an EGLImage, and hold on to the EGLImage until we are
signalled a content change. On content change, destroy the EGLImage and
re-import to trigger GPU cache flushes.
We hold on to the EGLImage as long as possible just in case the client
does other imports that might later make re-importing fail.
As dmabuf protocol uses drm_fourcc codes, we need libdrm for
drm_fourcc.h. However, we are not doing any libdrm function calls, so
there is no new need to link to libdrm.
RFCv1 changes:
- fix error if dmabuf exposed unsupported
- always use GL_TEXTURE_EXTERNAL_OES with dmabuf
v2 changes:
- improve support check and error handling
- hold on to the imported EGLImage to avoid the dmabuf becoming
unimportable in the future
- send internal errors with linux_dmabuf_buffer_send_server_error()
- import EGL_EXT_image_dma_buf_import extension headers
- use heuristics to decide between GL_TEXTURE_2D and
GL_TEXTURE_EXTERNAL_OES
- add comment about Mesa requirements
- change y-invert from per-plane boolean to per-buffer flag
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Louis-Francis Ratté-Boulianne [Mon, 8 Jun 2015 13:37:05 +0000 (16:37 +0300)]
gl-renderer: introduce struct egl_image
This is a reference-counted holder of an EGLImage. For now, direct
EGLImage usage is simply converted to use egl_image. Use of reference
counting will come in a later patch.
v2:
- this is a new patch, split from gl-renderer dmabuf import support
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Mon, 29 Sep 2014 18:18:40 +0000 (14:18 -0400)]
dmabuf: implement linux_dmabuf extension
v2 changes:
- implement the revised protocol
- add basic sanity checks when creating buffer and check for support
- add way to attach user data to the dmabuf for renderer use
- bump max number of planes to 4 to follow DRM AddFb2 ioctl
- improve errors handling
- use separate linux_dmabuf_buffer fields for the different wl_resource
types
- as SERVER_ERROR code is no more, use a wl_display "generic" error for
emergency-disconneting a client we fail to process
- more documentation
- change y-invert from per-plane boolean to per-buffer flag
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Pekka Paalanen [Mon, 29 Sep 2014 18:08:29 +0000 (14:08 -0400)]
protocol: add linux_dmabuf extension (v3)
An experimental (hence the 'z' prefix) linux_dmabuf Wayland protocol
extension for creating dmabuf-based wl_buffers in a generic manner.
This does not include proper dmabuf metadata negotiation because
there is no way to communicate all dmabuf constraints from the
compositor to a client before-hand. The client has to create a
wl_buffer wrapping one or more dmabuf buffers and then listen at
the feedback object returned to know if the operation was successful.
RFCv1 changes (after a first draft without code):
- some renames of interfaces and argument, no semantic changes
- added destructor protocol to dmabuf_batch
- added feedback interface for buffer creation
v2 changes:
- use drm_fourcc.h as authoritative source for format codes
- add support for the 64-bit layout qualifier and y-inverted dmabufs
- simplify the 'add' request (no need to preserve fd numerical id)
- add explicit plane index in the 'add' request
- integrate the 'feedback' object events to the batch interface
- rename 'create_buffer' to 'create' and move it into the batch interface
- add requirements needed from the graphics stack and clients
- improve existing errors and add batch error codes
- removed error codes from the global interface
- improve documentation for arguments, enums, etc.
- rename dmabuf_batch to zlinux_buffer_params
- The y-inverted property makes more sense as a whole buffer property.
Y-flipping individual planes of the same buffer object is hardly useful.
The y-invert is also converted into a flag, so we may add more flags
later.
- add flags for interlaced buffer content
v3 changes:
- Apply Daniel Vetter's comments about wording on coherency.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Dawid Gajownik [Sun, 9 Aug 2015 15:50:40 +0000 (12:50 -0300)]
weston-launch: On error putenv returns a non-zero value
According to POSIX standard "upon successful completion, putenv() shall
return 0; otherwise, it shall return a non-zero value." Unlike in
setenv() we should not be checking only for negative values.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Dawid Gajownik [Fri, 7 Aug 2015 00:04:16 +0000 (21:04 -0300)]
compositor: fix crash when destroying incompletely created output
When the output can't be completely created in the backend (for example
lack of memory), weston_compositor_add_output() is never run. In such
a case output->link is not initialized. Letter, when
weston_output_destroy() is called, application crashes on
wl_list_remove(&output->link).
This problem happens when drm, fbdev, rdp, rpi or wayland backend is
used.
v2: Initialize output->link in weston_output_init() as suggested by
Derek Foreman.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Jason Ekstrand [Thu, 8 Jan 2015 16:57:44 +0000 (08:57 -0800)]
fullscreen-shell: Fix modeset on transformed outputs
Previously, we blindly created a mode for the output based on surface size
and completely ignoring the output transform. This caused modesets to fail
on outputs that were transformed by 90 or 270 degrees. We should be
swapping the width and the height in this case.
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Tested-by: Derek Foreman <derekf@osg.samsung.com>
Derek Foreman [Thu, 6 Aug 2015 17:19:51 +0000 (12:19 -0500)]
input: when destroying a seat, remove keyboard focus first
If we destroy all the devices before trying to remove keyboard focus
we'll segfault because we destroyed the keyboard.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Ryo Munakata <ryomnktml@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Dawid Gajownik [Thu, 6 Aug 2015 20:12:19 +0000 (17:12 -0300)]
Coding style fixes
- opening braces are on the same line as the if statement
- opening braces are not on the same line as the function name
- space between for/while/if and opening parenthesis
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Ryo Munakata [Fri, 7 Aug 2015 11:20:46 +0000 (20:20 +0900)]
Use [x]zalloc instead of [x]malloc + memset
Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Giulio Camuffo [Sun, 29 Mar 2015 11:20:23 +0000 (14:20 +0300)]
xwm: don't let X windows steal the focus
When we get a focus in event from an X window which is not the one
we last set as the active window, reset the focus.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Derek Foreman [Thu, 7 May 2015 16:54:18 +0000 (11:54 -0500)]
rpi-renderer: use weston_output matrix instead of a private matrix
We already do this math in compositor.c so let's not duplicate it here.
Additionally, the copy here has broken zoom, so this also fixes zooming.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Derek Foreman [Mon, 11 May 2015 20:40:11 +0000 (15:40 -0500)]
input: add a weston_pointer_clear_focus() helper function
Valgrind has shown that in at least one place (default_grab_pointer_focus)
we're testing uninitialized values coming out of weston_compositor_pick_view.
This is happening when default_grab_pointer_focus is called when there is
nothing on the view list, and during the first repaint when only the black
surface with no input region exists.
This patch adds a function to clear pointer focus and also set the sx,sy
co-ordinates to a sentinel value we shouldn't compute with.
Assertions are added to make sure any time pointer focus is set to NULL
these values are used.
weston_compositor_pick_view() now returns these values too.
Now the values are always initialized, even when no view exists, and
they're initialized in such a way that actually doing computation
with them should fail in an obvious way, but we can compare them
safely for equality.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Bill Spitzak [Thu, 6 Aug 2015 15:24:59 +0000 (16:24 +0100)]
test/ivi: include protocol headers for all used protocols
This seems like a good idea for consistency that the protocol header
is included for any protocols used by the code. This also means the
code will compile with headers generated by wayland-scanner -c.
Fixed to use angle brackets.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Giulio Camuffo [Wed, 8 Jul 2015 08:55:28 +0000 (11:55 +0300)]
input: pass the global touch coordinates to the touch grab
This makes it consistent with the pointer grab, which also gets
global coordinates and not surface relative ones, and allows to
easily filter out gestures based on compositor global hotspots.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Ryo Munakata [Sat, 25 Jul 2015 02:09:41 +0000 (11:09 +0900)]
compositor: remove a call to weston_compositor_schedule_repaint
In weston_compositor_create, we initialize output_list.
After that we call weston_compositor_schedule_repaint which just calls
weston_output_schedule_repaint on all elements of output_list.
This call does nothing obviously. So we remove it.
Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Reviewed-by: Guilio Camuffo <guiliocamuffo@gmail.com>
Derek Foreman [Wed, 5 Aug 2015 19:48:11 +0000 (14:48 -0500)]
desktop-shell: Make resize and move functions take a pointer instead of a seat
An earlier patch made surface_resize() and surface_move() take pointers
instead of seats, this updates the weston_shell_interface resize and move to
match.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
David FORT [Sat, 1 Aug 2015 22:35:30 +0000 (00:35 +0200)]
don't crash when the key file doesn't exist
This allows to close the remaining issue in
https://bugs.freedesktop.org/show_bug.cgi?id=91390
Reviewed-by: Daniel Stone <daniels@collabora.com>
Dawid Gajownik [Fri, 31 Jul 2015 03:02:28 +0000 (00:02 -0300)]
backends: don't destroy renderer and output twice
drm, fbdev, rpi and wayland backends are unnecessarily destroying
renderer and output before executing weston_compositor_shutdown()
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Dawid Gajownik [Wed, 5 Aug 2015 20:21:28 +0000 (17:21 -0300)]
compositor-rdp: rdp_destroy() double free error #91457
When something goes wrong during weston initialization,
weston_compositor_destroy() is executed. It destroys the backend and
then frees compositor memory. Unfortunately RDP backend is not correctly
destroyed. It frees compositor instead of a backend memory. This causes
later a double free error. The easiest way to reproduce a problem is to
run weston with an invalid option.
Additionally some other objects of rdp_backend structure are not
destroyed/freed. The patch fixes both issues.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91457
v3: comply with Weston coding style, this time for real
v2: comply with Weston coding style
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: David FORT <contact@hardening-consulting.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Dawid Gajownik [Sat, 1 Aug 2015 02:46:46 +0000 (23:46 -0300)]
screen-share: don't test keyboard/pointer pointers
Keyboards and pointers aren't freed when devices are removed, so we
should really be testing keyboard_device_count and pointer_device_count
in most cases, not the actual pointers. Otherwise we end up with
different behaviour after removing a device than we had before it was
inserted.
This commit makes screen-share.c compile once again after changes in
commit
1281a36e3bcd27345bd4a107f282213ecca56f0e.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Derek Foreman [Fri, 29 May 2015 15:46:44 +0000 (10:46 -0500)]
desktop-shell: drop shell_client from the head of the surface list on destroy
This prevents a use after free when the surfaces are automatically cleaned
up later, as shell_client's freed node was still in the surface list.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Dawid Gajownik [Sat, 1 Aug 2015 14:02:54 +0000 (11:02 -0300)]
compositor-rdp: free() can handle NULL pointers
There's no need to check if a pointer exists before passing it to free().
free() can handle NULL pointers.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-By: David FORT <contact@hardening-consulting.com>
Dawid Gajownik [Fri, 31 Jul 2015 20:39:00 +0000 (17:39 -0300)]
main: print backends in help message in alphabetical order
For better readability of `weston --help' output, backends are now sorted
in alphabetical order.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Dawid Gajownik [Fri, 31 Jul 2015 21:28:59 +0000 (18:28 -0300)]
.gitignore: ignore doxygen generated files v2
Fixes incorrect commit
d95637905861162c08251843acccc11e509b5d94
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Derek Foreman [Fri, 31 Jul 2015 21:55:32 +0000 (16:55 -0500)]
input: Don't test keyboard/pointer/touch pointers
Keyboards and pointers aren't freed when devices are removed, so we should
really be testing keyboard_device_count and pointer_device_count in most
cases, not the actual pointers. Otherwise we end up with different
behaviour after removing a device than we had before it was inserted.
This commit renames the touch/keyboard/pointer pointers and adds helper
functions to get them that hide this complexity and return NULL when
*_device_count is 0.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Derek Foreman [Wed, 15 Jul 2015 18:00:47 +0000 (13:00 -0500)]
fullscreen-shell: Test for device presence properly
We should be testing device counts, not pointers. The pointers are
persistent state that never gets freed, and are an inaccurate indicator
of device presence after the last release.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Derek Foreman [Wed, 15 Jul 2015 18:00:46 +0000 (13:00 -0500)]
desktop-shell: Check for device presence properly
We should be testing device counts, not pointers. The pointers are
persistent state that never gets freed, and are an inaccurate indicator
of device presence after a release.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Derek Foreman [Wed, 15 Jul 2015 18:00:45 +0000 (13:00 -0500)]
desktop-shell: Don't call wl_list_init() in the middle of a list
seat->keyboard_focus_listener.link isn't a head, it's just sometimes a
member of the focus signal list. Calling wl_list_init() on it puts
a loop in the list.
Instead, we remove the item then init it. That way we can call remove on
it again later even if it hasn't been re-added to a list.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Derek Foreman [Wed, 15 Jul 2015 18:00:44 +0000 (13:00 -0500)]
input: Check device counts in bind_seat()
We shouldn't be using seat->pointer|keyboard|touch here, we should be
testing *_device_count to see if a device is currently present.
Testing the pointers directly will result in incorrectly advertising
capabilities after all devices of a type have been removed.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Dawid Gajownik [Wed, 29 Jul 2015 03:55:55 +0000 (00:55 -0300)]
Update .gitignore
Hi,
after running configure with "Enable developer documentation" set to
"yes" git status warns about two new untracked files:
doc/doxygen/tooldev.doxygen
doc/doxygen/tools.doxygen
Below is a small patch.
HTH,
Dawid
Dawid Gajownik [Fri, 31 Jul 2015 17:49:57 +0000 (14:49 -0300)]
main: update RDP backend help message
`--env-socket' option is of type WESTON_OPTION_BOOLEAN, not
WESTON_OPTION_STRING. Socket should be defined in RDP_FD environment variable.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Bryce Harrington [Fri, 31 Jul 2015 01:17:29 +0000 (18:17 -0700)]
gitignore: Ignore some dist generated files
Derek Foreman [Thu, 23 Jul 2015 19:55:15 +0000 (14:55 -0500)]
zoom: Store the seat that initiated a zoom
Track the seat that initiated a seat instead of picking the first one.
Previously, if there are multiple seats then any seat can adjust the zoom
level but the zoom tracks the first seat's pointer.
Now the zoom will follow the pointer of the seat that initiated the zoom.
Additionally, if there's no pointer in the first seat, starting a zoom
with the second seat will no longer crash weston.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Derek Foreman [Thu, 23 Jul 2015 19:55:13 +0000 (14:55 -0500)]
zoom: Call weston_output_activate_zoom() appropriately
No longer call weston_output_update_zoom() when trying to zoom out
on an unzoomed output.
Add an assert() to make sure update_zoom is never called without an
active zoom.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Derek Foreman [Thu, 23 Jul 2015 19:55:14 +0000 (14:55 -0500)]
zoom: Rename zoom_area_center_from_pointer to zoom_area_center_from_point
It doesn't do anything with a pointer, and zoom can be initiated by the
keyboard, so the name was a little confusing.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Thu, 23 Jul 2015 19:55:12 +0000 (14:55 -0500)]
zoom: Change zoom->active to a bool
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
FORT David [Mon, 20 Jul 2015 12:39:21 +0000 (14:39 +0200)]
Fix crash when using RDP4 security
The initialization of the freerdp_peer was done too early.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=91390.
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
FORT David [Mon, 20 Jul 2015 12:39:20 +0000 (14:39 +0200)]
remove a warning during compilation
backend_init now returns an int not a pointer.
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Ross Burton [Fri, 17 Jul 2015 11:33:45 +0000 (12:33 +0100)]
build: mkdir target weston.ini directories before writing
In parallel out-of-tree builds it is possible for e.g. ivi-shell/weston.ini to
be written before ivi-shell/ exists. Solve this by creating the target
directory first.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Mario Kleiner [Sat, 18 Jul 2015 06:10:58 +0000 (08:10 +0200)]
cms-helper/static: Add "identity" builtin cms profile (v3)
Allows to force loading an identity gamma table if
option icc_profile= is given in weston.ini for
an output, ie., icc_profile= is specified to an
empty assignment.
Some special display output devices, e.g., for
neuro-science applications, and special display
testing hardware need a guaranteed perfect pixel
passthrough from framebuffer to output. This is
an easy way to set this up for cms-static.
v2: Remove confusing/redundant weston_log debug output.
v3: Don't use the "identity" keyword to trigger this, but
instead assignment of an empty string will trigger
loading of an identity LUT. Suggested by Derek Foreman.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Mario Kleiner [Sat, 18 Jul 2015 06:07:11 +0000 (08:07 +0200)]
cms-colord: Fix crash at compositor shutdown. (v2)
cms-colord used the weston_compositor destroy signal to
trigger its final colord_module_destroy cleanup, and the
wl_output destroy signal to trigger per output cleanup.
The problem is that the compositor destroy signal gets
emitted before the output destroy signals at compositor
shutdown, colord_module_destroy would free all its
shared data structures and then later on the output
destroy callback would try to access those shared
data structures when handling output destruction
-> Use after free -> Crash, usually with VT switching
dead and thereby an unuseable system requiring a reboot.
Solve this by moving the output destruction handling into
the colord_cms_output_destroy() cleanup function for
colord-cms own hash dictionary of all active outputs.
The output destroy callback just removes the corresponding
output from the dictionary and triggers proper cleanup if
an output is unplugged during runtime. During compositor
shutdown, the dictionary as a whole is released before
releasing all other shared data structures, thereby
triggering cleanup of all remaining outputs.
Tested to fix crashes on x11 and drm backends.
v2: Formatting: Wrap lines to < 80 characters, as suggested
by Derek. Thanks.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Derek Foreman [Mon, 20 Jul 2015 21:28:13 +0000 (16:28 -0500)]
desktop-shell: Put monitor to sleep when idle timer expires
Removing the screensaver had the accidental side effect of disabling
DPMS display shut down.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Mon, 8 Jun 2015 16:46:54 +0000 (11:46 -0500)]
compositor: Respect WESTON_BUILD_DIR env var in weston_load_module
We were loading modules out of the system dirs unconditionally, so
tests that loaded modules would use the system ones, or fail if
they weren't installed.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-By: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Tue, 26 May 2015 21:21:05 +0000 (16:21 -0500)]
exposay: Fix use after free when a view is destroyed during animation
Moving the destroy listener setup allows the animation completion handler
to be called before we free any structures it needs.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Derek Foreman [Sat, 18 Jul 2015 01:58:02 +0000 (20:58 -0500)]
exposay: Fix logic inversion when ending keyboard grabs
I flipped a ! in
cee82d62865ab5b239935f102c2e1f7868e0fa65
and the exposay keyboard grab became permanent.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Derek Foreman [Tue, 5 May 2015 20:01:52 +0000 (15:01 -0500)]
input: make a function for device removal
Break device_removed() out into its own function like device_added().
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Wed, 22 Apr 2015 22:23:35 +0000 (17:23 -0500)]
window: Use wl_cursor_frame_and_duration() for mouse cursor updates
Some animated cursor sets use very long delays, but until now we'd use the
frame callback and update the cursor at the display framerate anyway.
Now we use a timerfd to drive cursor animation if the delay is longer
than 100ms, or the old method for short delays.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Derek Foreman [Wed, 15 Apr 2015 17:23:56 +0000 (12:23 -0500)]
desktop-shell: use work area instead of panel size to constrain moves
This fixes the case where an output isn't at y = 0, where the panel height
isn't correct for constraints.
It also kills a bug - moving a window with a mod-drag off the top of the
screen clamped earlier than it should.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Wed, 15 Apr 2015 17:23:55 +0000 (12:23 -0500)]
desktop-shell: use output position in get_output_panel_size()
The panel size calculation needs to take the output position into account
or it's only correct when the output is at 0, 0.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Derek Foreman [Wed, 15 Apr 2015 17:23:54 +0000 (12:23 -0500)]
desktop-shell: add output co-ordinates to get_output_work_area()
get_output_work_area() now returns the absolute work area including the
output's offset.
This will make math a little simpler later when we use it to constrain
window moves.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Bryce Harrington [Sat, 11 Jul 2015 02:51:52 +0000 (19:51 -0700)]
logind-util: Use %u for unsigned int in snprintf
Addresses this warning found by Denis Denisov:
[src/logind-util.c:702]: (warning) %d in format string (no. 1)
requires 'int' but the argument type is 'unsigned int'.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>