Print pointer frames only if any pointer related events are printed
first.
This avoids flooding the output with "pointer frame" just because of
motion. You can test this with e.g.
$ ./weston-eventdemo --log-button
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
This adds an alternate weston terminal icon and icons for the flower and
editor clients. The original Inkscape SVG file is included.
Example screenshot:
http://www.bryceharrington.org/Files/weston-icons.png
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
This is derived from the implementation. I was not sure whether "under"
referred to object relationships or region intersections.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
This client should support binding to multiple seats, but as it does
not, make a quick and dirty fix to ignore all seats beyond the first
one.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
weston_wayland_backend_config_release() does not bother reinitializing
the structure, it simply frees what is there. This leads to a structure
containing garbage, which might be a surprise.
Require, that if load_wayland_backend_config() fails, the caller must
call weston_wayland_backend_config_release() regardless.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: rewrote commit message]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Rename the wayland_backend_config_release function to
weston_wayland_backend_config_release to follow legacy naming scheme.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: rebased]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Remove the unseless intermediate variable new_config in the function
load_wayland_backend_config, replacing it by the renamed parameter
'config'.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: Squashed in "compositor-wayland: rename out_config arg of load_wayland_backend_config".]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Rename the load_wayland_backend_config arg "config" to use this name for
another variable in the following patch. It also follow the legacy
naming scheme.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Move function load_wayland_backend_config,
wayland_backend_config_add_new_output, wayland_backend_config_release,
weston_wayland_output_config_init from compositor-wayland.c to main.c.
Not a single character is changed in those functions.
Create a glue function load_wayland_backend to use moved functions and
following the new load_*_backend style.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: removed left-over entry from load_backend().]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
The patch use temporary code that prepare the patch:
"compositor-wayland: move configuration parsing to weston main.c"
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Rename the misleading output argument to output_config in the
weston_wayland_output_config_init function.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Rename wayland_output_init_from_config to weston_wayland_output_config_init
to prepare the following patch :
"compositor-wayland: move configuration parsing to weston"
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
[Pekka: drop a useless comment]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: squashed with "compositor-wayland: fix too long lines".]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Preparing for libweston and for the separation of the code base into
libweston vs. weston the compositor, we must remove all uses
weston_config structures from the backends. We have decided that all
option and config input happens in the compositor (main.c), and
configuration is passed in for the backends as structs.
Most other backends have already converted, and this patch converts the
DRM-backend to the libweston-style init API.
The libweston-style init API includes a header for each backend (here
compositor-drm.h) defining the configuration interface. The compositor
(main.c) prepares a configuration struct to be passed through libweston
core to the backend during initialization.
A complication with the DRM-backend is that outputs can be hotplugged,
and their configuration needs to be fetched from the compositor
(main.c). For this, the config struct contains a callback member. The
output configuration API is subject to change later, this is just a
temporary API to get libweston forward.
As weston_compositor's user_data was not previously used for anything,
and the output configuration callback needs data, the user_data is set
to the 'config' pointer. This pointer is only used in
drm_configure_output() in main.c.
[Bryce: lots of stuff and rebasing]
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: write commit message]
[Pekka: squash in "drm: Don't hang onto the backend config object
post-backend_init" from Bryce Harrington]
[Pekka: drop the compositor.h hunk]
[Pekka: do not #include inside extern "C"]
[Pekka: remove incorrect comment about weston_drm_backend_config
ownership.]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
There were two copies of code applying transform and scale to size.
Refactor the code to use just one copy in a new function.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Makes it easier to see that it does not change weston_surface state
implicitly.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: moved #include out of extern "C".]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Extract configuration parsing from init_backend function. The new
init_backend start by generating the configuration structure from
configuration file with separated function and then use this structure
to load the backend.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: rebased]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
The splitting intend to separate configuration parsing from output
setup.
Introduces struct weston_wayland_backend_output_config.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: squashed "wayland-backend: define output configuration
structure" into this.]
[Pekka: fix fullscreen output scale back to 1.]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Move configuration parsing from create_cursor to backend_init. Use newer
configuration structure to initialize the cursor in create_cursor.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
default_seat and default_seat_name are not used anywhere in this file.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
We include wayland-server.h, pixman.h and xkbcommon.h in compositor.h,
but they are not required for linking if the plugin doesn’t use them.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
This will allow plugins to be aware of e.g. panels, to avoid covering
them with other surfaces.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Use a "well" defined structure to configure x11-backend and move configuration
file parsing inside the weston compositor code.
Enforce destruction of all backend config objects after initialization.
Since the backend config struct versioning implies that there we expect
potential future descrepancy between main's definition of the config
object and the backend's, don't allow the backend to hang onto the
config object outside the initialization scope.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
Implement a "well" defined API to configure the fbdev backend.
Following and according to discussion about libweston API
The output transform configuration is moved into weston and added to the
fbdev configuration structure.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
[Pekka: squashed two patches and rebased.]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Ensuring that the pointer to the device path stays valid gets harder and
harder with migrating to the libweston-style config handling. Therefore,
make a copy of the string, private to struct fbdev_output.
Now the pointer passed in to fbdev_output_create() could be freed right
after the call returns.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
If we break; when lseek fails we can fail to do some legitimate tests
on remaining planes in a multi-plane buffer.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Add explanations of scaling that are a bit more approachable for users.
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=94824
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Implement a "well" defined API to configure the rdp backend.
Following according to discution about libweston API.
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net>
Reviewed-by: David FORT <rdp.effort@gmail.com>
[Pekka: added missing headers to Makefile.am]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Include shared/xalloc.h in clients/nested.c to fix
compilation error: undefined reference to `xzalloc'
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
AC_SEARCH_LIBS is the recommended macro for these checks, unfortunately,
we use AC_CHECK_LIB instead, and even AC_CHECK_FUNC, when only one
AC_SEARCH_LIBS would be enough.
This wrapper macro is used much like PKG_CHECK_MODULES, as it defines
(and AC_SUBST) the PREFIX_LIBS variable itself.
It also avoids adding unnecessary stuff to LIBS.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
The fix/check in 34d59859 is incomplete.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
zuctest is another clock_gettime() user that fails to link against librt when
necessary.
Instead of adding another -lrt LDADD entry i've opted for the saner way and
converted the check to a configure test that will set CLOCK_GETTIME_LIBS
appropiately and replaced all instances of -lrt with it.
Built-tested against old and new glibc.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
When a test destroys a wl_surface, it is still possible to get events
referring to the destroyed surface. The surface in such cases will be
NULL.
Handle NULL surface gracefully in keyboard and pointer enter/leave
handlers. Touch-down handler is already NULL-safe.
This fixes a SEGV in a test I am writing for wp_viewport.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Patch b00c79b587 forgot to update the
global interface name to look for. Fix it.
This makes weston-info report the presentation clock again.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>