Adds appid for all clients using the toolkit, flower, fullscreen, image,
resizor, scaler, smoke, stacking, subsurfaces, terminal,
touch-calibrator, transformed, etc.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
The printf() format specifier "%m" is a glibc extension to print
the string returned by strerror(errno). While supported by other
libraries (e.g. uClibc and musl), it is not widely portable.
In Weston code the format string is often passed to a logging
function that calls other syscalls before the conversion of "%m"
takes place. If one of such syscall modifies the value in errno,
the conversion of "%m" will incorrectly report the error string
corresponding to the new value of errno.
Remove all the occurrences of the specifier "%m" in Weston code
by using directly the string returned by strerror(errno).
While there, fix some minor indentation issue.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
We're going to post damage when the widget redraw happens anyway.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
There are a number of invalid read errors reported by valgrind of the
form:
==13428== Invalid read of size 4
==13428== at 0x405656: advect (smoke.c:116)
==13428== by 0x405E80: redraw_handler (smoke.c:228)
==13428== by 0x40DE74: widget_redraw (window.c:3995)
==13428== by 0x40E02D: surface_redraw (window.c:4053)
==13428== by 0x40E0C9: idle_redraw (window.c:4082)
==13428== by 0x410FC9: display_run (window.c:5561)
==13428== by 0x406518: main (smoke.c:373)
==13428== Address 0xb2c9b14 is 4 bytes after a block of size
160,000 alloc'd
==13428== at 0x4C29DB4: calloc
==13428== by 0x40646B: main (smoke.c:360)
This results in invalid rendering when running a debug version of the
application.
Fix the issue by limiting the maximum values of px and py to 1.5 less
than width and height. This prevents reading past the end of the source
buffer.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82287
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Committing to an xdg_surface with a NULL buffer is currently illegal in
the mutter implementation, so this simply causes the client to error and
exit.
It seems the reason the client did this was so it could add its own
frame callback, but toytoolkit actually provides accurate everything we
need. Just use its functions instead to get the time and schedule a
redraw.
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
In many clients of weston, Display was not being destroyed so added it.
Also destroy windows, widgets which were not being destroyed.
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
There was an issue recently in screen-share.c where config.h was not
being included, resulting in the wrong definition for off_t being used on
32 bit systems. I checked and I don't think this problem is happening
elsewhere, but to help avoid this sort of problem in the future, I went
through and made sure that config.h is included first whenever system
headers are included.
The config.h header should be included before any system headers, failing
to do this can result in the wrong type sizes being defined on certain
systems, e.g. off_t from sys/types.h
Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
This change depends on the Wayland commit
"protocol: double-buffered state for wl_surface".
Implement double-buffering of damage in the compositor as required by
the new protocol.
Ensure all Weston demo clients call wl_surface_commit() after
wl_surface_damage().
Mesa does not need a fix for this, as the patch adding
wl_surface_commit() call to Mesa already takes care of damage, too;
Mesa commit: "wayland: use wl_surface_commit()"
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
There was a lot of code here to do a lot of work we didn't need to do.
If we damage a surface with a shm buffer attached, all we need to do
is to re-upload the damaged region to the texture. As for drm buffers,
we don't assume anything changes on attach and only update the
regions the client tells us to update in the damage request.
On one hand, getopt (in particular the -o suboption syntax) sucks on the
server side, and on the client side we would like to avoid the glib
dependency. We can roll out own option parser and solve both problems
and save a few lines of code total.
Add widget_set_size in the initiate time to allow smoke get the
correct surface later. Or it will report segment fault error because
of the null surface.
Also add resize_handler to not allow resizing just like flower.
Signed-off-by: Juan Zhao <juan.j.zhao@linux.intel.com>
The new map_toplevel() request no longer specifies a position and takes
the size from the attached buffer. The attach request now takes a
position relative to the top-left corner of the old buffer to let
clients specify the relative position of the new buffer.