Commit Graph

2239 Commits

Author SHA1 Message Date
Pekka Paalanen
b9d38f4552 evdev: do not pass a list to evdev_led_update()
evdev_led_update() does not really need the whole list of device at
once, it can be called one device at a time.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-09 10:28:35 -04:00
Pekka Paalanen
f1fc10a488 compositor: fix weston_log format warnings
compositor.c: In function ‘log_extensions’:
compositor.c:3085:7: warning: field precision should have type ‘int’,
but argument 2 has type ‘long int’
compositor.c:3087:4: warning: field precision should have type ‘int’,
but argument 2 has type ‘long int’

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-09 10:27:39 -04:00
Pekka Paalanen
ae29da2eb8 compositor-drm: fix weston_log format errors
compositor-drm.c: In function 'drm_output_set_cursor':
compositor-drm.c:754:4: warning: too few arguments for format
compositor-drm.c:759:4: warning: too few arguments for format

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-09 10:27:34 -04:00
Pekka Paalanen
d525b564ae compositor: format check for weston_log arguments
Add gcc format check attribute to the weston_log() and
weston_log_continue() functions.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-09 10:27:28 -04:00
Pekka Paalanen
df1fd36a14 compositor: log program launches
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-09 10:27:21 -04:00
Scott Moreau
ca9b09d945 compositor-x11: Always free output_mode on error. 2012-08-09 10:23:26 -04:00
Kristian Høgsberg
3d89049546 config-parser: Handle lines that don't end in \n
If the last line in a config file doesn't have a newline
we end up chopping off the last character from that line.
2012-08-03 21:56:41 -04:00
Scott Moreau
248aaecda2 compositor-x11: Allow output configuration from config file.
This patch provides a way to define outputs for the x11 backend. It
parses [output] sections and checks for 'name' and 'mode' keys. The
'name' must start with an 'X' to distinguish from drm output names.
Command line options --width and --height supersede what is in the
config file. When --output-count is passed, the number of outputs
are limited or additional outputs added with default values.
2012-08-03 20:17:47 -04:00
Scott Moreau
a5021521f1 compositor: Always set output_mask in weston_surface_update_output_mask().
Commit 982387011 causes a bug where starting weston results in a black screen
(if no clients are immediately started). The problem is that the offending
commit causes the compositor to not damage if a surface has an empty output
mask, which is the case for the fade surface, which is created by the
compositor.  This patch updates the surface output_mask unconditionally,
and only skips sending out the events if there no client.
2012-08-03 20:11:24 -04:00
Kristian Høgsberg
61f00f52fa shell: Make sure the black surface is opaque
So we don't repaint anything below it.
2012-08-03 16:37:01 -04:00
Kristian Høgsberg
982387011f compositor: Add weston_surface_schedule_repaint() for limited repaint
In cases where we know the surface bounding box doesn't change in the
next frame, we can limit redraws to only the outputs the surface is
currently on.  We could do even better by forcing the transform
update so we know where the surface will be in the next frame, but
this is a much simpler first step.
2012-08-03 16:36:52 -04:00
Kristian Høgsberg
79af73e313 compositor-drm: Disable planes when zoomed or capturing
When the entire output is transformed or we're capturing the output
for screenshot or video, disable all output specific overlays
(drm planes, hw cursors etc) and move all surfaces into the primary
plane.
2012-08-03 16:33:42 -04:00
Kristian Høgsberg
bcf4864bb7 simple-egl: Add help message 2012-08-03 16:32:55 -04:00
Kristian Høgsberg
45ce98829b simple-egl: Set opaque region when running opaque 2012-08-03 16:32:52 -04:00
Pekka Paalanen
4b141597c6 configure: make setbacklight optional
Modify the pkg-config check for setbacklight so that failure only
disables building setbacklight, instead of failing the whole configure.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:32:43 -04:00
Pekka Paalanen
b6df4f7de4 desktop-shell: use the standard 'environ' variable
The variable '__environ' seems to be libc implementation specific, and
not avaible on Android.

