Commit Graph

1596 Commits

Author SHA1 Message Date
Kristian Høgsberg
b435e84d5a window: Compute frame boundary for all windows except fullscreen
We were only computing it for toplevel type windows, which broke
the unlock dialog size allocation and repainting.
2012-03-05 20:38:08 -05:00
Kristian Høgsberg
41c5c4ee9a desktop-shell: Simplify unlock dialog redraw function 2012-03-05 20:37:51 -05:00
Kristian Høgsberg
65bec2452e drm: Disable sprites if they're broken
Current sprite implementation has a color format bug.  Disable sprites
if they don't work and avoid spamming stderr and syslog.
2012-03-05 19:57:35 -05:00
Kristian Høgsberg
7dbf5e2ea7 compositor: Only process input once per frame
When we're repainting, there's no point in polling for input events.
We just read input events once before each repaint and send out events
as needed.  The input events come with an accurate timestamp, so this
doesn't affect the timing information and client should always look at
the event timestamps if they're trying to determine pointer motion
speed or double click speed.  If we go idle (stop repainting) we add the
input devices back into the primary main loop and wait for the next event.

This avoids waking up the compositor separately (one or more times per
frame) to handle input events.  We also avoid updating cursor position
and other compositor state after the client has rendered its new
frame, reducing lag between what the client renders and the pointer
position.
2012-03-05 19:50:15 -05:00
Kristian Høgsberg
7ea10864c2 compositor: Move input devices to their own event loop
First step towards only handling input at repaint time.
2012-03-05 18:06:08 -05:00
Kristian Høgsberg
abcef3cf7a compositor: Swallow binding key for bindings that don't set up a grab
This prevents passing the key press and release to the keyboard focus client.
2012-03-05 17:47:15 -05:00
Kristian Høgsberg
63e5e06d82 window: Only set opaque and input regions if they change
Setting these regions damages the entire window or causes a repick, which
we don't want to trigger if we don't need to.
2012-03-05 00:04:57 -05:00
Kristian Høgsberg
d3c0275b14 Use wl_array_for_each() where possible 2012-03-04 22:35:47 -05:00
Pekka Paalanen
4ac32ab669 compositor-drm: fix libbacklight build
Bad inclusion of DRM headers, missing some system headers.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-03-04 22:00:02 -05:00
Kristian Høgsberg
0b5cd0cb4c Use typesafe server-side stubs 2012-03-04 21:57:37 -05:00
Kristian Høgsberg
b41c0810ea compositor: Add a repaint debugging mechanism
Toggle on/off with Super+SPACE.
2012-03-04 14:53:40 -05:00
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