Commit Graph

2818 Commits

Author SHA1 Message Date
Damien Lespiau
b5bae3450c build: Make the X11 compositor explicitely depend on xcb-shm
Otherwise, it means the X11 compositor depends on another library to
pull xcb-shm (cairo?), which is not always the case. Here I end up with:

[01:54:38.970] Failed to load module:
$prefix/lib/weston/x11-backend.so: undefined symbol: xcb_shm_id
2013-03-28 12:18:51 -04:00
Kristian Høgsberg
88817f869f compositor: Remove unused wl_pointer variable
Using move_pointer() in notify_pointer_focus() left the wl_pointer variable
unused.
2013-03-27 23:00:29 -04:00
Peter Maatman
e5b42e4466 Added handler for SIGABRT 2013-03-27 22:57:33 -04:00
Jonas Ådahl
848e2e670e evdev-touchpad: Disable tap FSM by default on touchpads with button pads
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2013-03-27 15:39:09 -04:00
Kristian Høgsberg
5006596a72 compositor-x11: Fix relative motion reporting for multiple outputs 2013-03-27 15:14:07 -04:00
Rob Bradford
c088e2c011 compositor: Support notifying with absolute position too
With evdev input devices that generate absolute positions we need to provide
an infrastructure in the compositor for supporting those.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=61997
2013-03-27 14:42:28 -04:00
Rafal Mielniczuk
32069c09ea compositor-drm: ensure we run drm-backend using weston-launch
We do this by checking if launcher_sock != -1

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=60926
2013-03-27 13:46:01 -04:00
Giulio Camuffo
1b4b61ace3 shell: set the popup grab button as pressed only if it actually is
This ensures the popup_grab.initial_up field isn't reset to 0
if the popup was not opened because of a mouse press but because
of moving the mouse with a popup already open. Not doing so will
make the first click outside the client area go ignored.
2013-03-27 13:11:06 -04:00
Giulio Camuffo
5085a75dee shell: handle multiple popups
This patch implements a popup stack. When the first popup is opened
the grab is started, and it is added to a list. Further popups will
be added to this list but the grab won't change. When a popup is
closed it is removed from the list and, if it is now empty, the grab
is ended.
A click outside the client area will send the popup_done event to
all the popups in the list, and the grab will end.
2013-03-25 22:36:58 -04:00
Rob Bradford
0f3f97d34a weston-egl: Allow compilation against older EGL stack
Provide a definition of EGL_BUFFER_AGE_EXT so that you can compile against an
EGL stack that may not yet support that extension.
2013-03-22 10:26:04 -04:00
Scott Moreau
706d15e2a7 Revert "weston.ini: Use 'modeline' key for modeline example"
This reverts commit 97a5614563.

The current code detects the mode key, not modeline. Reference:
http://cgit.freedesktop.org/wayland/weston/tree/src/compositor-drm.c#n2464
2013-03-19 15:52:40 -04:00
Scott Moreau
650aab55e7 weston.man: Document the way to disable idle timeout 2013-03-19 15:50:45 -04:00
Emilio Pozuelo Monfort
02d8ad6021 config.ini: add examples for cursor-theme and cursor-size 2013-03-19 14:42:48 -04:00
Emilio Pozuelo Monfort
57ac406c2f weston.ini.man: document cursor-theme and cursor-key 2013-03-19 14:42:46 -04:00
Emilio Pozuelo Monfort
ab44b0c61e toytoolkit: implement cursor-size config key 2013-03-19 14:42:43 -04:00
Siddharth Heroor
d6be88b5e2 weston-launch: cleanup - return failures in main with EXIT_FAILURE
Signed-off-by: Siddharth Heroor <heroor@gmail.com>
2013-03-19 14:41:05 -04:00
Philipp Brüschweiler
e74dc19aa1 compositor-rpi: Use correct enum, removes a warning 2013-03-19 14:35:34 -04:00
Philipp Brüschweiler
4b409c387d compositor: remove unused field option_idle_time 2013-03-19 14:31:46 -04:00
Philipp Brüschweiler
7a3ec74cb6 weston-launch: return better value if weston dies because of a signal
Before this commit, weston-launch returned 0 if weston was killed by a
signal. This makes it hard to automatically test weston by using
weston-launch, as there is no way to know why weston was terminated.

This commit makes weston-launch return 10+N instead, where N is the code
of the signal that terminated weston. 10 was chosen because it allows a
script to distinguish it from the case that weston-launch itself was
killed by a signal (128+N), and does not overlap the standard exit codes
defined in sysexits.h.

Partial fix for https://bugs.freedesktop.org/show_bug.cgi?id=60935. I
can't reproduce the SIGHUP using the fbdev backend.

