profile/ivi/weston.git
12 years agoxserver-launcher: Pass serial to wl_input_device_set_selection()
Kristian Høgsberg [Fri, 13 Apr 2012 15:02:21 +0000 (11:02 -0400)]
xserver-launcher: Pass serial to wl_input_device_set_selection()

12 years agoMake xserver-launcher a module
Kristian Høgsberg [Thu, 12 Apr 2012 14:37:23 +0000 (10:37 -0400)]
Make xserver-launcher a module

12 years agocompositor: Add a destroy signal and turn weston_shell into signals
Kristian Høgsberg [Thu, 12 Apr 2012 13:55:26 +0000 (09:55 -0400)]
compositor: Add a destroy signal and turn weston_shell into signals

12 years agoUse wl_signal mechanism
Kristian Høgsberg [Thu, 12 Apr 2012 03:18:23 +0000 (23:18 -0400)]
Use wl_signal mechanism

Mostly mechanical rewrite to track waylands change to struct wl_signal.

12 years agoFollow wayland change to serial numbers
Kristian Høgsberg [Thu, 12 Apr 2012 02:42:15 +0000 (22:42 -0400)]
Follow wayland change to serial numbers

12 years agoshared: Use $(GCC_CFLAGS), fix warnings
Kristian Høgsberg [Wed, 11 Apr 2012 13:43:53 +0000 (09:43 -0400)]
shared: Use $(GCC_CFLAGS), fix warnings

12 years agoAlways build tests
Kristian Høgsberg [Wed, 11 Apr 2012 13:38:29 +0000 (09:38 -0400)]
Always build tests

There are no dependencies or requirements there that we don't already
need for weston itself.  So lets just always build them.

Use check_PROGRAMS for the matrix unit test case.

12 years agoweston: update .gitignore files
Casey Dahlin [Wed, 11 Apr 2012 04:20:33 +0000 (00:20 -0400)]
weston: update .gitignore files

Updates the .gitignore files for clients and tests to reflect a new test and a
couple of renamed applications.

Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
12 years agowindow: Fix remaining references to the egl image surface type
Kristian Høgsberg [Tue, 10 Apr 2012 20:55:11 +0000 (16:55 -0400)]
window: Fix remaining references to the egl image surface type

Didn't catch these before, was compiling with sw cairo.

12 years agoMerge branch 'output-hotplug' of git://people.freedesktop.org/~bnf/wayland-demos
Kristian Høgsberg [Tue, 10 Apr 2012 17:05:11 +0000 (13:05 -0400)]
Merge branch 'output-hotplug' of git://people.freedesktop.org/~bnf/wayland-demos

12 years agocompositor: Damage output in weston_output_init
Benjamin Franzke [Tue, 10 Apr 2012 16:35:33 +0000 (18:35 +0200)]
compositor: Damage output in weston_output_init

So that hotplugged outputs are marked damaged initially.

12 years agocompositor: Remove wl_output-global on unplug
Benjamin Franzke [Tue, 10 Apr 2012 16:28:54 +0000 (18:28 +0200)]
compositor: Remove wl_output-global on unplug

Or we would segfault when a client binds to a output thats already
destroyed.

12 years agowindow: Drop EGLImage surface type
Kristian Høgsberg [Tue, 10 Apr 2012 15:49:45 +0000 (11:49 -0400)]
window: Drop EGLImage surface type

12 years agowindow: Only unmap shm surface backing memory if it belongs to surface
Kristian Høgsberg [Tue, 10 Apr 2012 15:32:35 +0000 (11:32 -0400)]
window: Only unmap shm surface backing memory if it belongs to surface

Memory allocated out of the resize shm pool will be unmapped when the pool
is destroyed.

12 years agowindow: Simplify the shm surface management
Kristian Høgsberg [Tue, 10 Apr 2012 15:23:13 +0000 (11:23 -0400)]
window: Simplify the shm surface management

We can destroy a shm wl_buffer immediately after sending it to the server.

