profile/ivi/weston-ivi-shell.git
12 years agoclients: Add motion event trails to clickdot
Jonas Ådahl [Thu, 10 May 2012 21:26:25 +0000 (23:26 +0200)]
clients: Add motion event trails to clickdot

Useful for testing pointer device.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agoevdev: Use wl_fixed_t for relative motions
Jonas Ådahl [Thu, 10 May 2012 20:46:48 +0000 (16:46 -0400)]
evdev: Use wl_fixed_t for relative motions

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agowindow.c: frame_button: Maximize, minimize, close, icon buttons in window frame
Martin Minarik [Thu, 10 May 2012 00:04:35 +0000 (02:04 +0200)]
window.c: frame_button: Maximize, minimize, close, icon buttons in window frame

12 years agowindow.c: Just use float instead of GLfloat, remove GLES2.h include
Kristian Høgsberg [Thu, 10 May 2012 16:21:37 +0000 (12:21 -0400)]
window.c: Just use float instead of GLfloat, remove GLES2.h include

12 years agoFix a few -pedantic warnings
Kristian Høgsberg [Thu, 10 May 2012 16:28:35 +0000 (12:28 -0400)]
Fix a few -pedantic warnings

We're not enabling -pedantic by default, but a quick test brought up a few
issues that we should fix.

12 years agocompositor: Report refresh rates in mHz
Kristian Høgsberg [Thu, 10 May 2012 16:23:53 +0000 (12:23 -0400)]
compositor: Report refresh rates in mHz

We compute the higher resolution from the mode timing parameters.

12 years agocompositor: Simplify clip_pointer_motion() and make it handle dead areas
Kristian Høgsberg [Thu, 10 May 2012 02:21:14 +0000 (22:21 -0400)]
compositor: Simplify clip_pointer_motion() and make it handle dead areas

We were testing if the pointer were outside any output and doing a lot of
work to compute the bounding box of all output and then clip against that.
Just clip against previous (valid) output and don't bother with the
bounding box.

12 years agocompositor: When clipping pointer motions, don't loose precision
Jonas Ådahl [Wed, 9 May 2012 21:31:42 +0000 (23:31 +0200)]
compositor: When clipping pointer motions, don't loose precision

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agocompositor: Use wl_fixed_t for incoming input events
Kristian Høgsberg [Wed, 9 May 2012 16:19:04 +0000 (12:19 -0400)]
compositor: Use wl_fixed_t for incoming input events

This changes notify_motion, notify_pointer_focus and notify_touch to take
wl_fixed_t types for input coordinates.

12 years agocompositor: Move pointer motion clipping to its own function
Kristian Høgsberg [Wed, 9 May 2012 15:43:11 +0000 (11:43 -0400)]
compositor: Move pointer motion clipping to its own function

12 years agoevdev: Convert wl_fixed_t to int before using internally
Jonas Ådahl [Wed, 9 May 2012 06:46:44 +0000 (08:46 +0200)]
evdev: Convert wl_fixed_t to int before using internally

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
12 years agowindow: Don't crash if a cursor image failed to load.
Dima Ryazanov [Wed, 9 May 2012 04:02:33 +0000 (21:02 -0700)]
window: Don't crash if a cursor image failed to load.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
12 years agowindow: fix check of cursor image load result
Rafal Mielniczuk [Tue, 8 May 2012 20:10:44 +0000 (22:10 +0200)]
window: fix check of cursor image load result

12 years agoLoad an XKB keymap and state in the compositor
Daniel Stone [Tue, 1 May 2012 19:37:12 +0000 (20:37 +0100)]
Load an XKB keymap and state in the compositor

Not used yet, but will be in future commits.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoLink compositors to xkbcommon as well
Daniel Stone [Tue, 1 May 2012 19:37:11 +0000 (20:37 +0100)]
Link compositors to xkbcommon as well

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoAdd xkb_names member plus config + X11 support
Daniel Stone [Tue, 1 May 2012 19:37:10 +0000 (20:37 +0100)]
Add xkb_names member plus config + X11 support

