Commit Graph

1880 Commits

Author SHA1 Message Date
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
Kristian Høgsberg
ee4b4cb933 shared: Use $(GCC_CFLAGS), fix warnings 2012-04-11 09:46:51 -04:00
Kristian Høgsberg
6412718c0d 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.
2012-04-11 09:38:32 -04:00
Casey Dahlin
476168ea05 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>
2012-04-11 08:24:35 -04:00
Kristian Høgsberg
5990fbb6e2 window: Fix remaining references to the egl image surface type
Didn't catch these before, was compiling with sw cairo.
2012-04-10 16:55:11 -04:00
Kristian Høgsberg
38f0c14af3 Merge branch 'output-hotplug' of git://people.freedesktop.org/~bnf/wayland-demos 2012-04-10 13:05:11 -04:00
Benjamin Franzke
78db848196 compositor: Damage output in weston_output_init
So that hotplugged outputs are marked damaged initially.
2012-04-10 18:51:49 +02:00
Benjamin Franzke
b687940cd5 compositor: Remove wl_output-global on unplug
Or we would segfault when a client binds to a output thats already
destroyed.
2012-04-10 18:51:15 +02:00
Kristian Høgsberg
bad4297380 window: Drop EGLImage surface type 2012-04-10 11:49:45 -04:00
Kristian Høgsberg
24b5e230fa 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.
2012-04-10 11:32:35 -04:00
Kristian Høgsberg
6e2a8d74b5 window: Simplify the shm surface management
We can destroy a shm wl_buffer immediately after sending it to the server.
2012-04-10 11:23:13 -04:00
Ander Conselvan de Oliveira
fe0444a9a9 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.
2012-04-10 01:40:11 -04:00
Kristian Høgsberg
ba25bd7be1 weston-launcher: Fix uninitialized variable warning 2012-04-10 01:31:09 -04:00
Kristian Høgsberg
9e14091778 weston-launcher: Fix aliasing warnings 2012-04-10 01:26:18 -04:00
Kristian Høgsberg
035dd9c4de compositor: End keyboard grab when compositor loses keyboard focus 2012-04-10 00:35:15 -04:00
Kristian Høgsberg
eeb2e50a76 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.
2012-04-10 00:35:15 -04:00
Kristian Høgsberg
5d1c0c58ad drm: Add vt switch keybindings 2012-04-10 00:35:09 -04:00
Kristian Høgsberg
a00d60f6ac 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.
2012-04-10 00:19:40 -04:00
Kristian Høgsberg
4014a6b05b 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.
2012-04-10 00:08:47 -04:00
Kristian Høgsberg
e5cf741669 xserver: Return EEXIST if unlinking lockfile fails
Otherwise we'll keep trying to unlink it.
2012-04-10 00:04:57 -04:00
Kristian Høgsberg
2c76be7c1b xserver: Don't leak lockfile fd on error path 2012-04-10 00:04:57 -04:00