12 years agoshell: handle surface destruction during move, resize and rotate grabs
Ander Conselvan de Oliveira [Wed, 4 Apr 2012 14:48:05 +0000 (17:48 +0300)]
shell: handle surface destruction during move, resize and rotate grabs

When the surface being moved, resized or rotated was destroyed, the
compositor would crash.

Fix this by using a destroy listener on the referenced surface. To
reduce code duplication, the surface reference and the destroy
listener is added to a new struct shell_grab.

12 years agoweston-launcher: Fix uninitialized variable warning
Kristian Høgsberg [Tue, 10 Apr 2012 05:31:09 +0000 (01:31 -0400)]
weston-launcher: Fix uninitialized variable warning

12 years agoweston-launcher: Fix aliasing warnings
Kristian Høgsberg [Tue, 10 Apr 2012 05:26:18 +0000 (01:26 -0400)]
weston-launcher: Fix aliasing warnings

12 years agocompositor: End keyboard grab when compositor loses keyboard focus
Kristian Høgsberg [Tue, 10 Apr 2012 04:33:40 +0000 (00:33 -0400)]
compositor: End keyboard grab when compositor loses keyboard focus

12 years agotty: Put console in K_OFF mode
Kristian Høgsberg [Tue, 10 Apr 2012 04:18:33 +0000 (00:18 -0400)]
tty: Put console in K_OFF mode

This disables all kernel key bindings (VT switch keybindings, caps lock
etc) and disables delivery of console input.

12 years agodrm: Add vt switch keybindings
Kristian Høgsberg [Tue, 10 Apr 2012 04:11:50 +0000 (00:11 -0400)]
drm: Add vt switch keybindings

12 years agoevdev: Get key state from kernel on vt enter
Kristian Høgsberg [Tue, 10 Apr 2012 04:03:30 +0000 (00:03 -0400)]
evdev: Get key state from kernel on vt enter

We need this to correctly initialize compositor key state, modifier state and
to send the right keys in the key enter event.

12 years agodrm: Remove input devices before cancelling repaints in vt switch away
Kristian Høgsberg [Tue, 10 Apr 2012 04:08:45 +0000 (00:08 -0400)]
drm: Remove input devices before cancelling repaints in vt switch away

Removing the input devices will trigger events and activity that will cause
a redraw.  Do this before we put the compositor to sleep so we can cancel it
properly and avoid immediately waking the compositor again.

12 years agoxserver: Return EEXIST if unlinking lockfile fails
Kristian Høgsberg [Tue, 10 Apr 2012 02:14:52 +0000 (22:14 -0400)]
xserver: Return EEXIST if unlinking lockfile fails

Otherwise we'll keep trying to unlink it.

12 years agoxserver: Don't leak lockfile fd on error path
Kristian Høgsberg [Tue, 10 Apr 2012 02:13:17 +0000 (22:13 -0400)]
xserver: Don't leak lockfile fd on error path

12 years agocompositor: Don't pass output to notify_keyboard_focus
Kristian Høgsberg [Tue, 10 Apr 2012 02:10:00 +0000 (22:10 -0400)]
compositor: Don't pass output to notify_keyboard_focus

Doesn't make sense and was only used to distinguish between enter/leave.

12 years agoevdev: Disable the udev monitor when another vt becomes active
Benjamin Franzke [Mon, 9 Apr 2012 16:14:58 +0000 (18:14 +0200)]
evdev: Disable the udev monitor when another vt becomes active

We dont want to receive hotplug events while being inactive.
When getting back active we enumerate all devices and would end up
with two sources for one device that may be hotplugged in the mean time.

12 years agoIntroduce weston-launch
Benjamin Franzke [Mon, 30 Jan 2012 13:04:04 +0000 (14:04 +0100)]
Introduce weston-launch

weston-launch starts weston and provides mechanism
for weston to set/drop drm master, open a tty,
and read input devices without being root.

