Commit Graph

1464 Commits

Author SHA1 Message Date
Tiago Vignatti
1b079abe0e tests: add backlight test
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-03-20 22:43:54 -04:00
Alex Wu
07b2606c7a shell: Fix 2 switcher crashes.
In case of no regular window, switcher will crash in switch_next()
due to "next == NULL" and in switcher_destroy() due to
"switcher->current == NULL".
2012-03-20 22:43:54 -04:00
Eric Anholt
e7ad5cdcd2 automake: Don't fail the build if we can't setuid.
The configure default is to setuid root the weston compositor.
However, if installing as non-root (say, to your prefix in homedir),
the install fails anyway, even if you didn't need setuid to run weston
in your configuration.
2012-03-13 12:39:00 -07:00
Eric Anholt
0e8d48b920 configure: Fix build on debian by avoiding bashisms in the test command. 2012-03-13 12:39:00 -07:00
Kristian Høgsberg
f02a649a3c Consolidate image loading code and move to shared/ 2012-03-12 01:40:59 -04:00
Kristian Høgsberg
bcacef19b0 Add an option parser
On one hand, getopt (in particular the -o suboption syntax) sucks on the
server side, and on the client side we would like to avoid the glib
dependency.  We can roll out own option parser and solve both problems
and save a few lines of code total.
2012-03-12 01:28:50 -04:00
Kristian Høgsberg
22ba60e514 x11: Move the xcb fd to the input loop
This way, we handle input just before repaint, similar to the drm backend.
2012-03-12 01:28:50 -04:00
Kristian Høgsberg
aa6019e125 Fix picking crashes
The surface list is only valid after repaint, so we need to do picking and
input delivery there.
2012-03-12 01:28:50 -04:00
Rob Clark
8efbc8ee62 drm: fix issue copying supported plane formats
Originally on the first 1/4th of the plane formats were copied, leading
to problems if AR24/XR24 appears later in the list.
2012-03-12 01:16:13 -04:00
Rob Clark
6396ed36f4 clients/window: fix build issues w/ gles 2012-03-12 01:16:12 -04:00
David Herrmann
6ac52db3b0 compositor-drm: use udev_device_get_property_value() helper
Udev provides a convenient helper. Use it instead of working with the
property-list directly.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-11 15:55:32 -04:00
David Herrmann
d7488c2f5b compositor-drm: ignore hotplug-events from other devices
If we have multiple video devices on the system (card0, card1), we should
ignore hotplug events for cards that we do not use. This avoids calling
update_outputs() if the event was not generated by our device so we avoid
refreshing the DRM information if it didn't change.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2012-03-11 15:54:49 -04:00
Christopher Michael
eb866cd9fe drm: Fix drmModeRes leak on error paths
When creating outputs in the drm compositor, if allocating crtcs
fails, then free the drm resources. Also, if the base output list is
empty, free drm resources
2012-03-08 13:17:11 -05:00
Benjamin Franzke
0eee939d76 compositor: Fix compilation without xserver launcher 2012-03-08 13:15:02 -05:00
Ander Conselvan de Oliveira
de56c311d9 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.

This change was lost with the changes for using wl_layers.
2012-03-08 13:10:18 -05:00
Alex Wu
9c35e6b47d shell: Fix segment fault when clicking to activate a NULL pointer_focus
This can happen for instance running a toytoolkit application, launching
the popup menu and then clicking on a surface that does not belong to
the client that create the popup surface.
2012-03-08 13:08:00 -05:00
Alex Wu
aa08e2d56d shell: Fix not destroy black surface when fullscreen surface exit abnomally.
When a client with fullscreen surface displayed was aborted by Ctrl-C, the
black surface still be there. Destroy the black surface in
destroy_shell_surface().
2012-03-08 12:57:54 -05:00
Kristian Høgsberg
60c4954b8a shell: Put popups and transients on top of their parent
In other words, don't map the panel menu under the panel.
2012-03-05 20:51:34 -05:00
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