Jonas Ådahl [Fri, 5 Apr 2013 21:07:11 +0000 (23:07 +0200)]
Make backends always specify output repaint time
Most backends relies on gettimeofday(2) for output repaint timestamps
but this is not a requirement. Before this patch repaints coming from
idle_repaint() always used gettimeofday(2) for timestamps. For backends
not using that time source this could cause large jumps between
timestamps.
To fix this, timestamps needs to always come from the backend. This
means that the backend needs to always be responsible of starting the
repaint loop in case that the repaint cannot start immediately.
The drm backend implementation is from the patch by Ander Conselvan de
Oliveira found here:
http://lists.freedesktop.org/archives/wayland-devel/2013-February/007393.html
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Kristian Høgsberg [Fri, 5 Apr 2013 01:36:20 +0000 (21:36 -0400)]
compositor-drm: Allow running without launcher if effective UID is 0
This lets us keep running weston as root or setuid root.
Armin K [Wed, 3 Apr 2013 19:29:03 +0000 (21:29 +0200)]
Fix compiler warnings
This prevents compiler warnings when using libpng 1.6 and GCC 4.8
Quentin Glidic [Wed, 3 Apr 2013 18:19:45 +0000 (20:19 +0200)]
autotools: Add a libunwind configure switch
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Rob Bradford [Wed, 3 Apr 2013 14:21:55 +0000 (15:21 +0100)]
compositor: Use wl_pointer_set_current to cleanup after surface destruction
This API call handles setting the current surface on the wl_pointer and also
maintaining a destroy notification to monitor that surface for destruction.
This is part of the fix for: https://bugzilla.gnome.org/show_bug.cgi?id=696946
Giulio Camuffo [Wed, 3 Apr 2013 12:37:00 +0000 (14:37 +0200)]
window: don't execute the selected menu item when getting popup_done
Philipp Brüschweiler [Sat, 30 Mar 2013 14:18:49 +0000 (15:18 +0100)]
compositor: add information about the fbdev backend to --help output
Hardening [Mon, 1 Apr 2013 21:43:58 +0000 (23:43 +0200)]
RDP compositor take 6
This patch is the 6th version of the FreeRDP based compositor.
Changes from last version:
* use pixman_image_get_stride() when appropriate
* always realloc
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Philipp Brüschweiler [Fri, 29 Mar 2013 12:01:56 +0000 (13:01 +0100)]
compositor: add WESTON_COMPOSITOR_OFFSCREEN state
This state is used when the user switches the vt. It turns of rendering
and frame events, but doesn't set the DPMS state to off.
As a part of this change, also turn off the idle timer when entering
the SLEEPING or OFFSCREEN states, which fixes
https://bugs.freedesktop.org/show_bug.cgi?id=61910 (rpi backend
untested).
Damien Lespiau [Thu, 28 Mar 2013 17:28:22 +0000 (17:28 +0000)]
gitignore: Ignore test-driver
Automake (1.12 here) parallel-tests installs a test-driver file, another
file to add to .gitignore.
While at it, remove the duplicate cscope.out entry and add TAGS (the
result of automake's "make tag")
Giulio Camuffo [Thu, 28 Mar 2013 17:02:42 +0000 (18:02 +0100)]
sdk: be C++ friendly
This renames the weston_surface's private member to configure_private
and externs "C" the headers of the SDK.
Damien Lespiau [Thu, 28 Mar 2013 15:20:54 +0000 (15:20 +0000)]
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
Kristian Høgsberg [Thu, 28 Mar 2013 03:00:29 +0000 (23:00 -0400)]
compositor: Remove unused wl_pointer variable
Using move_pointer() in notify_pointer_focus() left the wl_pointer variable
unused.
Peter Maatman [Wed, 27 Mar 2013 21:38:53 +0000 (22:38 +0100)]
Added handler for SIGABRT
Jonas Ådahl [Fri, 22 Mar 2013 07:41:42 +0000 (08:41 +0100)]
evdev-touchpad: Disable tap FSM by default on touchpads with button pads
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Kristian Høgsberg [Wed, 27 Mar 2013 19:14:07 +0000 (15:14 -0400)]
compositor-x11: Fix relative motion reporting for multiple outputs
Rob Bradford [Wed, 27 Mar 2013 15:59:43 +0000 (15:59 +0000)]
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
Rafal Mielniczuk [Wed, 27 Mar 2013 17:39:28 +0000 (18:39 +0100)]
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
Giulio Camuffo [Wed, 27 Mar 2013 17:05:26 +0000 (18:05 +0100)]
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.
Giulio Camuffo [Mon, 25 Mar 2013 20:42:45 +0000 (21:42 +0100)]
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.
Rob Bradford [Fri, 22 Mar 2013 14:15:49 +0000 (14:15 +0000)]
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.
Scott Moreau [Sun, 10 Mar 2013 15:30:16 +0000 (09:30 -0600)]
Revert "weston.ini: Use 'modeline' key for modeline example"
This reverts commit
97a56145636316fdb431b91ec64adff217287cd9.
The current code detects the mode key, not modeline. Reference:
http://cgit.freedesktop.org/wayland/weston/tree/src/compositor-drm.c#n2464
Scott Moreau [Sat, 9 Mar 2013 18:55:40 +0000 (11:55 -0700)]
weston.man: Document the way to disable idle timeout
Emilio Pozuelo Monfort [Thu, 14 Mar 2013 16:23:39 +0000 (17:23 +0100)]
config.ini: add examples for cursor-theme and cursor-size
Emilio Pozuelo Monfort [Thu, 14 Mar 2013 16:23:38 +0000 (17:23 +0100)]
weston.ini.man: document cursor-theme and cursor-key
Emilio Pozuelo Monfort [Thu, 14 Mar 2013 16:23:37 +0000 (17:23 +0100)]
toytoolkit: implement cursor-size config key
Siddharth Heroor [Mon, 11 Mar 2013 21:06:52 +0000 (02:36 +0530)]
weston-launch: cleanup - return failures in main with EXIT_FAILURE
Signed-off-by: Siddharth Heroor <heroor@gmail.com>
Philipp Brüschweiler [Sun, 10 Mar 2013 15:08:31 +0000 (16:08 +0100)]
compositor-rpi: Use correct enum, removes a warning
Philipp Brüschweiler [Sun, 10 Mar 2013 13:37:04 +0000 (14:37 +0100)]
compositor: remove unused field option_idle_time
Philipp Brüschweiler [Sun, 10 Mar 2013 14:14:01 +0000 (15:14 +0100)]
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.
Philipp Brüschweiler [Sat, 9 Mar 2013 18:38:56 +0000 (19:38 +0100)]
weston-launch: move function calls out of assert()
MoD [Sat, 2 Mar 2013 23:43:57 +0000 (23:43 +0000)]
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
Rafal Mielniczuk [Mon, 11 Mar 2013 18:26:56 +0000 (19:26 +0100)]
window: restore maximized state from fullscreen mode if necessary
This patch sets back maximized mode, if that was its state before going
fullscreen.
Rafal Mielniczuk [Mon, 11 Mar 2013 18:26:55 +0000 (19:26 +0100)]
window: save allocation only for toplevel window
Thanks to that we will not overwrite saved allocation, when going
fullscreen from maximized state
Rafal Mielniczuk [Mon, 11 Mar 2013 18:26:54 +0000 (19:26 +0100)]
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)
Rafal Mielniczuk [Mon, 11 Mar 2013 18:26:53 +0000 (19:26 +0100)]
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)
Philipp Brüschweiler [Fri, 8 Mar 2013 19:35:39 +0000 (20:35 +0100)]
pixman-renderer: don't forget to initialize the debug fields
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=61930
Pekka Paalanen [Fri, 8 Mar 2013 12:56:50 +0000 (14:56 +0200)]
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>
Pekka Paalanen [Fri, 8 Mar 2013 12:56:49 +0000 (14:56 +0200)]
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>
Pekka Paalanen [Fri, 8 Mar 2013 12:56:48 +0000 (14:56 +0200)]
compositor: remove redundant geometry dirtying
Remove redundant geometry dirtying from surface_commit() to simplify
further changes.
This code was added in commit
5df8ecac5d31467122a9d8bda6241d5957ae6848
"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>
Rune K. Svendsen [Thu, 7 Mar 2013 20:50:00 +0000 (21:50 +0100)]
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.
Scott Moreau [Thu, 7 Mar 2013 17:15:17 +0000 (10:15 -0700)]
Fix memory leaks
Fix a couple leaks caught by valgrind.
Ander Conselvan de Oliveira [Tue, 5 Mar 2013 15:30:30 +0000 (17:30 +0200)]
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.
Ander Conselvan de Oliveira [Tue, 5 Mar 2013 15:30:29 +0000 (17:30 +0200)]
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.
Ander Conselvan de Oliveira [Tue, 5 Mar 2013 15:30:28 +0000 (17:30 +0200)]
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.
Ander Conselvan de Oliveira [Tue, 5 Mar 2013 15:30:27 +0000 (17:30 +0200)]
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.
John Kåre Alsaker [Sat, 2 Mar 2013 11:27:39 +0000 (12:27 +0100)]
compositor-drm: Inspect result of gbm_create_device.
Andre Heider [Fri, 1 Mar 2013 14:38:23 +0000 (15:38 +0100)]
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>
Kristian Høgsberg [Mon, 4 Mar 2013 17:11:41 +0000 (12:11 -0500)]
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.
Kristian Høgsberg [Mon, 4 Mar 2013 17:07:46 +0000 (12:07 -0500)]
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.
Kristian Høgsberg [Fri, 1 Mar 2013 19:29:16 +0000 (14:29 -0500)]
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.
Giulio Camuffo [Thu, 28 Feb 2013 17:44:54 +0000 (18:44 +0100)]
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.
Kristian Høgsberg [Mon, 25 Feb 2013 22:04:47 +0000 (17:04 -0500)]
compositor: Change notify_motion to take relative motion events
Kristian Høgsberg [Mon, 25 Feb 2013 21:49:29 +0000 (16:49 -0500)]
compositor: Split pointer motion code into its own function
Kristian Høgsberg [Thu, 28 Feb 2013 19:56:43 +0000 (14:56 -0500)]
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).
Kristian Høgsberg [Thu, 28 Feb 2013 16:19:10 +0000 (11:19 -0500)]
configure.ac: Use automake color-tests
Kristian Høgsberg [Tue, 19 Feb 2013 22:04:50 +0000 (17:04 -0500)]
compositor: Make sure surface->transform.matrix,inverse are always valid
First step towards getting rid of the transform.enabled optimization.
Giulio Camuffo [Thu, 21 Feb 2013 10:29:21 +0000 (11:29 +0100)]
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.
Satyeshwar Singh [Wed, 27 Feb 2013 20:26:23 +0000 (15:26 -0500)]
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
Pekka Paalanen [Tue, 26 Feb 2013 13:19:02 +0000 (15:19 +0200)]
update .gitignores for src/ and man/
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Ander Conselvan de Oliveira [Tue, 26 Feb 2013 11:44:58 +0000 (13:44 +0200)]
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
Scott Moreau [Sat, 23 Feb 2013 19:04:56 +0000 (12:04 -0700)]
compositor-drm: Use __func__ instead of hardcoded string
Kristian Høgsberg [Mon, 25 Feb 2013 18:03:15 +0000 (13:03 -0500)]
Makefile.am: Distribute weston.ini sample
https://bugs.freedesktop.org/show_bug.cgi?id=61388
Quentin Glidic [Thu, 21 Feb 2013 18:13:20 +0000 (19:13 +0100)]
Makefile.am: SUBDIRS is automagic
DIST_SUBDIRS should be used for corner cases only, not for conditional
SUBDIRS:
If `SUBDIRS' is defined conditionally using Automake conditionals,
Automake will define `DIST_SUBDIRS' automatically from the possible
values of `SUBDIRS' in all conditions.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Quentin Glidic [Thu, 21 Feb 2013 20:01:23 +0000 (21:01 +0100)]
tests: Use&Fix parallel tests
Also fix automake 1.13 support
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Ander Conselvan de Oliveira [Fri, 22 Feb 2013 12:16:19 +0000 (14:16 +0200)]
shell: Go straight to sleep if the sceensaver isn't configured
If the screensaver path is not set, nothing would set the compositor
state to sleeping. In that case, outpus DPMS state was never set to
off.
Ander Conselvan de Oliveira [Fri, 22 Feb 2013 12:16:18 +0000 (14:16 +0200)]
shell: Use weston_compositor_sleep() instead of setting DPMS state
This should have been changed when the weston_compositor_sleep() entry
point was added.
Ander Conselvan de Oliveira [Thu, 21 Feb 2013 16:35:23 +0000 (18:35 +0200)]
compositor: Rename lock and unlock signals to idle and wake
After the changes introduced in the previous patch, those names are
more appropriate. It is up to the shell to decide when to lock the
screen.
Ander Conselvan de Oliveira [Thu, 21 Feb 2013 16:35:22 +0000 (18:35 +0200)]
compositor: Move state tracking complexity into shell
Previously, when coming back from idle the compositor would try to
track if the unlock signal needed to be sent, and the shell would
change the compositor state in order to track when to display or
hide the screensaver.
This patch finishes moving this out of the compositor. With this, the
compositor state should be changed only using the exported functions
weston_compositor_wake() and weston_compositor_sleep(). The unlock
signal will be sent if the compositor wasn't in the ACTIVE state
previously. The lock signal is sent when the compositor becomes idle.
The calls to weston_compositor_wake() in the shell where there to allow
it to trigger the fade in only after the lock surface was configured.
Now the shell has full control of the fade and does not needed to
change the compositor state to do that, so those calls were replaced
with shell_fade() calls.
Ander Conselvan de Oliveira [Thu, 21 Feb 2013 16:35:21 +0000 (18:35 +0200)]
shell: Use its own timer for the screensaver timeout
Previously, the shell would change the idle_time of the compositor to
the screensaver timeout and wake the compositor again, so that after
the timeout the compositor would fade to black and then the shell would
receive the lock signal again and would set the dpms state of the
outputs to off.
Instead, use a screensaver-specific timer for that, and call lock
without the back and forth between the shell and core Weston.
Ander Conselvan de Oliveira [Thu, 21 Feb 2013 16:35:20 +0000 (18:35 +0200)]
compositor: Move fade animation out of core Weston into shell
Previously, it was impossible to override the fade in/out behavior of
Weston using a different shell, since this was implemented in core
Weston. This also led to complicated interaction between the shell and
the core when displaying lock surfaces and screensavers.
This patch starts to solve this issue by moving the fade animation out
of the core. On compositor.c, besides deleting the fade code, the idle
handler had to be changed to emit the lock signal, since it was called
from the fade_frame() function before. This causes a slight change of
behavior, since before the fade would happen with the compositor being
active, while now it is already in the idle state. That leads to the
dpms state being set when cancelling the fade with mouse movement, and
in turn, to a slight freeze with drm compositor. This problem will be
fixed in a follow up patch.
On the shell side, the fade was re-implemented in a slightly different
manner. Instead of using a custom frame function, the fade animation
from animation.c is used. The interface for starting the fade was also
changed to take the value of an enum instead of a float alpha value,
in order to improve readability.
Ander Conselvan de Oliveira [Thu, 21 Feb 2013 16:35:19 +0000 (18:35 +0200)]
animation: Schedule a repaint only on the outputs the surface is in
The function weston_surface_animation_frame() would schedule a repaint
on all outputs, as weston_surface_schedule_repaint() didn't exist when
it was implemented.
Ander Conselvan de Oliveira [Thu, 21 Feb 2013 16:35:18 +0000 (18:35 +0200)]
animation: When fading, round the surface alpha when close to 0 or 1
The spring code stops when the current value is withing 0.0002 of the
target. In that case, round the value to 0.0 or 1.0 to enable the use
of fast paths, such as disabling blending in the GL renderer when an
opaque region is set.
Ander Conselvan de Oliveira [Thu, 21 Feb 2013 16:35:17 +0000 (18:35 +0200)]
animation: Make fade more controllable
Add parameters to weston_fade_run() for setting the initial and target
values for the fade, as well as a parameter to set the spring constant
used for the animation.
Also add the weston_fade_update() function, that allows the animation
to be changed while it is still running.
This will be used to move the fade animation from core Weston into the
shell. These changes are needed to be able to fade out as well as in,
and to be able to reverse the fade in case of user input.
Ander Conselvan de Oliveira [Thu, 21 Feb 2013 16:35:16 +0000 (18:35 +0200)]
compositor: Split util.c into binding.c and animation.c
The few functions not related to bindings or animations were moved
into compositor.c.
Kristian Høgsberg [Fri, 22 Feb 2013 02:10:36 +0000 (21:10 -0500)]
compositor: Don't free config_file before we done using it
Kristian Høgsberg [Fri, 22 Feb 2013 01:18:37 +0000 (20:18 -0500)]
xwm: Only call set_fullscreen if the window is mapped
If we get a fullscreen client message before we map the window, we don't
have a shell surface yet. Just dont call set_fullscreen yet, and rely on
xserver_map_shell_surface() to fullscreen it when we map it.
Kristian Høgsberg [Wed, 20 Feb 2013 20:37:49 +0000 (15:37 -0500)]
Pass argc and argv to modules
This lets modules parse options from the command line.
Kristian Høgsberg [Wed, 20 Feb 2013 20:27:49 +0000 (15:27 -0500)]
Pass argc pointer to parse_options()
This lets us keep argc up to date as the backend picks out arguments
from the argv array.
Jan Arne Petersen [Tue, 19 Feb 2013 18:26:55 +0000 (19:26 +0100)]
tests: Fix text-test
Updated to changed text protocol.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Kristian Høgsberg [Wed, 20 Feb 2013 19:47:43 +0000 (14:47 -0500)]
Add missing builddir includes for version.h
af4f2aaf198522b51cf2afc2f25f9189c2432887 broke this
Pekka Paalanen [Wed, 20 Feb 2013 11:39:17 +0000 (13:39 +0200)]
window: fix display_acquire_window_surface()
Make sure that display_acquire_window_surface() creates the Cairo
surface as necessary. Otherwise surface->toysurface can be NULL.
This fixes weston-screensaver fullscreen mode. Demo mode was not
affected as it uses window decorations, and so the Cairo surface is
created. This regression was introduced by:
commit
0c4445ba5756e51007606028bce00b2ecb352bd7
Author: Pekka Paalanen <ppaalanen@gmail.com>
Date: Wed Feb 13 16:17:23 2013 +0200
window: create Cairo surfaces on demand for redraw
Reported-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Wed, 20 Feb 2013 02:19:04 +0000 (21:19 -0500)]
compositor-x11: Only try to fullscreen if WM has _NET_WM_STATE_FULLSCREEN
If the window manager doesn't support _NET_WM_STATE_FULLSCREEN, the
fullscreen protocol won't work and we end up waiting indefintely for a
confiure event that doesn't come.
Only try to fullscreen if we have _NET_WM_STATE_FULLSCREEN, and only
wait for map if we're fullscreen.
https://bugs.freedesktop.org/show_bug.cgi?id=61133
Kristian Høgsberg [Tue, 19 Feb 2013 01:10:35 +0000 (20:10 -0500)]
weston.ini: Use 'modeline' key for modeline example
When specifying a modeline, use the modeline key. Make the example
weston.ini do that.
Giulio Camuffo [Mon, 18 Feb 2013 21:26:01 +0000 (22:26 +0100)]
shell: Do not hang when mapping a popup twice
When calling shell_map_popup() more than one time on the same shell_surface
the parent transform was getting added more than one time to the transform
list, resulting in an infinite loop when going through the list with
wl_list_for_each in weston_surface_update_transform_enable().
This commit removes the old transform before adding it again.
Rafal Mielniczuk [Sun, 17 Feb 2013 14:55:55 +0000 (15:55 +0100)]
compositor: set data_device keyboard focus in seat_get_keyboard
Because seat_get_keyboard is called after initial
weston_surface_activate, wl_data_device_set_keyboard_focus
fails to send data offer for newly connected client due to
wl_seat.focus_resource being NULL.
This patch calls wl_data_device_set_keyboard_focus
in seat_get_keyboard, so it can send data offer for
newly created client (when wl_keyboard.resource_list
and wl_seat.focus_resource are properly set up).
https://bugs.freedesktop.org/show_bug.cgi?id=60617
Kristian Høgsberg [Mon, 18 Feb 2013 21:50:19 +0000 (16:50 -0500)]
udev-seat: Simplfy enable/disable interface a bit
We always call enable_udev_monitor and add_devices together and always
disable_udev_monitor and remove_devices together. Let's just have one
entry point for enable and one for disable.
Kristian Høgsberg [Mon, 18 Feb 2013 21:35:26 +0000 (16:35 -0500)]
compositor-fbdev: Use udev_seat
Let's share the udev input device discovery code.
Kristian Høgsberg [Mon, 18 Feb 2013 21:15:53 +0000 (16:15 -0500)]
compositor-drm: Move udev_seat to its own file
We get to move the input code out of compositor-drm.c and we'll be
able to share it with the fbdev backend.
Kristian Høgsberg [Mon, 18 Feb 2013 20:43:29 +0000 (15:43 -0500)]
compositor-drm: Rename a few evdev_* functions to udev_seat_*
We used to have a bit of naming trouble when the protocol object was called
wl_input_device and the individual evdev devices were call evdev_device.
And we didn't have a drm_seat. Now that we've fixed all that, it's clear
that the drm_seat is all about udev discovery and hotplug of evdev devices,
so let's call it udev_seat instead.
Quentin Glidic [Mon, 18 Feb 2013 19:38:22 +0000 (20:38 +0100)]
configure.ac: Make xwayland tests depend on xwayland
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Kristian Høgsberg [Sat, 16 Feb 2013 19:29:24 +0000 (14:29 -0500)]
xkb: Don't call exit on failure in weston_compositor_xkb_init()
This will exit without cleaning vt modes and leave the system stuck.
https://bugs.freedesktop.org/show_bug.cgi?id=60817
Kristian Høgsberg [Mon, 18 Feb 2013 20:04:07 +0000 (15:04 -0500)]
compositor-x11: Fix pointer type warning
Kristian Høgsberg [Mon, 18 Feb 2013 20:02:27 +0000 (15:02 -0500)]
compositor-drm: Remember to drop master in drm error handling
Otherwise we'll kill whatever other display sever we're switching back to.
The tricky thing here is that we never explicitly set drm master in the
startup path, we get that implicitly from being the first to open the
drm device. Even so, we need to drop it before switching VTs.
Kristian Høgsberg [Mon, 18 Feb 2013 20:26:28 +0000 (15:26 -0500)]
src/Makefile.am: Use $(libdir) instead of @libdir@
This allows overriding prefix and libdir at make time. Noticed
by David Herrmann.
Kristian Høgsberg [Sat, 16 Feb 2013 01:53:20 +0000 (20:53 -0500)]
Install header files and pkg-config file for external modules
This patch installs the three header files that define the compositor
plugin interface as well as a pkg-config file. This allows
building weston plugins outside the weston tree. We currently don't make
any guarantees about the plugin API/ABI except that within a stable
branch we won't break it.
Marcin Slusarz [Mon, 18 Feb 2013 18:27:22 +0000 (13:27 -0500)]
compositor: Use libunwind if available for better backtraces
libunwind has a dwarf parser and automatically queries the dlinfo
for location of dlopened modules. The resulting backtrace is much
better and includes stack frames in dynamically loaded modules.
krh: Originally submitted for Xorg, adapted for weston:
http://lists.x.org/archives/xorg-devel/2013-February/035493.html
Note this require libunwind at least 1.1 to get the pkg-config files.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Jan Arne Petersen [Thu, 31 Jan 2013 14:52:23 +0000 (15:52 +0100)]
text: Split out cursor_position
Add an extra cursor_position, which also allows to change the anchor
(for slections). Change the index type to int to allow setting it before
the beginning of a commited string.
The cursor should not be moved as a direct repsonse to this event but
atomically on the next commit_string event.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Jan Arne Petersen [Thu, 31 Jan 2013 14:52:22 +0000 (15:52 +0100)]
text: Rename set_micro_focus request
Rename set_micro_focus to set_cursor_rectangle to make more clear, what
it refers to.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Jan Arne Petersen [Thu, 31 Jan 2013 14:52:21 +0000 (15:52 +0100)]
text: Add show/hide_input_panel requests
Allows to show/hide the input panel (virtual keyboard) more independent
of focus (some applications might to require additionaly click on a
focused entry to show the input panel).
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>