Commit Graph

1435 Commits

Author SHA1 Message Date
Kristian Høgsberg
f98d903b6d Merge branch 'layers'
I was integrating patches on the 'layers' branch and had a fixed version of
the fullscreen patch there.  My master branch had the fullscreen patch with
the resize bug, and when I pushed I meant to push the layers branch to master.

Conflicts:
	src/shell.c
2012-03-02 08:14:40 -05:00
Kristian Høgsberg
32bed57d5a shell: Don't launch a new screensaver if the old one is still running 2012-03-01 17:33:52 -05:00
Kristian Høgsberg
525696851e compositor: Damage sprite surface on attach
Normally the client is responsible for damaging the surface after attach,
but the sprite surface is an internal surface.
2012-03-01 17:33:52 -05:00
Kristian Høgsberg
867dec7ff0 compositor: Post keyboard leave before destroying surface
We may want to move this into wayland-server.
2012-03-01 17:33:51 -05:00
Ander Conselvan de Oliveira
3e3bb3216e compositor: split drag surface update into smaller functions 2012-03-01 17:33:51 -05:00
Ander Conselvan de Oliveira
c5fb9a7de9 compositor: fix crash when a drag surface is destroyed during the drag
This can happen for instance if the client that started the drag
crashes. Weston would crash because of the invalid surface pointed by
device->drag_surface.

Fix this by reseting the drag surface to nil on a destroy listener.
2012-03-01 17:33:51 -05:00
Kristian Høgsberg
3be2ce9e49 compositor: Organize surface stack using new struct weston_layer
The surface data structure is now a list of list of surfaces.  The core
compositor defines the fade and cursor layer, and it's up to the shell to
provide more layers for the various surface types it implements.
2012-03-01 17:33:51 -05:00
Kristian Høgsberg
944236a712 compositor: Just damage compositor->damage in weston_output_damage() 2012-03-01 12:47:23 -05:00
Kristian Høgsberg
1e8321213d compositor: Implement damage_below by using the new compositor->damage
We can now clip the surface bounding box against the previous frame
opaque clip, and then just union the result (visible damage) into
compositor->damage immediately.
2012-03-01 12:47:23 -05:00
Kristian Høgsberg
6ddcdaeb98 compositor: Store opaque clip for previous frame in weston_surface 2012-03-01 12:47:23 -05:00
Alex Wu
4539b0874f shell: Add implementation of fullscreen.
Undo fullscreen in shell_unset_fullscreen(), do all the stacking order
in shell_stack_fullscreen(), and configure black surface, method in
shell_configure_fullscreen().

Signed-off-by: Alex Wu <zhiwen.wu@linux.intel.com>
Signed-off-by: Juan Zhao <juan.j.zhao@linux.intel.com>
2012-03-01 12:47:23 -05:00
Alex Wu
b9747d02c6 shell: Add implementation of fullscreen.
Undo fullscreen in shell_unset_fullscreen(), do all the stacking order
in shell_stack_fullscreen(), and configure black surface, method in
shell_configure_fullscreen().

Signed-off-by: Alex Wu <zhiwen.wu@linux.intel.com>
Signed-off-by: Juan Zhao <juan.j.zhao@linux.intel.com>
2012-03-01 11:28:30 -05:00
Kristian Høgsberg
067fd60534 window.c: Drop support for rgb contexts 2012-02-29 16:15:53 -05:00
Kristian Høgsberg
8dbc4b3586 wscreensaver: Use the argb config, rgb is not compatible with window.c
Fixes the config/surface mismatch, spotted by Scott Moreau.
2012-02-29 16:14:54 -05:00
Kristian Høgsberg
51cba3ca38 compositor-drm: Just pull in libbacklight source for now
libbacklight is 300 lines of code in one .c file, and we're relying on
udev changes that aren't yet upstream.  For now, let's just keep a
copy in weston and if the Xorg DDX drivers start using libbacklight and
it becomes more widely available, we'll make it an external dependency.
2012-02-29 14:23:51 -05:00
Tiago Vignatti
8e53c7f566 compositor: add dpms and backlight support
DPMS kicks in only when wscreensaver is launched, in the moment that shell
call lock() for the second time. Backlight control internals are managed by
libbacklight:

	http://cgit.freedesktop.org/~vignatti/libbacklight/

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-02-29 14:01:56 -05:00
Kristian Høgsberg
2ea094422a zoom: Don't damage_all here
Setting geometry.dirty = 1 is enough.
2012-02-29 12:52:32 -05:00
Kristian Høgsberg
9b154fa82b compositor: Insert dnd icon surface below device sprite surface 2012-02-29 12:52:32 -05:00
Kristian Høgsberg
9bc7095a78 compositor: Set an empty input region for the fade surface
Otherwise we don't set the cursor until the fade is done.
2012-02-29 12:52:32 -05:00
Kristian Høgsberg
f10df85cd7 window: Set opaque region after child widget adjusts size 2012-02-29 12:43:05 -05:00
Rodney Lorrimar
99ff01b816 weston: Change path for default terminal launcher to ${prefix}/bin
If you don't have anything at ~/.config/weston-desktop-shell.ini and
have weston installed somewhere other than /usr, then this patch will
help.

Cheers,

