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>
A little different from Daniels initial patch. We look up the common
modifiers at xkb init time and convert the xkb serialized modifier mask
to our own modifier bitmask.
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>
No functional changes; it's only opening space for modifications coming along
on the next commits.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
and shut-up valgrind:
Conditional jump or move depends on uninitialised value(s)
at 0xB5AFB05: shell_surface_configure (shell.c:2162)
by 0x407B0C: surface_attach (compositor.c:1225)
by 0x621FA13: ffi_call_unix64
by 0x621F434: ffi_call
by 0x4E3D3F5: wl_closure_invoke (connection.c:758)
by 0x4E3786C: wl_client_connection_data (wayland-server.c:255)
by 0x4E3AA19: wl_event_source_fd_dispatch (event-loop.c:78)
by 0x4E3B533: wl_event_loop_dispatch (event-loop.c:460)
by 0x4E38D2C: wl_display_run (wayland-server.c:907)
by 0x40B5DD: main (compositor.c:2748)
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Cursor images are fairly small and having one pool for each image adds
a lot of unnecessary overhead. Instead, create one large pool and
allocated all cursor images from that.
In order to do that, however, the code that creates shm surface needed
some refactoring. This patch adds a new struct shm_pool that is used
by the cursor and also changes struct window to use it.
Currently, the drm backend will create and destroy a KMS FB for each
frame. However, the bos for a gbm surface are reused (at least with
mesa) so we can store the fb_id on it and destroy it only on the bo's
destroy callback.
To use the same path for scanning out client buffers, some refactor
was needed. Previously, the bo for the client buffer was destroyed
early so that gbm_surface_release_buffer() would not be called with
it, since at the page flip handler output->scanout_buffer can be
NULL even if the current frame is a client buffer.
This was solved by adding a drm_fb structure that holds a gbm_bo,
an fb_id, and information about the fb coming from a client buffer
or not. A drm_fb is created in such a way that it is destroyed
whenever the bo it references is destroyed. The fields current_*
and next_* in drm_output are changed into only two pointers to
drm_fb's.
Going from fullscreen to toplevel will restore the surface position
immediately. This will move the fullscreen surface to where the toplevel
surface was before, which will flicker for a frame of two before the
resized, non-fullscreen buffer is attached.
Instead, only change the surface geometry when we get the new buffer.
We check that we get surface.enter_output and move the pointer into
the window and make sure we get input_device.pointer_enter with
the right coordinates.
There's a lot of code for a very simple test here, so we need to
figure out how to reuse most of the event handling and such. It's also
not clear that a custom, text based protocol is practical here, we might
just use a wayland extension after all.
Simple clients were relying on AM_CFLAGS and AM_CPPFLAGS set for
toytoolkit clients. With toytoolkit clients disabled, the build fails
with missing wayland-client.h.
Move AM_CFLAGS and AM_CPPFLAGS outside of conditional sections, since
they are meant to be global settings.
Let simple clients override AM_CPPFLAGS with their own
SIMPLE_CLIENT_CFLAGS, which the configure script already sets up for us,
but was unused until now.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Previously, simple-shm was rendering an image that looked like stride
gone wrong somewhere, and was quite confusing if you did not know it was
supposed to look like that.
Replace the drawing code. Two circles, inner and outer, now delimit
three co-centric areas. The outmost area from surface borders to outer
circle contains horizontal gradients that move (animate) to the left.
The area between outer and inner circles contains vertical gradients
that move upwards. The center disc has circular gradients moving towards
the center.
The circles are not ellipses.
Diagnostics:
The X-channel is manipulated so, that if a compositor takes the XRGB
image, and uses the X channel as alpha instead of ignoring it, the whole
image will be crossed out by two lines that either quickly saturate to
white or show through with additive blending. Does not work on black
background.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
To ful-fill user experience, add the fading-in animation
when mapping a window.
v2: update that westom_surface_damage to repaint
remove that transform part in fade struct
Signed-off-by: Juan Zhao <juan.j.zhao@intel.com>