Commit graph

5603 commits

Author SHA1 Message Date
Quentin Glidic 9c36eb912e
zunitc/junit-reporter: Silence pointer-sign warning
/usr/x86_64-pc-linux-gnu/include/libxml2/libxml/xmlstring.h:35:18:
warning: pointer targets in passing argument 3 of 'xmlStrPrintf' differ
in signedness [-Wpointer-sign]
 #define BAD_CAST (xmlChar *)
                  ^
tools/zunitc/src/zuc_junit_reporter.c:77:41: note: in expansion of macro
'BAD_CAST'
  xmlStrPrintf(scratch, sizeof(scratch), BAD_CAST %d, value);
                                         ^~~~~~~~
/usr/x86_64-pc-linux-gnu/include/libxml2/libxml/xmlstring.h:98:17: note:
expected 'const char *' but argument is of type 'xmlChar * {aka unsigned
char *}'
                 xmlStrPrintf             (xmlChar *buf,

Warning produced by GCC 5.3, 6.1 and Clang 3.8.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
Tested-by: Armin Krezović <krezovic.armin@gmail.com>
2016-09-24 11:46:36 +02:00
Giulio Camuffo 148c1992ac
compositor: set the opaque region for some views with transform
If the transform on a view is only a translation we can trivially
set the opaque region for it so to optimize the rendering.
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-24 11:26:16 +02:00
Bryce Harrington 3578497990 configure: Also update libweston version to match weston 2016-09-22 17:38:39 -07:00
Bryce Harrington f314a0e2c6 configure.ac: bump version to 1.12.90 for open development
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2016-09-22 10:33:46 -07:00
Bryce Harrington a08dff5bce configure.ac: bump to version 1.12.0 for the official release 2016-09-20 12:22:46 -07:00
Quentin Glidic a56b053ee1
libweston-desktop: Fix configure event for already well-sized surfaces
Even if the surface size is already correct, we need to store the
configured size in case some other state change triggers a configure
event.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
2016-09-14 10:07:43 +02:00
Bryce Harrington 870f384d0e configure.ac: bump to version 1.11.94 for the RC2 release 2016-09-13 12:18:23 -07:00
Quentin Glidic 0abf8903cb
libweston-desktop/xdg_shell_v6: Raise errors on not-yet-possible requests
These requests need a mapped surface, which can only happen after the
initial configure event.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-12 16:51:13 +02:00
Quentin Glidic 3d7e60798a
libweston-desktop/xdg_shell_v6: Add surface as needed
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-12 16:46:49 +02:00
Quentin Glidic e30b5fb2e7
Revert "terminal: Fix crash due to race condition in init"
This reverts commit 5c611d933f.
2016-09-09 19:53:38 +02:00
Quentin Glidic 6967f0e2d2
libweston-desktop/xdg_shell_v5: Add surface as needed
This way we are sure the compositor is aware of a surface when we
forward a request for said surface.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-07 12:22:36 +02:00
Quentin Glidic 920cf048f3
desktop-shell: Add back the saved position and rotation for fullscreen/maximized
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-07 12:21:09 +02:00
Quentin Glidic 18a81acc17
desktop-shell: Unset fullscreen/maximized state on commit
This only stores the current state, as libweston-desktop is still in
charge of double-buffering it.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-07 12:21:05 +02:00
Bryce Harrington 631560790e configure.ac: bump to version 1.11.93 for the RC1 release 2016-09-06 14:47:33 -07:00
Emmanuel Gil Peyrot 85571a3002
compositor-wayland: Only destroy the egl_window when using GLES.
This prevents a segfault when unplugging an output when using pixman.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-09-02 22:15:59 +02:00
Quentin Glidic 1714f01e0c
libweston-desktop/xwayland: Do not over-destroy the view
With this weston_view_destroy() call, Xwayland popups make Weston freeze
in a busy-loop (probably corrupted wl_list).

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-09-01 01:26:07 +02:00
Bryce Harrington 5c611d933f
terminal: Fix crash due to race condition in init
weston-terminal intermittently crashes on startup.  This occurs because
some parameters in the weston_terminal structure such as data_pitch,
don't get set to non-zero until the resize_handler() callback gets
triggered.  That callback makes a call to terminal_resize_cells(), to
calculate the proper values for these parameters.

On occasion, the resize handler call is slow to resolve, and the program
proceeds to start processing characters for the terminal window.  With
the parameters defaulting to zero, certain calculations come out wrong,
leading the program to attempt to scroll the buffer when it shouldn't,
and thus follows the crash.

Instead, force the call to terminal_resize_cells() during the init, with
some dummy defaults, to ensure the parameters are always non-zero.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=97539
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-01 00:52:10 +02:00
Bryce Harrington c6ae8126e1
clients: Use ARRAY_LENGTH macro in weston-simple-im
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-01 00:47:18 +02:00
Bryce Harrington b0e4abd215 configure.ac: (Re-)bump to version 1.11.92 for the beta release 2016-08-30 12:11:43 -07:00
Bryce Harrington b3197f447e Revert "desktop-shell: Enable per-output fade animations"
This reverts commit fde5adbedb.

(Accidental landing)
2016-08-30 12:05:27 -07:00
Bryce Harrington 08976ac7bf Revert "compositor: Add internal support to track idle inhibition requests"
This reverts commit f8300c87d5.

(Accidental landing)
2016-08-30 12:05:16 -07:00
Bryce Harrington 873a3f8c4c Revert "compositor: Add public interface support for client-requested idle inhibition"
This reverts commit 689feced3c.

(Accidental landing)
2016-08-30 12:05:01 -07:00
Bryce Harrington c7001437ef Revert "libweston: Add a signal to fire when the idle inhibitor is dropped"
This reverts commit ca5b62426a.

(Accidental landing)
2016-08-30 12:04:50 -07:00
Bryce Harrington 097193369c Revert "libweston-desktop: Add listener and API to drop the idle inhibitor"
This reverts commit e7069bcf93.

(Accidental landing)
2016-08-30 12:04:37 -07:00
Bryce Harrington 0795ece4b2 Revert "shell: Inhibit idle fade-out behavior"
This reverts commit 9be807c69b.

(Accidental landing)
2016-08-30 12:04:26 -07:00
Bryce Harrington 6303d3ba7a Revert "clients: Add screensaver inhibitor client demo"
This reverts commit dfea66e780.

(Accidental landing)
2016-08-30 12:04:05 -07:00
Bryce Harrington d2bea6115a configure.ac: bump to version 1.11.92 for the beta release 2016-08-30 12:02:35 -07:00
Bryce Harrington 3ced1a0292 releasing: Fix incorrect direction about how many lines need tweaked 2016-08-30 12:00:38 -07:00
Bryce Harrington dfea66e780 clients: Add screensaver inhibitor client demo
Derive client from simple-shm and hook up the API defined in
wayland-protocols to allow client screensaver inhibition requests.

v5:
  + Add simple-idle client demo
  + Add command line options to delay creation/destruction of inhibitor

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-29 18:36:13 -07:00
Bryce Harrington 9be807c69b shell: Inhibit idle fade-out behavior
When a client has registered idle inhibition on a surface, don't trigger
the fade-out animation on the output(s) the surface is displayed on.
But when the surface is destroyed or the inhibitor itself is destroyed
by client request, re-queue the fade out animation.
2016-08-29 18:36:13 -07:00
Bryce Harrington e7069bcf93 libweston-desktop: Add listener and API to drop the idle inhibitor
Listen for the drop_idle_inhibitor signal from libweston, and propagate
the call to a corresponding libweston-desktop API.
2016-08-29 18:36:13 -07:00
Bryce Harrington ca5b62426a libweston: Add a signal to fire when the idle inhibitor is dropped 2016-08-29 18:36:13 -07:00
Bryce Harrington 689feced3c compositor: Add public interface support for client-requested idle inhibition
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

v5: Improve comments
2016-08-29 18:36:13 -07:00
Bryce Harrington f8300c87d5 compositor: Add internal support to track idle inhibition requests
Adds a helper routine weston_output_inhibited_outputs() which returns a
mask of outputs that should inhibit screen idling.

Use this routine to check for inhibiting outputs for handling of idle
behaviors in core:  In sleep mode, only halt repainting outputs that
don't have valid inhibits.  Don't send these monitors DPMS off commands
either, if the system would otherwise be powering them down.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

v5: Drop unused view variable
2016-08-29 18:36:13 -07:00
Bryce Harrington fde5adbedb desktop-shell: Enable per-output fade animations
Instead of creating a single global fade surface across all outputs,
create a separate surface for each output.  This will permit
e.g. individual fades for each output (or blocking the fade-outs if
inhibiting idling as will come in a latter patch.)

This also fixes a potential issue if on multihead layout spanning a
desktop wider than 8096 (or higher than 8096), the fade animation may
not completely cover all surfaces.

This assumes the output geometry doesn't change larger during the course
of the fade animation.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

v5:
  + Use the new libweston-desktop API for dropping idle inhibitor to
  	ensure fade_out gets triggered if the client destroys the inhibitor
  	early.
  + Fix a crash when running multi-head due to double free of animations
  + Split idle inhibition implementation to a subsequent patch
2016-08-29 18:36:13 -07:00
Quentin Glidic fff39817bc
libweston: Drop shell_interface
Its usage is now limited to some dock-related helper, and the plugin
registry is a better fit for that kind of helper.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
2016-08-27 18:45:38 +02:00
Bryce Harrington 96c6a798a5
config-parser: Drop debug text
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-08-27 18:14:45 +02:00
Quentin Glidic 561201c689
desktop-shell: Fix output destroying
Now we properly unregister from the panel/background surface destroy
signals if the output is destroyed first.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
2016-08-20 18:27:09 +02:00
Yong Bakos 4b6321f49a
compositor-drm: Zero drmModeAddFB2 data
Initialize arrays of data passed to drmModeAddFB2, just as
drm_fb_get_from_bo does.

See https://lists.freedesktop.org/archives/wayland-devel/2016-August/030645.html

Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-18 10:28:35 +02:00
Bryce Harrington eb07f3624d configure.ac: bump to version 1.11.91 for the alpha release 2016-08-16 11:51:53 -07:00
Quentin Glidic 6384edf025
libweston-desktop/{wl_shell, xwayland}: Fix changing between toplevel states
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
2016-08-16 11:57:21 +02:00
Quentin Glidic f6636a8dec
libweston-desktop/xwayland: Actually destroy the view
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-16 11:10:41 +02:00
Quentin Glidic f01ecee75a
libweston-desktop: Rename _destroy_view to _unlink_view
It doesn't destroy the view per se (except for internal surfaces) and
require the caller to also destroy the view itself at the appropriate
time.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-16 11:10:27 +02:00
Quentin Glidic 729c7fa788
desktop-shell: Properly destroy the weston_desktop_view
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-16 10:59:33 +02:00
Quentin Glidic 154c5d2304
Makefile.am: Fix libtool race
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-08-16 10:29:00 +02:00
Derek Foreman 2af7e208cf weston-editor: Close the data source after sending
We're leaking the fd when sending cut'n'paste.  Failure to close can also
makes the other end unhappy because it doesn't know the paste is finished.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-16 12:51:49 +08:00
Arnaud Vrac e91b6e9c62
fullscreen-shell: avoid access to freed data
Remove the output transform from the view transform list when its
surface is destroyed. The surface destruction also triggers the
freeing of its views, so the next access to the output transform link
could crash.

Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 19:35:15 +02:00
Pekka Paalanen 319397e050
gl-renderer, simple-dmabuf-v4l: fix dmabuf y-invert
Invert the Y_INVERT flag for the EGL import fo dmabufs. This fixes
weston-simple-dmabuf-intel to show the same image on both GL-composited
and with direct scanout on a hardware plane. Before, the image would
y-flip when switching between these two cases. Now the orientation also
matches the color values written in simple-dmabuf-intel.c.

The GL-renderer uses the OpenGL convention of texture coordinates, where
the origin is at the bottom-left of an image. This can be observed in
texture_region() where the texcoords are inverted if y_invert is false,
since the surface coordinates have origin at top-left.  Both wl_shm and
dmabuf buffers have origin at the top-left.

When wl_shm buffer is imported with glTexImage2D, it gets inverted
because glTexImage2D is defined to read in the bottom row first. The shm
data is top row first. This incidentally also means, that buffer pixel
0,0 ends up at texture coordinates 0,0. This is now inverted compared to
the GL coordinate convention, and therefore gl_renderer_attach_shm()
sets y_inverted to true. This causes texture_region() to NOT invert the
texcoords. Wayland surface coordinates have origin at top-left, hence
the double-inversion.

Dmabuf buffers also have the origin at top-left. However, they are
imported via EGL to GL, where they should get the GL oriented
coordinates but they do not. It is as if pixel 0,0 ends up at texcoords
0,0 - the same thing as with wl_shm buffers. Therefore we need to invert
the invert flag.

Too bad EGL_EXT_image_dma_buf_import does not seem to specify the image
orientation. The GL spec implied result seems to conflict with the
reality in Mesa 11.2.2.

I asked about this in the Mesa developer mailing list. The question with
no answers:
https://lists.freedesktop.org/archives/mesa-dev/2016-June/120249.html
and the thread I hijacked to get some answers:
https://lists.freedesktop.org/archives/mesa-dev/2016-June/120733.html
which culminated to the conclusion:
https://lists.freedesktop.org/archives/mesa-dev/2016-June/120955.html
that supports this patch.

simple-dmabuf-v4l is equally fixed to not add Y_INVERT. There is no
rational reason to have it, and removing is necessary together with the
GL-renderer change to keep the image the right way up. This has been
tested with VIVID.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 19:07:48 +02:00
Pekka Paalanen dbb85d7173
clients/dmabuf-v4l: explain vivid setup
Add very short explanation on how to set up Vivid driver, when you don't
have suitable V4L2 device to use.

Using the XR24 (DRM_FORMAT_XRGB8888) format practically guarantees that
you can test direct scanout on a hardware overlay, too. At least on PC
hardware that has overlays. Tested to work on Intel.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 18:24:52 +02:00
Emil Velikov 2eda27b7fb
README: fix s/libwayland/libweston/ typo
Since one is (about to be) using libweston, they should check for it as
opposed to libwayland.

Silly copy/paste mistake that would have caused a lot of confusion.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15 18:06:46 +02:00