Signed-off-by: Rodney Lorrimar <rodney@rodney.id.au>
2012-02-29 12:43:05 -05:00
Kristian Høgsberg
fcfc83f6ae clients: Use wl_display_disconnect() 2012-02-28 14:34:54 -05:00
Ander Conselvan de Oliveira
90fbbd74cc compositor: make the input region of drag surfaces empty
With the input region changes, drag surfaces were being picked and
receiving events which led to problems on the client side.
2012-02-28 14:34:53 -05:00
Kristian Høgsberg
cacb7cd0f6 shell: Mark geometry dirty when we change surface alpha
We need to recompute the opaque region when the alpha changes.
2012-02-28 09:23:23 -05:00
Kristian Høgsberg
3b4af20100 compositor: Dont set the opaque region if we have an overall surface alpha 2012-02-28 09:23:23 -05:00
Kristian Høgsberg
9dd1ed24db terminal: Don't queue a resize after setting fullscreen
We end up doing an attach at the non-fullscreen size before resizing to
fullscreen, causing the terminal to jump to the center for a frame before we
render the fullscreen image.
2012-02-28 09:23:23 -05:00
Alex Wu
8811bf9e8d compositor: Export functions and add weston_suface::force_configure for fullscreen
This will facilitate the implementation of fullscreen.

Signed-off-by: Alex Wu <zhiwen.wu@linux.intel.com>
2012-02-28 09:00:10 -05:00
Scott Moreau
c6d7f60b19 Restructure output zoom key handling.
This effectively eats the keybinding events, as we don't want them sent
to clients.
2012-02-26 13:43:11 -05:00
Kristian Høgsberg
4d7c862278 drm: Remove redundant cursor region math
We already check this in weston_output_set_cursor().
2012-02-24 11:07:43 -05:00
Kristian Høgsberg
ca14ef049d drm: Remove redundant weston_surface_update_transform() call 2012-02-23 23:07:45 -05:00
Kristian Høgsberg
d15fbe334a compositor: Remove surface overlapped attribute
We need to compute this as we assign surfaces to overlays, so that
if we assign a surface to an overlay, it isn't considered overlapping.
2012-02-23 23:06:13 -05:00
Kristian Høgsberg
d8bf90c150 Move weston_output_set_cursor into compositor-drm.c
First step towards moving hw cursor handling into compositor-drm.c a its
general overlay handling.
2012-02-23 23:03:14 -05:00
Kristian Høgsberg
85fd327f71 compositor-drm: Destroy sprites on shutdown, turn off on vt switch 2012-02-23 21:45:32 -05:00
Kristian Høgsberg
66617bb19d compositor: Remove unused compositor vfunc create_cursor_image 2012-02-23 21:29:55 -05:00
Jesse Barnes
58ef379be6 compositor-drm: Add sprite support
Add support for assigning surfaces to overlay sprites using the new
assign_planes hook.
2012-02-23 20:12:31 -05:00
Jesse Barnes
5308a5e09b compositor: add an assign_planes hook to the output
This allows each output back end to optimize drawing using overlay planes
and cursors (yet to be integrated).  If a surface is assigned to a
plane, the back end should clear its damage field so that the later
repaint code won't look at it.
2012-02-23 17:55:10 -05:00
Scott Moreau
2493be40a3 Fix pointer position clipping. 2012-02-23 17:45:56 -05:00
Scott Moreau
ccbf29dcb4 Introduce output zoom.
Ideally, we would want to use <modifier>+Scroll binding but that will have
to wait for axis events. For now we just use keybindings. Zoom in/out with
Super+Up/Down.
2012-02-23 17:45:49 -05:00
Kristian Høgsberg
4889154f5b compositor: Initialize destroy_listener_list for internal surfaces too
We use this to look up user data on the surface, so make sure the list is
always valid.
2012-02-23 17:38:33 -05:00
Kristian Høgsberg
010f98b083 window: Track and report input and opaque regions
We just set the input region to the bounding box of the window frame
and set the opaque region to be the opaque rectangle inside the window
if the child widget is opaque.
2012-02-23 17:30:54 -05:00
Kristian Høgsberg
dd631c1c36 simple-touch: Update to enter/leave changes 2012-02-23 16:20:38 -05:00
Kristian Høgsberg
5e7e6f2a22 compositor: Implement opqaue and input regions 2012-02-23 16:14:27 -05:00
Ander Conselvan de Oliveira
a2f1129d13 compositor: assign output to drag surfaces
Otherwise we endup with a surface that is mapped but with outtup nil.
2012-02-23 16:12:30 -05:00
Ander Conselvan de Oliveira
ba727bd1d9 shell: don't assign output for surface of type none
If map is called with a surface of type none it will call
weston_surface_assign_output, even though the surface will
not be mapped.
2012-02-23 16:06:06 -05:00
Kristian Høgsberg
06d58b74af Update to enter/leave events for pointer and keyboard 2012-02-23 09:59:05 -05:00
Alex Wu
88277d1422 shell: Fix never map fullscreen/transient surface.
If client send set_fullscreen/set_transient request before the first attach,
       compositor has no chance to map the surface due to "if (es->output == NULL)".

       You can pull it from git://gitorious.org/wayland-for-krh/weston.git map-bug
2012-02-22 12:33:43 -05:00
Kristian Høgsberg
31f9d0e8de compositor: Remove redundant weston_surface_damage_below() calls
In the attach case we always end up calling weston_surface_damage_below()
through weston_surface_update_transform() if and only if we need it.
2012-02-19 22:46:13 -05:00
Kristian Høgsberg
d0e2ef7779 compositor: Surface is unmapped when surface->output is NULL
surface->buffer can be NULL, which happens when a client destroys the
attached buffer.  Fixes list corruption on resize.
2012-02-19 22:15:21 -05:00
Kristian Høgsberg
0704539ec4 shell: Revive super-tab application switcher
We can do this right, now that we have keyboard grabs.
2012-02-19 21:04:08 -05:00
Kristian Høgsberg
afa264c6b6 compositor: Don't run keybindings if we have a key grab 2012-02-19 18:57:35 -05:00