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.
It is possible that a client loses the focus between receiving a
pointer.enter event and sending a pointer.set_cursor request. In that
case, the cursor surface might not be mapped and the frame callback
requested on it will never trigger.
Work around this by trying to remap the cursor surface whenever there
is a frame callback and the serial for the enter event is higher than
the cursor serial.
If the grab surface happens to be unresponsive, the busy cursor grab
will be started and that will cause the grab surface to receive focus,
which in turn leads to it being pingged again. Break the cycle by not
sending pings to it. If the shell is unresponsive it won't be able to
set the busy cursor anyway.