The type of fields x and y in wl_input_device was changed to wl_fixed_t
but input_device_attach() was still using it as if it were integer.
This bug caused the pointer sprite to be configured in the wrong place
on the screen (usually outside the visible area) but it would soon be
corrected in notify_motion() making it hard to notice and usually only
causing a quick flicker.
We were testing if the pointer were outside any output and doing a lot of
work to compute the bounding box of all output and then clip against that.
Just clip against previous (valid) output and don't bother with the
bounding box.
Add an xkb_names member to the base compositor info which contains the
RMLVO to use when building an XKB keymap. Add support for filling this
from the config file or from the underlying X11 server, with the usual
defaults.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
To add greater precision when working with transformed surfaces and/or
high-resolution input devices.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
To be used by input code, paralleling the existing integer versions.
Enlarge the surface_{to,from}_global_float input types to GLfloat to
avoid losing precision.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
We set up an emtpy region for the initial NULL-cursor, and then going
from no buffer to a 32x32 buffer didn't trigger the undeffing of the input
region. So when something sets a cursor of a different size, the cursor
surface input region gets initialized and starts swallowing events.
These new protocol events allow us to tell which outputs a surface is on, and
potentially update where we allocate our buffers from.
Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
Some GL implementations do not provide GL_EXT_read_format_bgra
extension.
Set a glReadPixels format based on whether the extensions is supported
or not, and use that format in all backends.
Add RGBA->BGRA swapping copy to screenshooter to keep the shm buffer
data format as BGRA.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
During a bring-up of a new backend, it would be nice to get a real error
message, when the EGL and GL contexts have not been properly set up.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This reverts a snip from commit d012e9df. On that commit, it was lost the
ability of calling X applications from desktop panel; xserver module
was setting DISPLAY only later, after panel was already launched.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
weston-launch starts weston and provides mechanism
for weston to set/drop drm master, open a tty,
and read input devices without being root.
Execution is allowed for local-active sessions
or users in the group weston-launch.
This allows us to move the logic that calls shell->map() or
shell->configure() into shell while allowing it to be overriden for
surfaces that should not be handle by the shell, such as drag icons.
This patch adds a pointer function called configure to weston_surface,
moves the currsent surface_configure() code into shell and implements
a separate configure() for drag surfaces.
surface_attach() does two things: sets up a new buffer as the contents
of the given surface and then calls into shell so it can setup the
position of the surface and map it if necessary. However we do not want
the shell to meddle with some internal surfaces such as drag surfaces.
The intention of this refactoring is to make room for making the part
that calls into shell a virtual function that the compositor can
override for these internal surfaces.
This changes weston_buffer_attach() so it handle all the logic of tying
a buffer to a surface, including unmapping it when the buffer is NULL.
The shell map() vs. configure() logic is then split into a another
function: surface_configure(). In a later commit, this function will be
turned into a function pointer in struct weston_surface.
For shm buffers, es->pitch is set using the stride of the buffer. If
the shell happened to set the surface width to something different than
the buffer width, the contents of the surface would be cropped on the
width during redraw. However, for non-shm surfaces, es->pitch was set to
the surface width. That caused the contents of the buffer to be scaled
on the width when the buffer was wider than the surface.
This makes the behavior on both cases the same: crop on the width and
scale on the height. (which is weird but consistent)