Execution is allowed for local-active sessions
or users in the group weston-launch.

12 years agoscreenshot.c: Fix up a few stylistic issues
Kristian Høgsberg [Wed, 4 Apr 2012 18:52:35 +0000 (14:52 -0400)]
screenshot.c: Fix up a few stylistic issues

12 years agoscreenshooter: Properly handle multiple outputs.
Scott Moreau [Wed, 4 Apr 2012 17:49:21 +0000 (11:49 -0600)]
screenshooter: Properly handle multiple outputs.

12 years agoclient: tablet-shell: fallback in the lack of lockscreen icon
Tiago Vignatti [Wed, 28 Mar 2012 17:56:48 +0000 (20:56 +0300)]
client: tablet-shell: fallback in the lack of lockscreen icon

lockscreen, homescreen and shell launchers are falling back okay already and
only lockscreen icon was missing some way to keep the shell client running in
the absence of images. This patch fix it.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agowindow: Check load_image result for NULL
Kristian Høgsberg [Tue, 3 Apr 2012 18:49:50 +0000 (14:49 -0400)]
window: Check load_image result for NULL

12 years agoFix `unused-result' warnings.
Jonas Ådahl [Fri, 30 Mar 2012 21:10:27 +0000 (23:10 +0200)]
Fix `unused-result' warnings.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agowindow: Use a persistent, big shm pool during resize
Kristian Høgsberg [Tue, 3 Apr 2012 16:00:48 +0000 (12:00 -0400)]
window: Use a persistent, big shm pool during resize

The biggest performance bottleneck while resizing is the continous
setting up and tearing down of mmaps and faulting in pages.  This commit
introduces a per-window pool that we'll allocate buffers out of if it's
available.  Then we set initialize it to a big shm pool when we start
resizing and free it when resizing is done.

12 years agowindow: Only initialize egl if we have cairo egl
Kristian Høgsberg [Tue, 3 Apr 2012 15:57:44 +0000 (11:57 -0400)]
window: Only initialize egl if we have cairo egl

12 years agoclients: Use new shm interface
Kristian Høgsberg [Tue, 3 Apr 2012 15:21:27 +0000 (11:21 -0400)]
clients: Use new shm interface

12 years agocairo-util: Use nearest filtering for rendering frame
Kristian Høgsberg [Tue, 3 Apr 2012 14:53:15 +0000 (10:53 -0400)]
cairo-util: Use nearest filtering for rendering frame

We don't need bilinear filtering here, the corners aren't scaled and
the scaled edges are just stretched along one axis.

12 years agoshell: Break up a few long lines
Kristian Høgsberg [Tue, 3 Apr 2012 02:18:58 +0000 (22:18 -0400)]
shell: Break up a few long lines

12 years agoshell: set black surface alpha properly in switcher_next()
Alex Wu [Sun, 1 Apr 2012 12:13:09 +0000 (20:13 +0800)]
shell: set black surface alpha properly in switcher_next()

Make the black surfaces semitransparent when switching surface, and
if associated fullscreen surface is chosen, make black surface opaque.

12 years agoshell: Add fullscreen path into activate()
Alex Wu [Sun, 1 Apr 2012 12:13:08 +0000 (20:13 +0800)]
shell: Add fullscreen path into activate()

Use shell_stack_fullscreen() to raise fullscreen surface in activate(),
and before activate() a regular surface, move all the fullscreen
surfaces from fullscreen_layer to toplevel_layer.

Also add a void *private into struct wesont_surface since we already
have a configure() vfunc. That helps to get the associated fullscreen
surface of black surface.

12 years agoAdd signedness warning flag and fix fallout
Kristian Høgsberg [Fri, 30 Mar 2012 15:52:39 +0000 (11:52 -0400)]
Add signedness warning flag and fix fallout

12 years agoFix warnings resulting from wayland signedness fixes
Kristian Høgsberg [Fri, 30 Mar 2012 15:31:25 +0000 (11:31 -0400)]
Fix warnings resulting from wayland signedness fixes

