Commit Graph

1600 Commits

Author SHA1 Message Date
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
Tiago Vignatti
e4faa2ab05 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>
2012-04-16 16:38:30 -04:00
Tiago Vignatti
be14326efd 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>
2012-04-16 11:55:24 -04:00
Tiago Vignatti
7bef06654f desktop-shell: use description tags and improve protocol doc a bit
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-04-16 11:54:14 -04:00
Kristian Høgsberg
eb04ddb1b6 tty: Fall back to K_RAW if K_OFF is not available 2012-04-13 14:54:15 -04:00
Kristian Høgsberg
a6c8b0084f 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.
2012-04-13 12:55:45 -04:00
Kristian Høgsberg
3730f36c6e 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.
2012-04-13 12:40:18 -04:00
Kristian Høgsberg
f2eb68a921 window: Send serial number in set_popup request 2012-04-13 12:37:19 -04:00
Kristian Høgsberg
84b76c72c8 window: Initialize redraw_task.link so we can always remove it 2012-04-13 12:01:18 -04:00
Kristian Høgsberg
011abc8ac6 xserver-launcher: Pass serial to wl_input_device_set_selection() 2012-04-13 11:02:21 -04:00
Kristian Høgsberg
d012e9dfa4 Make xserver-launcher a module 2012-04-12 16:16:38 -04:00
Kristian Høgsberg
02e79dc935 compositor: Add a destroy signal and turn weston_shell into signals 2012-04-12 16:16:38 -04:00
Kristian Høgsberg
27e30526db Use wl_signal mechanism
Mostly mechanical rewrite to track waylands change to struct wl_signal.
2012-04-12 16:15:56 -04:00
Kristian Høgsberg
eae5de7609 Follow wayland change to serial numbers 2012-04-11 22:42:15 -04:00