summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-10clients: Add screensaver inhibitor client demowip/idle-inhibitorBryce Harrington4-10/+596
Derive client from simple-shm and hook up the API defined in wayland-protocols to allow client screensaver inhibition requests. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-09-10shell: Inhibit idle fade-out behaviorBryce Harrington2-1/+61
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. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-09-10libweston-desktop: Forward idle inhibitors to the toplevel surfaceQuentin Glidic1-0/+32
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-09-10compositor: Add internal support to track idle inhibition requestsBryce Harrington3-9/+193
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. compositor: Add public interface support for client-requested idle inhibition This API allows clients to create an idle manager that can be used to create per-surface inhibitor objects. These direct the compositor to not idle off the output that the surface is displayed on (i.e. don't blank the surface's screen or show a screensaver). When the inhibitor object is destroyed, the inhibition request is automatically dropped and a signal fired in libweston; this is used to communicate to the shell that it should resume any idle behaviors (fade out animations, etc.) and treat the output as idled. If the client destroys the manager, the individual inhibitors will remain active until destroyed. The protocol spec does not define what should happen in this situation, so this behavior may be altered once it has been clarified. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-09-10desktop-shell: Enable per-output fade animationsBryce Harrington2-67/+84
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 later 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 to become larger during the course of the fade animation. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-09-09Revert "terminal: Fix crash due to race condition in init"Quentin Glidic1-1/+0
This reverts commit 5c611d933f60f720db98331c9c1c6ed4420f9782.
2016-09-07libweston-desktop/xdg_shell_v5: Add surface as neededQuentin Glidic1-10/+32
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-07desktop-shell: Add back the saved position and rotation for fullscreen/maximizedQuentin Glidic1-4/+16
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-09-07desktop-shell: Unset fullscreen/maximized state on commitQuentin Glidic1-12/+26
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-06configure.ac: bump to version 1.11.93 for the RC1 releaseBryce Harrington1-2/+2
2016-09-02compositor-wayland: Only destroy the egl_window when using GLES.Emmanuel Gil Peyrot1-1/+1
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-01libweston-desktop/xwayland: Do not over-destroy the viewQuentin Glidic1-4/+2
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-01terminal: Fix crash due to race condition in initBryce Harrington1-0/+1
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-01clients: Use ARRAY_LENGTH macro in weston-simple-imBryce Harrington1-3/+3
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-08-30configure.ac: (Re-)bump to version 1.11.92 for the beta releaseBryce Harrington1-2/+2
2016-08-30Revert "desktop-shell: Enable per-output fade animations"Bryce Harrington2-84/+68
This reverts commit fde5adbedb2706f8e160156d9a08bc014d2e42f3. (Accidental landing)
2016-08-30Revert "compositor: Add internal support to track idle inhibition requests"Bryce Harrington2-60/+6
This reverts commit f8300c87d5dddb0f55d5f2bd9ec3164cbd37d370. (Accidental landing)
2016-08-30Revert "compositor: Add public interface support for client-requested idle ↵Bryce Harrington3-95/+5
inhibition" This reverts commit 689feced3c0022e8f5cce79df0b19cc370de6247. (Accidental landing)
2016-08-30Revert "libweston: Add a signal to fire when the idle inhibitor is dropped"Bryce Harrington2-18/+6
This reverts commit ca5b62426a97b4607d60eaf1154881ac8c1ac994. (Accidental landing)
2016-08-30Revert "libweston-desktop: Add listener and API to drop the idle inhibitor"Bryce Harrington4-33/+0
This reverts commit e7069bcf93b2ffcf04b4128cb468fe83dc18baea. (Accidental landing)
2016-08-30Revert "shell: Inhibit idle fade-out behavior"Bryce Harrington2-38/+1
This reverts commit 9be807c69b1249390bb213e5403b9183738777f4. (Accidental landing)
2016-08-30Revert "clients: Add screensaver inhibitor client demo"Bryce Harrington3-587/+1
This reverts commit dfea66e7801f7c846ba3cc78146f8a18fd3aa7e4. (Accidental landing)
2016-08-30configure.ac: bump to version 1.11.92 for the beta releaseBryce Harrington1-2/+2
2016-08-30releasing: Fix incorrect direction about how many lines need tweakedBryce Harrington1-2/+2
2016-08-29clients: Add screensaver inhibitor client demoBryce Harrington3-1/+587
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-29shell: Inhibit idle fade-out behaviorBryce Harrington2-1/+38
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-29libweston-desktop: Add listener and API to drop the idle inhibitorBryce Harrington4-0/+33
Listen for the drop_idle_inhibitor signal from libweston, and propagate the call to a corresponding libweston-desktop API.
2016-08-29libweston: Add a signal to fire when the idle inhibitor is droppedBryce Harrington2-6/+18
2016-08-29compositor: Add public interface support for client-requested idle inhibitionBryce Harrington3-5/+95
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> v5: Improve comments
2016-08-29compositor: Add internal support to track idle inhibition requestsBryce Harrington2-6/+60
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-29desktop-shell: Enable per-output fade animationsBryce Harrington2-68/+84
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-27libweston: Drop shell_interfaceQuentin Glidic2-18/+8
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-27config-parser: Drop debug textBryce Harrington1-1/+0
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-08-20desktop-shell: Fix output destroyingQuentin Glidic1-0/+2
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-18compositor-drm: Zero drmModeAddFB2 dataYong Bakos1-1/+1
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-16configure.ac: bump to version 1.11.91 for the alpha releaseBryce Harrington1-3/+3
2016-08-16libweston-desktop/{wl_shell, xwayland}: Fix changing between toplevel statesQuentin Glidic2-2/+6
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Tested-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
2016-08-16libweston-desktop/xwayland: Actually destroy the viewQuentin Glidic1-2/+5
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-16libweston-desktop: Rename _destroy_view to _unlink_viewQuentin Glidic4-5/+5
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-16desktop-shell: Properly destroy the weston_desktop_viewQuentin Glidic1-1/+1
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-16Makefile.am: Fix libtool raceQuentin Glidic1-0/+8
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-16weston-editor: Close the data source after sendingDerek Foreman1-0/+2
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-15fullscreen-shell: avoid access to freed dataArnaud Vrac1-0/+2
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-15gl-renderer, simple-dmabuf-v4l: fix dmabuf y-invertPekka Paalanen2-2/+13
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-15clients/dmabuf-v4l: explain vivid setupPekka Paalanen1-0/+17
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-15README: fix s/libwayland/libweston/ typoEmil Velikov1-1/+1
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-15compositor-x11: remove redundant state arg of x11_backend_deliver_button_eventBenoit Gschwind1-11/+10
The "state" variable in x11_backend_deliver_button_event is basically the same as (event->response_type == XCB_BUTTON_PRESS), thus update the code to use the last one. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15compositor-x11: add assert to avoid misuse of x11_backend_deliver_button_eventBenoit Gschwind1-0/+3
The x11_backend_deliver_button_event can be called with any xcb_generic_event. The assert check if the call is done with the expected events. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15compositor-drm: Stop sending uninit data to the kernelDerek Foreman1-1/+1
Valgrind noticed that we send uninit data to drmModeAddFB2. While the kernel should never read this (because of the plane format), it's probably still nicer to zero the data before we send it. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-08-15configure.ac: check weston vs. libweston versionsPekka Paalanen1-0/+32
Check that the defined versions for Weston and libweston are consistent and according to the version bumping rules: - In pre-release and only pre-release versions the weston and libweston may differ - when they differ, libweston version must be exactly (weston.major+1).0.0 - otherwise, the versions must be exactly the same. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Acked-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>