12 years agoRemove weston_shell map and configure function pointers
Kristian Høgsberg [Thu, 29 Mar 2012 17:08:32 +0000 (13:08 -0400)]
Remove weston_shell map and configure function pointers

12 years agoshell: Remove obsolete workaround
Kristian Høgsberg [Thu, 29 Mar 2012 15:35:32 +0000 (11:35 -0400)]
shell: Remove obsolete workaround

Cursor surface now are properly initialized.

12 years agocompositor: Support alpha for solid color surfaces
Kristian Høgsberg [Thu, 29 Mar 2012 15:34:39 +0000 (11:34 -0400)]
compositor: Support alpha for solid color surfaces

12 years agotty: Improve error handling in tty_create()
Jonas Ådahl [Wed, 28 Mar 2012 20:36:10 +0000 (22:36 +0200)]
tty: Improve error handling in tty_create()

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agoProperly dispose event sources and event loops
Jonas Ådahl [Wed, 28 Mar 2012 20:36:09 +0000 (22:36 +0200)]
Properly dispose event sources and event loops

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agocompositor: Stop using EGL_KHR_surfaceless_gles2
Kristian Høgsberg [Thu, 29 Mar 2012 02:53:49 +0000 (22:53 -0400)]
compositor: Stop using EGL_KHR_surfaceless_gles2

The remaining use case was making our context current before we had any
output surfaces.  We can do that now using a dummy surface, so let's stop
relying on surfaceless.

12 years agocompostor-drm: Use gbm surface
Kristian Høgsberg [Sun, 11 Mar 2012 22:27:41 +0000 (18:27 -0400)]
compostor-drm: Use gbm surface

Instead of using the hacks of gbm_bos, EGLImage, FBOs and surfaceless
we switch to using the new gbm surface API.  This gives us an EGL
native window type for gbm and lets us use a real EGL surface.

12 years agotablet-shell: come back to life
Tiago Vignatti [Wed, 28 Mar 2012 10:04:02 +0000 (13:04 +0300)]
tablet-shell: come back to life

A couple of fixes were made: Weston tablet-shell needed to use weston_layer,
so the compositor could rebuild the surface list correctly when repainting;
homescreen and locking are using the widget + window abstration of toytoolkit;
and widget_set_redraw_handler are being set for widgets redraw.

Also, it was given some basic meaning for lockscreen_button_handler, which
was completely disabled before. As a clean up, I updated the global listener
mechanism on tablet-shell client, using the regular way of registering a
handler instead wl_display_roundtrip -> wl_display_get_global.

Switcher still without code to proper work and the same for tablet-shell
clients, which are not launched.

krh: Edited to not scale down homescreen icons, use new load_cairo_surface()
for image loading.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agocompositor: Use GL_EXT_unpack_subimage for texture updates
Kristian Høgsberg [Tue, 27 Mar 2012 21:10:13 +0000 (17:10 -0400)]
compositor: Use GL_EXT_unpack_subimage for texture updates

12 years agocompositor: Rename weston_buffer_attach to weston_surface_attach
Kristian Høgsberg [Tue, 27 Mar 2012 21:04:59 +0000 (17:04 -0400)]
compositor: Rename weston_buffer_attach to weston_surface_attach

This was always an operation on the surface, not the buffer.

12 years agodnd: Damage surface after attaching new buffer
Kristian Høgsberg [Tue, 27 Mar 2012 20:44:57 +0000 (16:44 -0400)]
dnd: Damage surface after attaching new buffer

12 years agoclients: Fix a couple of warnings
Kristian Høgsberg [Tue, 27 Mar 2012 20:39:00 +0000 (16:39 -0400)]
clients: Fix a couple of warnings

12 years agoevdev: reuse code for device removal
Tiago Vignatti [Tue, 27 Mar 2012 18:26:01 +0000 (21:26 +0300)]
evdev: reuse code for device removal