Add an xkb_names member to the base compositor info which contains the
RMLVO to use when building an XKB keymap.  Add support for filling this
from the config file or from the underlying X11 server, with the usual
defaults.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoPort Wayland clients to new xkbcommon API
Kristian Høgsberg [Tue, 8 May 2012 19:55:39 +0000 (15:55 -0400)]
Port Wayland clients to new xkbcommon API

A little different from Daniels initial patch.  We look up the common
modifiers at xkb init time and convert the xkb serialized modifier mask
to our own modifier bitmask.

12 years agoConvert wire input co-ordinates to fixed-point
Daniel Stone [Tue, 8 May 2012 16:17:55 +0000 (17:17 +0100)]
Convert wire input co-ordinates to fixed-point

To add greater precision when working with transformed surfaces and/or
high-resolution input devices.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoConvert internal input co-ordinates to GLfloat
Daniel Stone [Tue, 8 May 2012 16:17:54 +0000 (17:17 +0100)]
Convert internal input co-ordinates to GLfloat

Change all client motion handlers to take GLfloat for co-ordinates,
rather than int32_t.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoAdd fixed-point versions of weston_surface_{to, from}_global
Daniel Stone [Tue, 8 May 2012 16:17:53 +0000 (17:17 +0100)]
Add fixed-point versions of weston_surface_{to, from}_global

To be used by input code, paralleling the existing integer versions.

Enlarge the surface_{to,from}_global_float input types to GLfloat to
avoid losing precision.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agobuild: Tighten mtdev dependency to reflect requirement
Rob Bradford [Tue, 8 May 2012 13:49:15 +0000 (14:49 +0100)]
build: Tighten mtdev dependency to reflect requirement

The mtdev_new_open symbol was added in 1.1.0.

12 years agoshell: use own struct for transient surfaces
Tiago Vignatti [Mon, 7 May 2012 12:23:08 +0000 (15:23 +0300)]
shell: use own struct for transient surfaces

No functional changes; it's only opening space for modifications coming along
on the next commits.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agoshell: fix uninitialized variable warning
Tiago Vignatti [Mon, 7 May 2012 12:23:07 +0000 (15:23 +0300)]
shell: fix uninitialized variable warning

and shut-up valgrind:
 Conditional jump or move depends on uninitialised value(s)
    at 0xB5AFB05: shell_surface_configure (shell.c:2162)
    by 0x407B0C: surface_attach (compositor.c:1225)
    by 0x621FA13: ffi_call_unix64
    by 0x621F434: ffi_call
    by 0x4E3D3F5: wl_closure_invoke (connection.c:758)
    by 0x4E3786C: wl_client_connection_data (wayland-server.c:255)
    by 0x4E3AA19: wl_event_source_fd_dispatch (event-loop.c:78)
    by 0x4E3B533: wl_event_loop_dispatch (event-loop.c:460)
    by 0x4E38D2C: wl_display_run (wayland-server.c:907)
    by 0x40B5DD: main (compositor.c:2748)

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agowindow: use only one shm pool for all the cursor images
Ander Conselvan de Oliveira [Mon, 7 May 2012 18:34:26 +0000 (11:34 -0700)]
window: use only one shm pool for all the cursor images

Cursor images are fairly small and having one pool for each image adds
a lot of unnecessary overhead. Instead, create one large pool and
allocated all cursor images from that.

In order to do that, however, the code that creates shm surface needed
some refactoring. This patch adds a new struct shm_pool that is used
by the cursor and also changes struct window to use it.

12 years agoRename 'state' in axis (or ambiguous) bindings to 'value'
Daniel Stone [Fri, 4 May 2012 10:21:57 +0000 (11:21 +0100)]
Rename 'state' in axis (or ambiguous) bindings to 'value'

Since it's usually an axis value rather than a boolean, be slightly more
explicit about it.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoChange button from int to uint32_t
Daniel Stone [Fri, 4 May 2012 10:21:55 +0000 (11:21 +0100)]
Change button from int to uint32_t

Since you can't really have a negative button number.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agoChange key/button grab bindings to take unsigned state
Daniel Stone [Fri, 4 May 2012 10:21:54 +0000 (11:21 +0100)]
Change key/button grab bindings to take unsigned state

