Commit graph

5607 commits

Author SHA1 Message Date
Krzysztof Konopko e338ced1e0 shared/platform: include weston-egl-ext.h only if ENABLE_EGL is defined
Including `weston-egl-ext.h` causes compilation failure for configurations
with EGL disabled.

Verified with `--disable-egl`, `--disable-x11-compositor`
and `--disable-drm-compositor`.

Signed-off-by: Krzysztof Konopko <kris@youview.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-09-26 16:50:31 +03:00
Armin Krezović 4e2fa0abc3
libweston-desktop: Fix some clang warnings
Fixes:

implicit conversion from enumeration type '...' to different
enumeration type '...' [-Wenum-conversion]

Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-09-24 12:16:18 +02:00
Kylie McClain 5d72bc404d
string-helpers.h: Fix usage on musl libc
On musl, int32_t is defined in stdint.h.

Signed-off-by: Kylie McClain <kylie@somasis.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-24 11:55:58 +02:00
Quentin Glidic d8b17bc452
share/cairo-util: Use wl_pointer_button_state enum directly
This silences two warnings:

clients/window.c:2450:20: warning: implicit conversion from enumeration
type 'enum wl_pointer_button_state' to different enumeration type 'enum
frame_button_state' [-Wenum-conversion]
                                              button, state);
                                                      ^~~~~

clients/window.c:2453:15: warning: implicit conversion from enumeration
type 'enum wl_pointer_button_state' to different enumeration type 'enum
frame_button_state' [-Wenum-conversion]
                                                button, state);
                                                        ^~~~~

Warning produced by Clang 3.8.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
2016-09-24 11:52:56 +02:00
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