Just like device_added, now the routines to close the compositor and vt switch
leave are using the same code to remove a device.

This patch also closes properly a mtdev device, bug spotted by Christopher
Michael.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agocompositor: move force_configure field to shell_surface
Ander Conselvan de Oliveira [Tue, 27 Mar 2012 14:36:42 +0000 (17:36 +0300)]
compositor: move force_configure field to shell_surface

12 years agocompositor: make surface_configure() a vfunc
Ander Conselvan de Oliveira [Tue, 27 Mar 2012 14:36:41 +0000 (17:36 +0300)]
compositor: make surface_configure() a vfunc

This allows us to move the logic that calls shell->map() or
shell->configure() into shell while allowing it to be overriden for
surfaces that should not be handle by the shell, such as drag icons.

This patch adds a pointer function called configure to weston_surface,
moves the currsent surface_configure() code into shell and implements
a separate configure() for drag surfaces.

12 years agocompositor: refactor surface_attach()
Ander Conselvan de Oliveira [Tue, 27 Mar 2012 14:36:40 +0000 (17:36 +0300)]
compositor: refactor surface_attach()

surface_attach() does two things: sets up a new buffer as the contents
of the given surface and then calls into shell so it can setup the
position of the surface and map it if necessary. However we do not want
the shell to meddle with some internal surfaces such as drag surfaces.

The intention of this refactoring is to make room for making the part
that calls into shell a virtual function that the compositor can
override for these internal surfaces.

This changes weston_buffer_attach() so it handle all the logic of tying
a buffer to a surface, including unmapping it when the buffer is NULL.
The shell map() vs. configure() logic is then split into a another
function: surface_configure(). In a later commit, this function will be
turned into a function pointer in struct weston_surface.

12 years agocompositor: use new drag icon listener for setting up drag surfaces
Ander Conselvan de Oliveira [Tue, 27 Mar 2012 14:36:39 +0000 (17:36 +0300)]
compositor: use new drag icon listener for setting up drag surfaces

That way we can get rid of the call to
weston_compositor_update_drag_surfaces() on shell->map().

12 years agocompositor: make es->pitch consistent between shm and drm surfaces
Ander Conselvan de Oliveira [Tue, 27 Mar 2012 14:36:38 +0000 (17:36 +0300)]
compositor: make es->pitch consistent between shm and drm surfaces

For shm buffers, es->pitch is set using the stride of the buffer. If
the shell happened to set the surface width to something different than
the buffer width, the contents of the surface would be cropped on the
width during redraw. However, for non-shm surfaces, es->pitch was set to
the surface width. That caused the contents of the buffer to be scaled
on the width when the buffer was wider than the surface.

This makes the behavior on both cases the same: crop on the width and
scale on the height. (which is weird but consistent)

12 years agocompositor: add weston_surface_to_global_float helper
Ander Conselvan de Oliveira [Tue, 27 Mar 2012 14:36:37 +0000 (17:36 +0300)]
compositor: add weston_surface_to_global_float helper

12 years agocompositor: add a weston_surface_is_mapped() helper
Ander Conselvan de Oliveira [Tue, 27 Mar 2012 14:36:36 +0000 (17:36 +0300)]
compositor: add a weston_surface_is_mapped() helper

12 years agocompositor: Use GL_BGRA_EXT for glReadPixels in screenshooter
Kristian Høgsberg [Tue, 27 Mar 2012 19:25:46 +0000 (15:25 -0400)]
compositor: Use GL_BGRA_EXT for glReadPixels in screenshooter

This needs GL_EXT_read_format_bgra.

12 years agoSimplify shm buffer handling
Kristian Høgsberg [Mon, 26 Mar 2012 19:56:39 +0000 (15:56 -0400)]
Simplify shm buffer handling

There was a lot of code here to do a lot of work we didn't need to do.
If we damage a surface with a shm buffer attached, all we need to do
is to re-upload the damaged region to the texture.  As for drm buffers,
we don't assume anything changes on attach and only update the
regions the client tells us to update in the damage request.