'state' here meaning 'is it up or down?', obviously.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agotest-client: Include poll.h to silence warning
Daniel Stone [Fri, 4 May 2012 10:21:53 +0000 (11:21 +0100)]
test-client: Include poll.h to silence warning

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
12 years agodrm: Make KMS hw cursors work again
Kristian Høgsberg [Thu, 3 May 2012 15:39:35 +0000 (11:39 -0400)]
drm: Make KMS hw cursors work again

12 years agowindow: use libXcursor for loading pointer images
Ander Conselvan de Oliveira [Thu, 3 May 2012 09:29:46 +0000 (12:29 +0300)]
window: use libXcursor for loading pointer images

12 years agosimple-egl: add option for running fullscreen
Ander Conselvan de Oliveira [Wed, 2 May 2012 13:42:23 +0000 (16:42 +0300)]
simple-egl: add option for running fullscreen

12 years agocompositor-drm: alow scanning out of buffers with XRGB8888 format
Ander Conselvan de Oliveira [Wed, 2 May 2012 13:42:22 +0000 (16:42 +0300)]
compositor-drm: alow scanning out of buffers with XRGB8888 format

12 years agocompositor-drm: refactor to avoid unnecessary allocation of KMS FBs
Ander Conselvan de Oliveira [Wed, 2 May 2012 13:42:21 +0000 (16:42 +0300)]
compositor-drm: refactor to avoid unnecessary allocation of KMS FBs

Currently, the drm backend will create and destroy a KMS FB for each
frame. However, the bos for a gbm surface are reused (at least with
mesa) so we can store the fb_id on it and destroy it only on the bo's
destroy callback.

To use the same path for scanning out client buffers, some refactor
was needed. Previously, the bo for the client buffer was destroyed
early so that gbm_surface_release_buffer() would not be called with
it, since at the page flip handler output->scanout_buffer can be
NULL even if the current frame is a client buffer.

This was solved by adding a drm_fb structure that holds a gbm_bo,
an fb_id, and information about the fb coming from a client buffer
or not. A drm_fb is created in such a way that it is destroyed
whenever the bo it references is destroyed. The fields current_*
and next_* in drm_output are changed into only two pointers to
drm_fb's.

12 years agowindow: Set window title and class
Kristian Høgsberg [Wed, 2 May 2012 13:47:55 +0000 (09:47 -0400)]
window: Set window title and class

12 years agoshell: Handle set_title and set_class
Kristian Høgsberg [Wed, 2 May 2012 13:47:44 +0000 (09:47 -0400)]
shell: Handle set_title and set_class

12 years agoUse the dummy pbuffer we create to make current
Cooper Yuan [Mon, 30 Apr 2012 18:16:46 +0000 (14:16 -0400)]
Use the dummy pbuffer we create to make current

12 years agocompositor-drm: call EGL cleanup functions on exit
Ander Conselvan de Oliveira [Mon, 30 Apr 2012 10:31:28 +0000 (13:31 +0300)]
compositor-drm: call EGL cleanup functions on exit

12 years agoshell: Always configure when surface type changes
Kristian Høgsberg [Fri, 27 Apr 2012 21:51:59 +0000 (17:51 -0400)]
shell: Always configure when surface type changes

We can drop the force_configure hack.

12 years agoshell: Don't move or reconfigure surfaces until we get the new buffer
Kristian Høgsberg [Fri, 27 Apr 2012 21:20:01 +0000 (17:20 -0400)]
shell: Don't move or reconfigure surfaces until we get the new buffer

Going from fullscreen to toplevel will restore the surface position
immediately.  This will move the fullscreen surface to where the toplevel
surface was before, which will flicker for a frame of two before the
resized, non-fullscreen buffer is attached.

Instead, only change the surface geometry when we get the new buffer.

12 years agowindow: Only set toplevel window type if nothing else is set
Kristian Høgsberg [Fri, 27 Apr 2012 21:17:12 +0000 (17:17 -0400)]
window: Only set toplevel window type if nothing else is set

12 years agoshell: Fix not remove rotation for fullscreen surf
Alex Wu [Fri, 27 Apr 2012 01:07:24 +0000 (09:07 +0800)]
shell: Fix not remove rotation for fullscreen surf

