Commit Graph

1796 Commits

Author SHA1 Message Date
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
Kristian Høgsberg
31dd6b86c1 compositor: Don't pass output to notify_keyboard_focus
Doesn't make sense and was only used to distinguish between enter/leave.
2012-04-10 00:04:22 -04:00
Benjamin Franzke
78d3afe21c 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.
2012-04-09 18:20:26 +02:00
Benjamin Franzke
bfeda130de 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.
2012-04-06 14:01:19 +02:00
Kristian Høgsberg
1a36156972 screenshot.c: Fix up a few stylistic issues 2012-04-04 14:52:35 -04:00
Scott Moreau
80d27b7e06 screenshooter: Properly handle multiple outputs. 2012-04-04 14:28:53 -04:00
Tiago Vignatti
d081020435 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>
2012-04-03 14:53:47 -04:00
Kristian Høgsberg
610a3f2922 window: Check load_image result for NULL 2012-04-03 14:50:15 -04:00
Jonas Ådahl
3685c3abf6 Fix `unused-result' warnings.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-04-03 14:50:15 -04:00
Kristian Høgsberg
1103a1a484 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.
2012-04-03 12:00:48 -04:00
Kristian Høgsberg
8f64ed0381 window: Only initialize egl if we have cairo egl 2012-04-03 11:57:44 -04:00
Kristian Høgsberg
16626282fd clients: Use new shm interface 2012-04-03 11:22:06 -04:00
Kristian Høgsberg
919fbf0fee 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.
2012-04-03 10:53:15 -04:00
Kristian Høgsberg
32e568600f shell: Break up a few long lines 2012-04-02 22:18:58 -04:00
Alex Wu
1659daa21f 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.
2012-04-02 22:17:04 -04:00
Alex Wu
2185843ced 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.
2012-04-02 22:15:40 -04:00
Kristian Høgsberg
875ab9e735 Add signedness warning flag and fix fallout 2012-03-30 11:52:39 -04:00
Kristian Høgsberg
ed92f79655 Fix warnings resulting from wayland signedness fixes 2012-03-30 11:31:25 -04:00
Kristian Høgsberg
3448616bc3 Remove weston_shell map and configure function pointers 2012-03-29 13:08:32 -04:00
Kristian Høgsberg
56d23bc3ee shell: Remove obsolete workaround
Cursor surface now are properly initialized.
2012-03-29 11:35:32 -04:00
Kristian Høgsberg
dbae80e6b5 compositor: Support alpha for solid color surfaces 2012-03-29 11:34:39 -04:00
Jonas Ådahl
29a9cf0f97 tty: Improve error handling in tty_create()
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-03-28 23:03:00 -04:00
Jonas Ådahl
c97af923d9 Properly dispose event sources and event loops
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-03-28 23:00:08 -04:00
Kristian Høgsberg
b5ef591fac 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.
2012-03-28 22:53:49 -04:00
Kristian Høgsberg
cbcd04794c 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.
2012-03-28 22:29:21 -04:00
Tiago Vignatti
0a38611e7d 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>
2012-03-28 09:37:17 -04:00
Kristian Høgsberg
fb6de223b2 compositor: Use GL_EXT_unpack_subimage for texture updates 2012-03-27 17:10:20 -04:00
Kristian Høgsberg
8cbfb2a40a compositor: Rename weston_buffer_attach to weston_surface_attach
This was always an operation on the surface, not the buffer.
2012-03-27 17:05:06 -04:00
Kristian Høgsberg
679f716088 dnd: Damage surface after attaching new buffer 2012-03-27 16:45:13 -04:00
Kristian Høgsberg
a8ae8a9135 clients: Fix a couple of warnings 2012-03-27 16:39:17 -04:00
Tiago Vignatti
db4ecc61a7 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>
2012-03-27 16:36:54 -04:00
Ander Conselvan de Oliveira
7fb9f95dce compositor: move force_configure field to shell_surface 2012-03-27 16:36:54 -04:00
Ander Conselvan de Oliveira
093bfa3793 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.
2012-03-27 16:36:53 -04:00
Ander Conselvan de Oliveira
e11683aab2 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.
2012-03-27 16:36:53 -04:00
Ander Conselvan de Oliveira
d6ea33dfd6 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().
2012-03-27 16:36:53 -04:00