12 years agowindow.c: Do resize work from the repaint idle callback
Kristian Høgsberg [Mon, 26 Mar 2012 17:49:29 +0000 (13:49 -0400)]
window.c: Do resize work from the repaint idle callback

This way we always make sure we handle any resizing before we start drawing.

12 years agocompositor-drm: Check es->image, not es->buffer when looking for overlays
Kristian Høgsberg [Mon, 26 Mar 2012 15:48:55 +0000 (11:48 -0400)]
compositor-drm: Check es->image, not es->buffer when looking for overlays

es->buffer can be NULL if the client destroyed the buffer, but es->image
will be non-NULL if and only if we have a buffer we might use with KMS.

12 years agoconfig-parser: consolidate shell files into weston.ini only
Tiago Vignatti [Wed, 21 Mar 2012 17:49:18 +0000 (19:49 +0200)]
config-parser: consolidate shell files into weston.ini only

The shell choice happens in the configuration file now.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agowindow.c; Only redraw once per frame
Kristian Høgsberg [Sat, 24 Mar 2012 18:42:09 +0000 (14:42 -0400)]
window.c; Only redraw once per frame

Based on a patch from Martin Minarik <minarik11@student.fiit.stuba.sk> who
tracked down the excessive redraw problem.

12 years agoSecure screenshooter protocol.
Scott Moreau [Fri, 23 Mar 2012 22:42:04 +0000 (16:42 -0600)]
Secure screenshooter protocol.

12 years agoshell: fix matrix invertible bug in rotation handler
Rafal Mielniczuk [Thu, 22 Mar 2012 21:22:04 +0000 (22:22 +0100)]
shell: fix matrix invertible bug in rotation handler

While activating and deactivating rotation mechanism without moving
the pointer, rotation matrix from rotate_grab object is not being
initialised and damage shell surface rotation matrix in
rotate_grab_button handler, making it invertible.

This patch initialise rotate matrix in rotate_binding
and moves surface position check to rotate_grab_motion handler.

12 years agoAdd surface opacity controls.
Scott Moreau [Thu, 22 Mar 2012 17:01:03 +0000 (11:01 -0600)]
Add surface opacity controls.

12 years agoSwitch zoom binding to <Super>+Scroll.
Scott Moreau [Thu, 22 Mar 2012 16:58:23 +0000 (10:58 -0600)]
Switch zoom binding to <Super>+Scroll.

12 years agoModify bindings for axis event detection.
Scott Moreau [Tue, 20 Mar 2012 14:47:59 +0000 (08:47 -0600)]
Modify bindings for axis event detection.

12 years agoHook up axis events.
Scott Moreau [Thu, 22 Mar 2012 16:47:01 +0000 (10:47 -0600)]
Hook up axis events.

12 years agodrm: plane src coords are 16.16 fixed point
Rob Clark [Mon, 12 Mar 2012 00:48:43 +0000 (19:48 -0500)]
drm: plane src coords are 16.16 fixed point

12 years agoshell: correct position of a surface before rotating it.
Rafal Mielniczuk [Wed, 21 Mar 2012 21:40:20 +0000 (22:40 +0100)]
shell: correct position of a surface before rotating it.

How to reproduce: rotate the surface to something like 45 degrees,
resize it drastically, continue to rotate. The surface will jump
some space and the rotation point will not be in the center
of the surface.

Fix is to shift the surface position to match the rotation point

12 years agowindow.c: Fix the stretch scaling code
Kristian Høgsberg [Wed, 21 Mar 2012 16:37:04 +0000 (12:37 -0400)]
window.c: Fix the stretch scaling code

12 years agowindow.c: Increase drop shadow fluffiness
Kristian Høgsberg [Wed, 21 Mar 2012 05:07:49 +0000 (01:07 -0400)]
window.c: Increase drop shadow fluffiness