Remove rotation when entering fullscreen and restore rotation when exiting.

https://bugs.freedesktop.org/show_bug.cgi?id=48906

12 years agoshell: allocate enough memory for shsurf->ping_timer
Ander Conselvan de Oliveira [Fri, 27 Apr 2012 10:55:55 +0000 (13:55 +0300)]
shell: allocate enough memory for shsurf->ping_timer

12 years agoMerge remote-tracking branch 'pq/simple-fixes'
Kristian Høgsberg [Fri, 27 Apr 2012 19:05:45 +0000 (15:05 -0400)]
Merge remote-tracking branch 'pq/simple-fixes'

12 years agotests: Add event-test, which tests for a few incoming events
Kristian Høgsberg [Fri, 27 Apr 2012 19:02:56 +0000 (15:02 -0400)]
tests: Add event-test, which tests for a few incoming events

We check that we get surface.enter_output and move the pointer into
the window and make sure we get input_device.pointer_enter with
the right coordinates.

There's a lot of code for a very simple test here, so we need to
figure out how to reuse most of the event handling and such.  It's also
not clear that a custom, text based protocol is practical here, we might
just use a wayland extension after all.

12 years agotests: Generalize test client and add helpers for launching it
Kristian Høgsberg [Fri, 27 Apr 2012 15:15:58 +0000 (11:15 -0400)]
tests: Generalize test client and add helpers for launching it

12 years agotests: Add test case for basic client lifecycle
Kristian Høgsberg [Thu, 26 Apr 2012 14:08:01 +0000 (10:08 -0400)]
tests: Add test case for basic client lifecycle

12 years agotests: Add an initial weston integration test
Kristian Høgsberg [Thu, 12 Apr 2012 16:54:14 +0000 (12:54 -0400)]
tests: Add an initial weston integration test

The idea here is to make weston load test cases as a module and then
run test cases from within weston.

12 years agocompositor: Initialize xserver variable
Scott Moreau [Wed, 25 Apr 2012 16:03:06 +0000 (10:03 -0600)]
compositor: Initialize xserver variable

This variable is used unitialized if --xserver is not passed to weston.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agofix build for --disable-clients --enable-simple-clients
Pekka Paalanen [Tue, 17 Apr 2012 13:49:12 +0000 (16:49 +0300)]
fix build for --disable-clients --enable-simple-clients

Simple clients were relying on AM_CFLAGS and AM_CPPFLAGS set for
toytoolkit clients. With toytoolkit clients disabled, the build fails
with missing wayland-client.h.

Move AM_CFLAGS and AM_CPPFLAGS outside of conditional sections, since
they are meant to be global settings.

Let simple clients override AM_CPPFLAGS with their own
SIMPLE_CLIENT_CFLAGS, which the configure script already sets up for us,
but was unused until now.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agosimple-shm: no need for wayland-egl.h
Pekka Paalanen [Tue, 17 Apr 2012 13:34:47 +0000 (16:34 +0300)]
simple-shm: no need for wayland-egl.h

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agosimple-shm: handle shm buffer failure
Pekka Paalanen [Wed, 18 Apr 2012 10:23:09 +0000 (13:23 +0300)]
simple-shm: handle shm buffer failure

Do not segfault, if creating the shm buffer fails.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: report .so path when load_module() fails
Pekka Paalanen [Thu, 26 Apr 2012 07:31:36 +0000 (10:31 +0300)]
compositor: report .so path when load_module() fails

I want to know which module is failing to load with unresolved symbols.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agosimple-shm: render meaningful diagnostics
Pekka Paalanen [Thu, 26 Apr 2012 12:14:50 +0000 (15:14 +0300)]
simple-shm: render meaningful diagnostics

Previously, simple-shm was rendering an image that looked like stride
gone wrong somewhere, and was quite confusing if you did not know it was
supposed to look like that.

Replace the drawing code. Two circles, inner and outer, now delimit
three co-centric areas. The outmost area from surface borders to outer
circle contains horizontal gradients that move (animate) to the left.
The area between outer and inner circles contains vertical gradients
that move upwards. The center disc has circular gradients moving towards
the center.