Use the POSIX standard variable 'environ', which also luckily happens to
be available on Android, which is not POSIX.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:32:36 -04:00
Pekka Paalanen
168ed72dc7 evdev: kill a warning in evdev_led_update()
evdev.c: In function 'evdev_led_update':
evdev.c:57:9: warning: ignoring return value of 'write', declared with
attribute warn_unused_result

Useless in this case.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:32:33 -04:00
Pekka Paalanen
4ddf1b2c4d android: add basic evdev input support
Android backend needs mtdev now, and evdev-touchpad.c, too.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:32:26 -04:00
Pekka Paalanen
d858351a61 compositor-drm, evdev: don't crash on missing keyboard
Weston's notify_keyboard_focus_*() assume that a keyboard is present, if
they are called. With evdev, there might not always be a keyboard.

Also clean up the variable definition in evdev_notify_keyborad_focus().
I read that function through many times and finally had to grep where
does 'all_keys' come from.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:32:20 -04:00
Pekka Paalanen
81a13a3757 compositor-drm: log enter/leave VT
All input devices are re-added during enter VT, so these messages in the
log will clarify what happened with input.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:32:10 -04:00
Pekka Paalanen
42b3f6ae64 compositor-drm: log input device hot-unplugs
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:32:06 -04:00
Pekka Paalanen
d2e69c2c6f compositor-drm: fix leak in evdev_udev_handler()
If the sysname of the udev device did not start with "event", the
function returned without unreferencing udev_device.

The function is refactored to have a common exit path that unrefs
udev_device. The return value semantics are not changed.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:32:03 -04:00
Pekka Paalanen
bf639ab892 evdev: log input devices
Write information about found input devices into the log. Also fetch and
record the device name.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:32:00 -04:00
Pekka Paalanen
3315697739 evdev: move udev code into compositor-drm.c
Move all udev-related and now drm backend specific code into
compositor-drm.c.

This makes evdev.c free of udev and launcher-util, and allows it to be
used on Android.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:31:30 -04:00
Pekka Paalanen
88594b699f evdev: expose the generic evdev API
This API does not depend on udev or launcher-util.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:26:58 -04:00
Pekka Paalanen
3b003399ce evdev: rename evdev_seat to drm_seat
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:19:22 -04:00
Pekka Paalanen
43f0a1efcb evdev: pass weston_seat to evdev_input_device_create()
in preparation of removing evdev_seat

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:18:59 -04:00
Pekka Paalanen
3bfb20104d evdev: make evdev_notify_keyboard_focus() independent of evdev_seat
in preparation of removing evdev_seat

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:18:37 -04:00
Pekka Paalanen
5720e92a20 evdev: make evdev_led_update independent from struct evdev_seat
in preparation of removing evdev_seat

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:18:10 -04:00
Pekka Paalanen
5618d6fa05 evdev: change evdev_seat into weston_seat in struct evdev_input_device
We are phasing out struct evdev_seat.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:17:49 -04:00
Pekka Paalanen
cfa1f6727b evdev: merge evdev-private.h into evdev.h
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:17:12 -04:00
Pekka Paalanen
5a6383ba57 evdev: move device opening out from evdev_input_device_create
This makes the generic evdev code (i.e. the functions not relying on
udev) independent of launcher-util too. The aim is to allow re-using the
generic evdev code in the Android backend, where neither udev nor
launcher-util are available.

evdev_input_device_create() signature is changed:
- add the opened device file descriptor
- remove wl_display as unused

Also add a bit of failure logging.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:16:43 -04:00
Pekka Paalanen
a123e5c46a evdev: rename device_removed() to evdev_input_device_destroy()
evdev_input_device_destroy() will completement the API of
evdev_input_device_create(), both being independent from udev.