12 years agowindow.c: Tweak window decoration appearance
Kristian Høgsberg [Wed, 21 Mar 2012 03:56:05 +0000 (23:56 -0400)]
window.c: Tweak window decoration appearance

The old orange decorations were starting to look like clown shoes.

12 years agoRevert "automake: Don't fail the build if we can't setuid."
Kristian Høgsberg [Wed, 21 Mar 2012 02:44:08 +0000 (22:44 -0400)]
Revert "automake: Don't fail the build if we can't setuid."

This reverts commit e7ad5cdcd2eb8a307ad9cf2efdfde76f2e83aeb7.

If you ask for setuid install and that fails you didn't get what you
asked for and we shouldn't just silently carry on.  If installing weston
somewhere in your home directory and don't want the setuid bit set,
disable that at configure time.

12 years agoevdev: fix input lag when processing input from output repaint
Ander Conselvan de Oliveira [Tue, 20 Mar 2012 23:52:57 +0000 (19:52 -0400)]
evdev: fix input lag when processing input from output repaint

When the compositor is in a repaint cycle, input is processed only once
per frame. However, a call to evdev_input_device_data() would handle at
most 8 events at time. When there was more than 8 events pending for a
given frame, input lag would occur. This was most visible with multi
touch input.

This patch changes the evdev_input_device_data() so that it will handle
all the events available in the fd. In order to do that, the fd is put
in non-blocking mode, so that it is possible to loop on read and stop
on EAGAIN instead of blocking.

12 years agocompositor: Fix pointer type mismatch warnings
Kristian Høgsberg [Tue, 20 Mar 2012 21:28:20 +0000 (17:28 -0400)]
compositor: Fix pointer type mismatch warnings

12 years agoweston_surface: initialize pitch
Juan Zhao [Mon, 19 Mar 2012 17:48:46 +0000 (01:48 +0800)]
weston_surface: initialize pitch

Initializing pitch to 1 to avoid xxx/pitch errors
This won't influence the valid texture coordinate calculation, because
 in that case buffer_attach will provide the correct value.

12 years agoweston: don't hang in wait()
Bill Spitzak [Sat, 17 Mar 2012 22:22:03 +0000 (15:22 -0700)]
weston: don't hang in wait()

Pausing weston (with ^Z in the shell) and putting it in the background
made it hang.

12 years agoweston: Don't ask for EGL depth buffer if not needed
Bill Spitzak [Sat, 17 Mar 2012 20:43:52 +0000 (13:43 -0700)]
weston: Don't ask for EGL depth buffer if not needed

This makes the compositor and demo clients work on the current nouveau
nvfx driver. Obviously does not fix any clients that actually want a
depth buffer, but this does allow more people to at least try wayland.

12 years agoevdev: use mtdev for multitouch devices
Tiago Vignatti [Fri, 16 Mar 2012 20:33:03 +0000 (17:33 -0300)]
evdev: use mtdev for multitouch devices

mtdev library translates all multitouch based devices to the slotted evdev
protocol. It provides an uniform interface for Weston, which eases mt
implementation when dealing with a big variety of devices.

Weston on drm now directly depends on such library.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
12 years agocompositor: properly restore keyboard_focus in notify_keyboard_focus()
Ander Conselvan de Oliveira [Fri, 16 Mar 2012 15:25:11 +0000 (17:25 +0200)]
compositor: properly restore keyboard_focus in notify_keyboard_focus()

Commit f992b2fc removed the saved keyboard focus logic to fix a crash
when the saved surface is destroyed. However, setting keyboard focus to
the first surface on the list ends up trying to set the focus to the
cursor surface most of the time. The end result is a NULL keyboard
focus.

This patch restores the saved keyboard focus logic and fixes the crash
mentioned above using a destroy listener.

12 years agocompositor: allow multiple input_device_attach()'s with a nil buffer
Ander Conselvan de Oliveira [Fri, 16 Mar 2012 15:25:10 +0000 (17:25 +0200)]
compositor: allow multiple input_device_attach()'s with a nil buffer