The circles are not ellipses.

Diagnostics:
The X-channel is manipulated so, that if a compositor takes the XRGB
image, and uses the X channel as alpha instead of ignoring it, the whole
image will be crossed out by two lines that either quickly saturate to
white or show through with additive blending. Does not work on black
background.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agogears: Allow model rotation with pointer
Scott Moreau [Tue, 24 Apr 2012 17:28:26 +0000 (11:28 -0600)]
gears: Allow model rotation with pointer

12 years agoshell-animation: add conf option in shell
Juan Zhao [Wed, 25 Apr 2012 11:09:52 +0000 (19:09 +0800)]
shell-animation: add conf option in shell

Now we can choose zoom or fade in weston.ini
to fulfill and customize the user experence easier.

Signed-off-by: Juan Zhao <juan.j.zhao@intel.com>
12 years agoanimation: add fading-in animation
Juan Zhao [Wed, 25 Apr 2012 11:09:51 +0000 (19:09 +0800)]
animation: add fading-in animation

To ful-fill user experience, add the fading-in animation
when mapping a window.
v2: update that westom_surface_damage to repaint
    remove that transform part in fade struct

Signed-off-by: Juan Zhao <juan.j.zhao@intel.com>
12 years agoAdd COPYING
Kristian Høgsberg [Wed, 25 Apr 2012 14:16:27 +0000 (10:16 -0400)]
Add COPYING

12 years agoxserver: Move window property reading to set_window_id handler
Kristian Høgsberg [Sun, 22 Apr 2012 19:12:45 +0000 (15:12 -0400)]
xserver: Move window property reading to set_window_id handler

This will work for override-redirect windows too.

12 years agoxserver: Read window properties in map request handler
Kristian Høgsberg [Sun, 22 Apr 2012 03:28:34 +0000 (23:28 -0400)]
xserver: Read window properties in map request handler

12 years agoshell: Don't ping internal shell surfaces
Kristian Høgsberg [Sun, 22 Apr 2012 03:20:07 +0000 (23:20 -0400)]
shell: Don't ping internal shell surfaces

This is a hack for now to get xserver surfaces working again.

12 years agocompositor: introduce internal shell_interface
Tiago Vignatti [Thu, 19 Apr 2012 13:18:18 +0000 (16:18 +0300)]
compositor: introduce internal shell_interface

We're able now to create shell_surfaces inside Weston. This makes possible the
glue needed between shell and xserver-launcher.

On the desktop-shell, it was split the protocol part from shell_surface
specific functions to make this possible.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agocompositor: Set pointer surface input region to empty on attach
Kristian Høgsberg [Sat, 21 Apr 2012 18:14:20 +0000 (14:14 -0400)]
compositor: Set pointer surface input region to empty on attach

We set up an emtpy region for the initial NULL-cursor, and then going
from no buffer to a 32x32 buffer didn't trigger the undeffing of the input
region.  So when something sets a cursor of a different size, the cursor
surface input region gets initialized and starts swallowing events.

12 years agoshell: Move binding-modifier to shell section
Kristian Høgsberg [Fri, 20 Apr 2012 20:48:21 +0000 (16:48 -0400)]
shell: Move binding-modifier to shell section

12 years agoshell: modifier bindings configurable
Tiago Vignatti [Fri, 20 Apr 2012 15:54:25 +0000 (18:54 +0300)]
shell: modifier bindings configurable

This patch makes the main modifier configurable.  We used to hardcode super
(windows key) for most bindings, but now that can be changed.

The change affects two key bindings: rotation moves to mod+right click
and backlight moves to from ctrl+f9/f10 to mod+f9/f10.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agoscreenshooter: Don't assume output offsets start at zero
Scott Moreau [Fri, 20 Apr 2012 19:37:35 +0000 (13:37 -0600)]
screenshooter: Don't assume output offsets start at zero

12 years agoscreenshooter: Move buffer assembly to client side
Scott Moreau [Fri, 20 Apr 2012 19:37:34 +0000 (13:37 -0600)]
screenshooter: Move buffer assembly to client side

