Most touchscreen drivers provide ABS_X and BTN_TOUCH for legacy
single-touch emulation modes, but this isn't mandatory. Make sure we
don't ignore touchscreens with provide multitouch events with the new
API only.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
On X the global absolute coordinates are sent in ConfigureNotify and transient
windows are mapped exactly on that position. On Wayland we don't have the
concept of global coordinates, and that's a problem for transient surfaces
without transient_for set because they rely on such hint for setting their
positioning.
So this solution is a workaround. It guesses a parent based on the last
focused window to determine the relative position of the transient surface.
This put transient windows of Chrome browser back to work.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Commit eaee7841 took out the configure positioning of windows. This patch
brings it back and addresses also logic for resizing and sub-menus, that was
not covered on that commit.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
This is necessary because all clients need a way to create
text_models, but only one client at a time can be bound to
the input_method global (else we don't know to whom we are
supposed to send events).
Reported by Dima Ryazanov <dima@gmail.com> in
<1341937691-26234-1-git-send-email-dima@gmail.com> but we also need to
destroy callbacks when the surface is destroyed normally.
We default to setting the minimum size to the initial size. To set a
different minimum size than the initial size, set the minimum size first
then then initial size. Good enough for a toy toolkit.
https://bugs.freedesktop.org/show_bug.cgi?id=50263
We don't support this anymore. weston requires a setuid helper (such as
weston-launch) to run under kms, and should never run as root itself.
Disabe the setuid warning in configure.ac since we now only install the
minimal weston-launch as setuid.
surface->damage is for when the contents of the surface changes. Instead,
use weston_surface_damage_below() to repaint the damaged area. We avoid
unecessary uploading shm and hw cursor contents this way.
Instead of having a custom fork of the vpxenc tool in weston, we can
just dump raw YUV data in the YUV4MPEG2 format and feed that into the
upstream vpxenc. This also works with theora_encoder and probably many
other encoders.
We no longer reserve the hw cursor for just the pointer sprite. Any
surface that satisfies the requirements for the hw cursor can be used.
Of course that's more or less always the pointer sprite, but at least now
we don't hard-code the references to compositor->seat anymore.
Determining whether it was possible to use a surface buffer as the
primary framebuffer was always a bit of a hack. Just before rendering,
we look at the second top-most surface to see if it's the right size and
position and then use it if it is. If we have a hw cursor and a drm
plane on top, it's no longer the second top-most and it wouldn't be picked
even if it could work.
With this change, we inspect surfaces in drm_assign_planes and try to find
a candidate for the primary fb there. We track the overlap like for
overlays and if there is a surface that's not overlapped and fills the
output we pick it.
This commit also consolidate the logic to track damage as we move a surface
in and out of the primary plane, which was missing in the drm plane case.
The kms planes support scaling, so try to detect transformations that
are just translations + scaling and program the kms plane accordingly.
In particular, this lets us fullscreen a yuv surfaces with the scale method
and have the compositor use a kms plane for scaling and color conversion.
This lets us create the gbm bo from the wl_buffer instead of the
EGLImage. With planar buffer, the EGLImage corresponds to a plane
and not the entire planar buffer.
More importantly, with some YUV formats (packed YUYV and similar) we use
several EGLImages to sample the different components, but KMS only
want one plane in that case.