v3: better commit message.
2013-03-19 14:28:23 -04:00
Philipp Brüschweiler
ff253129c5 weston-launch: move function calls out of assert() 2013-03-19 14:28:01 -04:00
MoD
063a882dc7 toytoolkit: avoid redrawing a window between maximize and configure
Resolve a bad frame visible when maximizing toytoolkit programs with the the
maximize button in decorations. Windows now use wl_display.sync requests to
wait for a maximize to finish before drawing again, following suggestions from
http://lists.freedesktop.org/archives/wayland-devel/2013-February/007650.html
2013-03-19 14:19:53 -04:00
Rafal Mielniczuk
c1a3cd1851 window: restore maximized state from fullscreen mode if necessary
This patch sets back maximized mode, if that was its state before going
fullscreen.
2013-03-19 14:07:57 -04:00
Rafal Mielniczuk
fc22be0bb9 window: save allocation only for toplevel window
Thanks to that we will not overwrite saved allocation, when going
fullscreen from maximized state
2013-03-19 14:06:57 -04:00
Rafal Mielniczuk
fffdcdd654 shell: reset rotation for maximized surface
Surface will preserve its rotation transformation when maximizing, which
will cause inconsistencies (eg. no window shadows drawn)

This patch removes rotation from maximized surface and restore it when
unmaximizing (just like in fullscreen mode)
2013-03-19 12:27:23 -04:00
Rafal Mielniczuk
23c6759b76 shell: block move, rotate, resize in maximized state
To remain consisten with client side window, which blocks moving and
resizing of window in maximized state, we should do so on the compositor
side as well.

(until there is some unmaximize notification from server, which will
allow window to start drawing shadows and revert itself to toplevel
state)
2013-03-19 12:09:52 -04:00
Philipp Brüschweiler
f3e39f9872 pixman-renderer: don't forget to initialize the debug fields
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=61930
2013-03-18 22:25:36 -04:00
Pekka Paalanen
483243fa67 compositor, shell: surface transform inheritance
Implements surface transform inheritance. A 'parent' pointer is added to
weston_surface::geometry, and is automatically used by
weston_surface_update_transform(). When updating the transform, the
parent transform is updated as needed, too.

shell_map_popup() is converted to use the new
weston_surface_set_transform_parent() function. Now, if we moved the
popup's parent surface while the popup is open, the popup surface will
stick to the parent properly.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-03-18 22:20:04 -04:00
Pekka Paalanen
c3ce738653 compositor: introduce weston_surface_geometry_dirty()
Instead of directly setting the dirty flag on weston_surface geometry,
use a function for that.

This allows us to hook into geometry dirtying in a following patch.

Also add comments to weston_surface fields, whose modification causes
transform state to become outdated.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-03-18 22:19:57 -04:00
Pekka Paalanen
f1f48cfa35 compositor: remove redundant geometry dirtying
Remove redundant geometry dirtying from surface_commit() to simplify
further changes.

This code was added in commit 5df8ecac5d
"compositor: Fix partial repaints"

as the fix to:
https://bugs.freedesktop.org/show_bug.cgi?id=56538

The issue fixed by that commit was making the geometry dirty on every
attach, which caused full-surface repaints every time. The bug was
probably introduced by the opaque region changes during implementing
wl_surface.commit. The mentioned commit fixes the opaque handling by
comparing the new and old regions.

However, the commit also introduces additional checks that set
geometry.dirty. In the current code base, this should be unnecessary.

If the pending.sx or pending.sy are not zero, or if the surface size
changes, the configure() hook is responsible for applying the new
values, and so also marking the geometry dirty.

The configure() hook is only called, if there has been a new
wl_surface.attach. Nothing else can change these variables, so this
should be enough.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2013-03-18 22:19:54 -04:00
Rune K. Svendsen
14b2fe7020 Eat scroll event if a key binding function is executed because of it.
When an axis (scroll) event results in a key binding function
being executed, eat the scroll event so the underlying window
doesn't receive it.
Thanks to Scott Moreau for helping me solve this.
2013-03-18 21:43:17 -04:00
Scott Moreau
976a050f8f Fix memory leaks
Fix a couple leaks caught by valgrind.
2013-03-18 21:34:13 -04:00
Ander Conselvan de Oliveira
1c169ffdec gl-renderer: Use EXT_buffer_age and don't assume double buffering
Now that we have EXT_buffer_age in mesa, we should stop assuming double
buffering and use the buffer age instead.

Note: this will cause system without the extension to repaint the whole
screen every frame.
2013-03-18 21:13:52 -04:00
Ander Conselvan de Oliveira
e1bd5a02a0 compositor: Don't rely on surface->clip to cull overlay obscured damage
Before this change, surface->clip would contain the region of this the
surface that is obscured by opaque containing of other surfaces in any
plane. If a surface was obscured only by a surface in another plane and
the renderer was told to draw that region, the rendering would be
clipped because of that.

This patch changes the clip to be plane specific, so that it contains
only the region of the surface obscured by other surfaces in the same
plane. We also calculate a per plane clip, so that we don't tell the
renderer to draw regions of the primary plane that are obscured by
other planes. This damage remains on the primary plane until the its
clip changes so that they are not obscured anymore.
2013-03-18 21:13:50 -04:00
Ander Conselvan de Oliveira
b605c06e2a gl-renderer: Don't change the region supplied to output repaint
The core uses this region to clear from the primary plane damage the
area that was repainted. If we add the old buffer damage to that, it
may end up clearing more damage from the primary plane than it was
intended.
2013-03-18 21:13:48 -04:00
Ander Conselvan de Oliveira
8ad1982854 compositor: Keep a z-ordered list of planes
This let us clear a plane's opaque region without adding code in the
backend, and will be used in a following commit to change how we track
damage.
2013-03-18 21:13:45 -04:00
John Kåre Alsaker
ef591aa4e9 compositor-drm: Inspect result of gbm_create_device. 2013-03-18 21:10:08 -04:00
Andre Heider
ac1cb0b9d2 src/Makefile.am: Fix git-version.h for out of tree builds
Use --git-dir instead of --work-tree, see
http://marc.info/?l=git&m=120390208721287&w=2