12 years agoscreenshooter: Grab pixel data directly before buffer swap
Scott Moreau [Fri, 20 Apr 2012 19:37:33 +0000 (13:37 -0600)]
screenshooter: Grab pixel data directly before buffer swap

12 years agoSend surface enter/leave events
Casey Dahlin [Fri, 20 Apr 2012 02:50:09 +0000 (22:50 -0400)]
Send surface enter/leave events

These new protocol events allow us to tell which outputs a surface is on, and
potentially update where we allocate our buffers from.

Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
12 years agoAdd an id field to outputs
Casey Dahlin [Fri, 20 Apr 2012 02:50:08 +0000 (22:50 -0400)]
Add an id field to outputs

All outputs now have a unique integer ID, allocated from a bitfield pool in the
compositor.

Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
12 years agoChange find_resource_for_surface to find_resource_for_client
Casey Dahlin [Fri, 20 Apr 2012 02:50:07 +0000 (22:50 -0400)]
Change find_resource_for_surface to find_resource_for_client

This function has generic applications and should be made generic.

Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
12 years agoshell: Cleanup ping_timer code.
Scott Moreau [Thu, 19 Apr 2012 19:06:17 +0000 (13:06 -0600)]
shell: Cleanup ping_timer code.

 - Added ping_timer_destroy() to simplify cleanup.
 - Changed timeout and fade step to more realistic values.
 - Renamed ping_timeout_fade_frame() to unresponsive_fade_frame().

12 years agocompositor-drm: Remove an useless code line.
Alex Wu [Thu, 19 Apr 2012 02:08:59 +0000 (10:08 +0800)]
compositor-drm: Remove an useless code line.

12 years agoDim unresponsive windows
Scott Moreau [Wed, 18 Apr 2012 01:06:20 +0000 (19:06 -0600)]
Dim unresponsive windows

If a client is not responding, lower the brightness and
saturation to indicate it's stalled. The surface is restored
to it's original color values if the client later becomes
responsive.

12 years agoInstall brightness and saturation variables for surface shader
Scott Moreau [Wed, 18 Apr 2012 01:06:19 +0000 (19:06 -0600)]
Install brightness and saturation variables for surface shader

12 years agoInstall structuring for ping-pong protocol
Scott Moreau [Wed, 18 Apr 2012 01:06:18 +0000 (19:06 -0600)]
Install structuring for ping-pong protocol

12 years agoshell: Implement "driver" method of fullsceen.
Alex Wu [Tue, 17 Apr 2012 09:20:49 +0000 (17:20 +0800)]
shell: Implement "driver" method of fullsceen.

Switching display mode may happen when:
1. The fullscreen surface is at top most in fullscreen layer and with
   "driver" method. Shell will switch output mode to match the surface
   size. If no matched mode found, fall back to "fill" method.
2. The top fullscreen surface is destroyed or unset. Switch back to the
   origin mode.

12 years agocompositor-drm: Add switch_mode support.
Alex Wu [Tue, 17 Apr 2012 09:20:48 +0000 (17:20 +0800)]
compositor-drm: Add switch_mode support.

Implement switch_mode hook for drm backend.

12 years agocompositor: Add a switch_mode hook and a wrapper into the output.
Alex Wu [Tue, 17 Apr 2012 09:20:47 +0000 (17:20 +0800)]
compositor: Add a switch_mode hook and a wrapper into the output.

This allow each output backend to switch the display mode. It is
useful to some applications like fullscreen game, xbmc.

12 years agoweston-launch: be more descriptive with output messages
Tiago Vignatti [Tue, 17 Apr 2012 17:10:11 +0000 (20:10 +0300)]
weston-launch: be more descriptive with output messages

Specially the "either" word there is essential, so users don't confuse
thinking that both steps are needed.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agocompositor: make GL_EXT_read_format_bgra optional
Pekka Paalanen [Tue, 17 Apr 2012 12:02:08 +0000 (15:02 +0300)]
compositor: make GL_EXT_read_format_bgra optional

Some GL implementations do not provide GL_EXT_read_format_bgra
extension.

Set a glReadPixels format based on whether the extensions is supported
or not, and use that format in all backends.