Without this change, weston would crash whenever a nil buffer was
passed to input_device_attach() if the cursor sprite was not mapped.
While at it, change the unmapping code to use weston_surface_unmap().

12 years agocompositor-wayland: use image loading code from shared/
Ander Conselvan de Oliveira [Fri, 16 Mar 2012 15:25:09 +0000 (17:25 +0200)]
compositor-wayland: use image loading code from shared/

Function weston_load_image() was deleted in f02a649a but the wayland
backend was not adapted to the new interface. This probably went
unoticed because the prototype for the missing function was not deleted
from compositor.h so the backend would compile without warnings.

12 years agocairo-util: load_cairo_surface returns NULL if loading the file fails.
Ustun Ergenoglu [Wed, 14 Mar 2012 20:07:58 +0000 (22:07 +0200)]
cairo-util: load_cairo_surface returns NULL if loading the file fails.

Otherwise a non-existent file in the configuration crashes the desktop shell.

Signed-off-by: Ustun Ergenoglu <ego@ustun.fi>
12 years agocompositor: use smoother range for backlight control
Tiago Vignatti [Mon, 12 Mar 2012 22:40:09 +0000 (19:40 -0300)]
compositor: use smoother range for backlight control

now it goes from 0 to 255.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agotests: add backlight test
Tiago Vignatti [Mon, 12 Mar 2012 22:40:08 +0000 (19:40 -0300)]
tests: add backlight test

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agoshell: Fix 2 switcher crashes.
Alex Wu [Mon, 12 Mar 2012 08:06:01 +0000 (16:06 +0800)]
shell: Fix 2 switcher crashes.

In case of no regular window, switcher will crash in switch_next()
due to "next == NULL" and in switcher_destroy() due to
"switcher->current == NULL".

12 years agoautomake: Don't fail the build if we can't setuid.
Eric Anholt [Thu, 9 Feb 2012 02:02:00 +0000 (18:02 -0800)]
automake: Don't fail the build if we can't setuid.

The configure default is to setuid root the weston compositor.
However, if installing as non-root (say, to your prefix in homedir),
the install fails anyway, even if you didn't need setuid to run weston
in your configuration.

12 years agoconfigure: Fix build on debian by avoiding bashisms in the test command.
Eric Anholt [Thu, 9 Feb 2012 01:46:31 +0000 (17:46 -0800)]
configure: Fix build on debian by avoiding bashisms in the test command.

12 years agoConsolidate image loading code and move to shared/
Kristian Høgsberg [Mon, 12 Mar 2012 05:05:25 +0000 (01:05 -0400)]
Consolidate image loading code and move to shared/

12 years agoAdd an option parser
Kristian Høgsberg [Mon, 12 Mar 2012 01:05:57 +0000 (21:05 -0400)]
Add an option parser

On one hand, getopt (in particular the -o suboption syntax) sucks on the
server side, and on the client side we would like to avoid the glib
dependency.  We can roll out own option parser and solve both problems
and save a few lines of code total.

12 years agox11: Move the xcb fd to the input loop
Kristian Høgsberg [Mon, 12 Mar 2012 05:18:24 +0000 (01:18 -0400)]
x11: Move the xcb fd to the input loop

This way, we handle input just before repaint, similar to the drm backend.

12 years agoFix picking crashes
Kristian Høgsberg [Sun, 11 Mar 2012 20:35:16 +0000 (16:35 -0400)]
Fix picking crashes

The surface list is only valid after repaint, so we need to do picking and
input delivery there.

12 years agodrm: fix issue copying supported plane formats
Rob Clark [Mon, 12 Mar 2012 00:48:44 +0000 (19:48 -0500)]
drm: fix issue copying supported plane formats

Originally on the first 1/4th of the plane formats were copied, leading
to problems if AR24/XR24 appears later in the list.