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.
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>
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>
Fix the off by one error in checking whether we can draw the marker
without exceeding buffer dimensions.
Fixes a segfault.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
In the wl_seat conversion, struct wl_touch got fields for the focused
surface and the client resource for the input device being focused.
However, the conversion was incomplete: the old fields
weston_seat::touch_focus* we still used by the event dispatching code,
but the new code never set them. Therefore no touch events were ever
sent.
From weston_seat, remove the fields touch_focus, touch_focus_listener,
touch_focus_resource, and touch_focus_resource_listener. They are
replaced by the corresponding fields and listeners from struct
wl_touch.
While doing this, fix touch_set_focus().
If touch_set_focus() was called first with surface A, and then with
surface B, without being called with NULL in between, it would corrupt
the destroy_signal list. It was equivalent of calling wl_signal_add()
for different signal sources with the same listener without removing in
between.
Now, touch_set_focus() first removes focus and listeners, and then
attempts to assign focus if requested. If the target client has not
subscribed for touch events, the touch focus will now be NULL.
Before this patch, the touch focus was left to the previous surface.
NOTE: this patch depends on the patch "server: add lose_touch_focus()"
for Wayland.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
For a true multi-touch input device, the code ended up using
uninitialised fields of evdev_input_device::abs.
Fix it by querying the corresponding MT ranges.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
If there is no weston-launcher available, launcher-util.c will fall back
to opening the given file itself. It that case it does not set the
close-on-exec flag, and will presumably leak the file descriptor to
children.
Use O_CLOEXEC on the fallback path, too.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
When we hit a segv, it's often the case that we might crash again in
the attempt to clean up. Instead we introduce a minimal restore callback
in the backend abstraction, that shuts down as simply as possible. Then
we can call that from the segv handler, and then to aid debugging, we
raise SIGTRAP in the segv handler. This lets us run gdb on weston from
a different vt, and if we tell gdb
(gdb) handle SIGSEGV nostop
gdb won't stop when the segv happens but let weston clean up and switch vt,
and then stop when SIGTRAP is raised.
It's also possible to just let gdb catch the segv, and then use sysrq+k
followed by manual vt switch to get back.
Parse the config file for [output] sections and check for 'name'
and 'mode' keys. The key strings are compared to what is reported
by weston log. The 'mode' key string can be one of the following:
1) WIDTHxHEIGHT - one that is reported by weston log
2) off - Disables the output
3) preferred - Uses the preferred mode
4) current - Uses the mode currently driving the crtc
If a connector is not attached to a crtc, weston fails to bring it up.
Typically kms fbdev drives all crtc and connectors, but if kms hasn't been
initialzed and weston is the first to set a mode of if a monitor is
hotplugged, we just fail to bring it up.
(krh: reformatted and edited a bit from original patch)
Simply exit(1)'ing the program will leave the VT unusable, since
DRM backend's clean-up does not run.
After a backend has been initialised, prefer jumping to clean-up instead
of directly exiting.
This fixes the case where 'weston-launch -- -i 5' would leave the
console unusable.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Make simple-egl toggle the fullscreen state whenever the key F11 is
pressed. A sync callback is used to stop drawing while the surface has
not received the configure event, to prevent a buffer with the windowed
size to be attached to the surface after the set_fullscreen request.
We now support specifying environment variables and arguments in launchers
by saying
path=GDK_BACKEND=wayland gnome-terminal --full-screen
for example.
https://bugs.freedesktop.org/show_bug.cgi?id=47920