Add RGBA->BGRA swapping copy to screenshooter to keep the shm buffer
data format as BGRA.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agoscreenshooter: refactor the copy loop
Pekka Paalanen [Tue, 17 Apr 2012 08:55:41 +0000 (11:55 +0300)]
screenshooter: refactor the copy loop

This makes it easier to later add an alternative copy loop.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: check queryString success
Pekka Paalanen [Thu, 12 Apr 2012 11:45:35 +0000 (14:45 +0300)]
compositor: check queryString success

During a bring-up of a new backend, it would be nice to get a real error
message, when the EGL and GL contexts have not been properly set up.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: use GL_EXT_unpack_subimage only if available
Pekka Paalanen [Wed, 11 Apr 2012 13:19:37 +0000 (16:19 +0300)]
compositor: use GL_EXT_unpack_subimage only if available

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: add EGL_WL_bind_wayland_display definitions
Pekka Paalanen [Fri, 30 Mar 2012 12:45:40 +0000 (15:45 +0300)]
compositor: add EGL_WL_bind_wayland_display definitions

This is a workaround for platforms, whose EGL headers miss the
definitions for EGL_WL_bind_wayland_display.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: move libudev.h to evdev.h
Pekka Paalanen [Fri, 30 Mar 2012 12:20:23 +0000 (15:20 +0300)]
compositor: move libudev.h to evdev.h

Compositor core does not do anything with udev, so the header is not
needed there. Move the #include into evdev.h, from where it gets used by
compositor-drm.c, too.

Also fix the fallout:
tty.c: In function 'tty_create':
tty.c:143:2: warning: implicit declaration of function 'fstat'

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agoconfig-parser: add missing return for an error case
Pekka Paalanen [Fri, 30 Mar 2012 10:54:53 +0000 (13:54 +0300)]
config-parser: add missing return for an error case

Fixes
config-parser.c: In function 'handle_key':
config-parser.c:81: error: control reaches end of non-void function

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
12 years agocompositor: init shell after xserver
Tiago Vignatti [Mon, 16 Apr 2012 14:31:44 +0000 (17:31 +0300)]
compositor: init shell after xserver

This reverts a snip from commit d012e9df. On that commit, it was lost the
ability of calling X applications from desktop panel; xserver module
was setting DISPLAY only later, after panel was already launched.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agodesktop-shell: use more consistent name for the main structure
Tiago Vignatti [Mon, 16 Apr 2012 14:31:41 +0000 (17:31 +0300)]
desktop-shell: use more consistent name for the main structure

wl_shell is more likely to be used for core protocol specific. Now it follows
pretty much the same style of what tablet-shell is using.

No functional changes.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agodesktop-shell: use description tags and improve protocol doc a bit
Tiago Vignatti [Mon, 16 Apr 2012 14:31:40 +0000 (17:31 +0300)]
desktop-shell: use description tags and improve protocol doc a bit

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
12 years agotty: Fall back to K_RAW if K_OFF is not available
Kristian Høgsberg [Fri, 13 Apr 2012 18:54:15 +0000 (14:54 -0400)]
tty: Fall back to K_RAW if K_OFF is not available

12 years agowindow.c: Drop the toolkit grab when we start a compositor grab
Kristian Høgsberg [Fri, 13 Apr 2012 16:55:45 +0000 (12:55 -0400)]
window.c: Drop the toolkit grab when we start a compositor grab

We do this right for move and resize, but dnd and popups need the same
treatment.

12 years agoshell: Tighten shell.set_popup semantics
Kristian Høgsberg [Fri, 13 Apr 2012 16:40:07 +0000 (12:40 -0400)]
shell: Tighten shell.set_popup semantics

We need to use the input device from the request, and check that the
serial matches the serial from the latest button press.

12 years agowindow: Send serial number in set_popup request
Kristian Høgsberg [Fri, 13 Apr 2012 16:37:19 +0000 (12:37 -0400)]
window: Send serial number in set_popup request

12 years agowindow: Initialize redraw_task.link so we can always remove it
Kristian Høgsberg [Fri, 13 Apr 2012 16:01:18 +0000 (12:01 -0400)]
window: Initialize redraw_task.link so we can always remove it

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