Commit Graph

1813 Commits

Author SHA1 Message Date
Ander Conselvan de Oliveira
5f5f31939d compositor-drm: call EGL cleanup functions on exit 2012-04-30 10:44:18 -04:00
Kristian Høgsberg
f7e23d5c88 shell: Always configure when surface type changes
We can drop the force_configure hack.
2012-04-27 17:51:59 -04:00
Kristian Høgsberg
7f366e7053 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.
2012-04-27 17:49:40 -04:00
Kristian Høgsberg
407ef64e17 window: Only set toplevel window type if nothing else is set 2012-04-27 17:17:12 -04:00
Alex Wu
7bcb8bd30e 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
2012-04-27 15:10:37 -04:00
Ander Conselvan de Oliveira
fb9808993b shell: allocate enough memory for shsurf->ping_timer 2012-04-27 15:06:18 -04:00
Kristian Høgsberg
a8479f1e3a Merge remote-tracking branch 'pq/simple-fixes' 2012-04-27 15:05:45 -04:00
Kristian Høgsberg
3018b4431b 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.
2012-04-27 15:03:06 -04:00
Kristian Høgsberg
dd90921d87 tests: Generalize test client and add helpers for launching it 2012-04-27 11:15:58 -04:00
Kristian Høgsberg
915b7f8945 tests: Add test case for basic client lifecycle 2012-04-26 10:18:24 -04:00
Kristian Høgsberg
306e36185c 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.
2012-04-26 09:07:13 -04:00
Scott Moreau
e17f61008c compositor: Initialize xserver variable
This variable is used unitialized if --xserver is not passed to weston.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:56:06 +03:00
Pekka Paalanen
ec2507695f 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>
2012-04-26 15:50:12 +03:00
Pekka Paalanen
c3710f2379 simple-shm: no need for wayland-egl.h
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:45:13 +03:00
Pekka Paalanen
3baf946b9a simple-shm: handle shm buffer failure
Do not segfault, if creating the shm buffer fails.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:44:45 +03:00
Pekka Paalanen
f31ad10b77 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>
2012-04-26 15:44:13 +03:00
Pekka Paalanen
313bd84a48 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>
2012-04-26 15:42:05 +03:00
Scott Moreau
7890c4d36d gears: Allow model rotation with pointer 2012-04-25 10:52:43 -04:00
Juan Zhao
e10d279017 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>
2012-04-25 10:38:19 -04:00
Juan Zhao
2abd07b200 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>
2012-04-25 10:38:10 -04:00
Kristian Høgsberg
1f2ee8019f Add COPYING 2012-04-25 10:17:42 -04:00
Kristian Høgsberg
90c6f1c90e xserver: Move window property reading to set_window_id handler
This will work for override-redirect windows too.
2012-04-22 15:12:45 -04:00
Kristian Høgsberg
54094c3d42 xserver: Read window properties in map request handler 2012-04-21 23:28:34 -04:00
Kristian Høgsberg
ca535c1998 shell: Don't ping internal shell surfaces
This is a hack for now to get xserver surfaces working again.
2012-04-21 23:21:33 -04:00
Tiago Vignatti
bc052c99f9 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>
2012-04-21 23:21:08 -04:00
Kristian Høgsberg
b10f1e3ab0 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.
2012-04-21 23:21:08 -04:00
Kristian Høgsberg
a4e8b33704 shell: Move binding-modifier to shell section 2012-04-20 16:48:21 -04:00
Tiago Vignatti
0b52d4810d 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>
2012-04-20 16:38:35 -04:00
Scott Moreau
2074f1d788 screenshooter: Don't assume output offsets start at zero 2012-04-20 16:16:44 -04:00
Scott Moreau
72c2372148 screenshooter: Move buffer assembly to client side 2012-04-20 16:16:05 -04:00
Scott Moreau
062be7ec93 screenshooter: Grab pixel data directly before buffer swap 2012-04-20 16:13:27 -04:00
Casey Dahlin
9074db5d62 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>
2012-04-20 13:39:40 -04:00
Casey Dahlin
58ba1370d8 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>
2012-04-20 13:14:29 -04:00
Casey Dahlin
96d8a75ec0 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>
2012-04-20 13:11:06 -04:00
Scott Moreau
9521d5e553 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().
2012-04-19 15:12:43 -04:00
Alex Wu
adb624a297 compositor-drm: Remove an useless code line. 2012-04-19 14:52:56 -04:00
Scott Moreau
c3e54eb8f0 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.
2012-04-19 12:51:01 -04:00
Scott Moreau
69367082de Install brightness and saturation variables for surface shader 2012-04-19 12:50:57 -04:00
Scott Moreau
ff1db4a4f3 Install structuring for ping-pong protocol 2012-04-19 12:50:47 -04:00
Alex Wu
bd3354b8b2 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.
2012-04-17 14:38:45 -04:00
Alex Wu
b7b8bda600 compositor-drm: Add switch_mode support.
Implement switch_mode hook for drm backend.
2012-04-17 14:38:35 -04:00
Alex Wu
2dda604093 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.
2012-04-17 14:38:29 -04:00
Tiago Vignatti
314db6edef 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>
2012-04-17 14:10:42 -04:00
Pekka Paalanen
a1d57dba87 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>
2012-04-17 15:12:17 +03:00
Pekka Paalanen
45fab0e8e6 screenshooter: refactor the copy loop
This makes it easier to later add an alternative copy loop.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-17 14:57:24 +03:00
Pekka Paalanen
299e58d9f8 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>
2012-04-17 14:36:00 +03:00
Pekka Paalanen
52bfbaae14 compositor: use GL_EXT_unpack_subimage only if available
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-17 14:36:00 +03:00
Pekka Paalanen
2eaa11e954 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>
2012-04-17 14:36:00 +03:00
Pekka Paalanen
9bc1a4ef9e 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>
2012-04-17 14:33:30 +03:00
Pekka Paalanen
4ea4d1bb39 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>
2012-04-17 14:33:30 +03:00