Signed-off-by: Andre Heider <a.heider@gmail.com>
2013-03-18 21:06:27 -04:00
Kristian Høgsberg
e7144fd175 compositor: Only send release event in response to wl_surface.attach
The current semantics would implicitly attach the most recently attached
buffer at commit time and send a release event when the buffer enventually
was released.  The implicit attach is a little too subtle though and this
patch changes the semantics to always only send release events in response
to an attach event.  As a consequence, once a compositor releases a buffer,
it no longer has a reference to it and wl_surfcea.damage is undefined.
Thus, the client side visible change is that damage request must always
be preceeded by a wl_surface.attach request, to ensure there's a valid buffer,
even if that means attaching the same buffer again.
2013-03-05 15:35:47 -05:00
Kristian Høgsberg
2034780cb2 compositor: Fold weston_buffer_post_release into weston_buffer_reference
Nothing else calls weston_buffer_post_release and the ref-counting and
sending the release event is essentially what weston_buffer_reference is
all about.
2013-03-04 12:35:19 -05:00
Kristian Høgsberg
63093a35ea compositor-drm: Determine opaqueness of a surface correctly
We subtract the screen space opaque region from the transformed surface
region.  That's going to fail for when we're scaling up a surface, since
the surface bounding box for the scaled up surface is going to be bigger
than the opaque region.  Instead, subtract the surface-space opaque region
from a 0,0 - width,height region and see if that's empty.
2013-03-04 12:35:07 -05:00
Giulio Camuffo
82cb505287 tests: attach the surface's buffer when moving it
move_client() needs to attach the buffer, even if it was attached already,
because since 184df50 configure() will be called only on newly attached
surfaces, but the one that sets the test surface position is the configure
function.
2013-03-04 12:28:42 -05:00
Kristian Høgsberg
068b61c254 compositor: Change notify_motion to take relative motion events 2013-02-28 14:57:01 -05:00
Kristian Høgsberg
e2464fd414 compositor: Split pointer motion code into its own function 2013-02-28 14:57:00 -05:00
Kristian Høgsberg
9bcaaebfee compositor: Make sure surface->transform.inverse is a complete matrix
We never init this, so we need to copy over the position matrix and then
overwrite the translation entries to make sure we have a valid matrix.

Thanks to Pekka for spotting this (twice).
2013-02-28 14:57:00 -05:00
Kristian Høgsberg
383b60fad5 configure.ac: Use automake color-tests 2013-02-28 14:57:00 -05:00
Kristian Høgsberg
c1e6c8a2ed compositor: Make sure surface->transform.matrix,inverse are always valid
First step towards getting rid of the transform.enabled optimization.
2013-02-27 17:01:42 -05:00
Giulio Camuffo
184df50d3e compositor: call configure on surfaces with a null buffer too
This way the shell can know when a surface has been unmapped by
checking the value returned by weston_surface_is_mapped(surface).
The configure handlers have now width and height parameters, so
they do not need anymore to check manually the buffer size.
If a surface's buffer is NULL the width and height passed to the
configure are both 0.
Configure is now only called after an attach. The variable
weston_surface.pending.newly_attached is set to 1 on attach, and
after the configure call is reset to 0.
2013-02-27 15:32:04 -05:00
Satyeshwar Singh
964a342e53 evdev: Wait for SYN event before sending events over to the client
The issue was that touch::down event from the compositor to client apps
would send the previous motion events coordinates and this obviously made
the client do the wrong thing. This happened because we were not waiting
for a SYN event to come from evdev before sending down, motion or up events.

https://bugs.freedesktop.org/show_bug.cgi?id=51909
2013-02-27 15:28:21 -05:00
Pekka Paalanen
6d8fcc75b8 update .gitignores for src/ and man/
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-02-26 11:20:29 -05:00
Ander Conselvan de Oliveira
2002f88888 compositor-drm: Fix a crash with a fullscreen surface with driver mode
If there was a fullscreen surface using driver mode when a vt switch is
triggered, but something caused it to be gone when switching back (such
as the client being killed), a call to drm_output_switch_mode() is made
to restore the old mode, and that sets the output's current drm_fb to
NULL, so that the new mode is set drm_output_repaint(). This led to a
crash in vt_func(), because it tried to access output->current for
restoring the old mode.

Fix this by not setting the mode if there's no current fb. Instead,
schedule a repaint so that the mode is set in drm_output_repaint().

https://bugs.freedesktop.org/show_bug.cgi?id=60675
2013-02-26 11:13:37 -05:00