Since the udev-specific device_removed() would only call
evdev_input_device_destroy() and do nothing else, device_remove() calls
are simply replaced with evdev_input_device_destroy().

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-03 13:15:43 -04:00
Rob Bradford
c4f3338745 spring: Avoid looping if time appears to be going backwards
Since the time values are unsigned integers we can check whether the msec is
smaller than spring->timestamp by checking if the subtraction overflows into a
value greater than half the maximum unsigned integer range (ie. top bit set)
2012-08-03 13:13:34 -04:00
Andre Heider
552d12b10e terminal: Don't crash on non-ascii chars
isalpha() and isdigit() don't like huge values.
Noticed with ascii-art in the shell prompt.
2012-08-03 12:54:06 -04:00
Kristian Høgsberg
5626d34d63 compositor-drm: Split cursor handling into prepare and set
Like how we handle overlays, we split drm_output_set_cursor() into
drm_output_prepare_cursor_surface() that will assign the hw cursor to
a suitable surface and drm_output_set_cursor() that will do the actual
work of updating cursor contents and moving it.  This is more in line
with how we handle everything else, and lets us update cursor contents
based on changes to the cursor plane damage.

This works when the cursor content changes but also accumulates
damage when the cursor changes output.  In that case we move the
cursor surface to the cursor plane in the new output and
weston_surface_move_to_plane() will generate the damage that triggers
download of sprite contents there.
2012-08-03 11:50:33 -04:00
Kristian Høgsberg
65a11e1039 compositor: Accumulate damage per plane
When we analyze and accumulate damage prior to repainting, we need to
accumulate damage per plane, so that whatever damage a surface
contributes is accumulated in the plane that it's assigned to.  Before,
we would always accumulate damge in the primary plane, which caused
repaints in the primary plane whenever a surface in a sprite or
framebuffer was damaged.  Eliminating this repaint is a big win for
cases where we pageflip to a client surface or use a sprite overlay.

This also prepares for fixing the missing cursor updates, since we
now track damage to the cursor surface in a dedicated sprite plane.
2012-08-03 11:30:21 -04:00
Kristian Høgsberg
2a1aa4efce terminal: Don't output @ for ASCII NUL
Fixes visual bell in screen.
2012-08-03 09:37:05 -04:00
Rob Bradford
0fb797596a compositor: Use uint32_t for the msecs value consistently 2012-08-02 11:06:44 -04:00
Pekka Paalanen
d9a8e16b7b compositor: remove OpenWFD backend
This backend has not seen even build testing for months, presumably does
not even compile, and is starting to hinder development a little.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Benjamin Franzke <benjaminfranzke@googlemail.com>
2012-08-01 10:09:53 -04:00
Kristian Høgsberg
649e1ce973 compositor: Don't allow setting a NULL cursor without pointer focus 2012-08-01 09:58:22 -04:00
Kristian Høgsberg
ae27737b28 window.c: Use pointer enter serial for setting cursor 2012-08-01 09:58:22 -04:00
Kristian Høgsberg
2e96d3c907 compositor: Check serial number ordering without overflowing 2012-08-01 09:58:17 -04:00
Scott Moreau
c50645c775 Properly free drm configured mode variables. 2012-08-01 00:41:28 -04:00
Kristian Høgsberg
bbe983923d shell: Make it possible to move and raise unresponsive surfaces 2012-08-01 00:20:21 -04:00
Kristian Høgsberg
9e31bff831 shell: Move surface move code back to just after the move grab functions
This chunk of code is what uses the move grab and used to come right
after it.  At some point it got split up, but move it back now.
2012-08-01 00:08:07 -04:00
Kristian Høgsberg
64eca8949b compositor: Fold the log prototypes into compositor.h and drop log.h
We're trying to keep the API exposed by the core compositor in compositor.h
2012-08-01 00:00:57 -04:00
Scott Moreau
8f37e0bc1e Add raw modeline support.
This allows specifying a modeline in the config for the 'mode' key
in the output section, such as one you would get from cvt.
2012-07-31 22:38:21 -04:00
Tiago Vignatti
4f238a590d configure: link image libs with libshared
This fix xwayland.so that was complaining about jpeg symbols from the
libshared.

Note that xwayland is not using the jpeg ones, but now that symbols are read
up front we need to link anyway.. or break apart that library.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-31 22:34:21 -04:00
Pekka Paalanen
76fc57e75c simple-touch: use proper damage in touch_paint()
Should reduce update overhead.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-07-31 22:27:23 -04:00