For the sample clients we introduce xmalloc() to simplify OOM-handling.
This patch only converts a few callsites, but this will be our strategy
going forward.
It is possible to receive a motion event that was generated by the
compositor based on a pick of a surface of old dimensions. This was
triggerable on toytoolkit clients when minimising. The new window
dimensions were propagated through the widget hierarchy before the event
was dispatched.
This issue was triggering a segfault due to the focussed widget being
lost as the client code tried to identify which widget should have the
focus using co-ordinates outside the dimensions of the surface.
https://bugs.freedesktop.org/show_bug.cgi?id=66795
If the shift modifier is active then we don't make the cursor and the
anchor the same and as a result we develop a selection in the direction
that the arrow key gets pressed in.
https://bugs.freedesktop.org/show_bug.cgi?id=66802
Rather than using the dimensions in the mode we can use the recently
added output width and height members which are updated to reflect any
output rotation.
https://bugs.freedesktop.org/show_bug.cgi?id=66798
As some CJK fonts are dual-width, calculate the average width of ASCII
glyphs and use that instead of the max_x_advance of the font. This is
what VTE does too.
https://bugs.freedesktop.org/show_bug.cgi?id=63796
Don't NULL the resource pointer before calling weston_surface_destroy().
We use to have more of a distinction between compositor created surfaces
and client surfaces, and weston_surface_destroy couldn't be used for
client surfaces. Now it all goes through weston_surface_destroy() and
we can remove the assert and the NULL-ing of resource, which caused the
marshalling warning.
The list of surfaces used by weston_compositor_pick_surface() is
maintained in list of surfaces stored on the compositor. This list is
generated from the surfaces across all the layers using
weston_compositor_build_surface_list.
When destroying a surface the surface is "unmapped" with
weston_surface_unmap which removes it from the layer list. However since
the compositor surface list was only being rebuilt when the output was
repainted a call to weston_compositor_pick_surface before the next
output repaint would use an outdated surface list containing surfaces
that have been partially destroyed.
https://bugs.freedesktop.org/show_bug.cgi?id=65986https://bugs.freedesktop.org/show_bug.cgi?id=66173https://bugs.freedesktop.org/show_bug.cgi?id=66198
The panel and background were never created for hotplugged outputs and
since some parts of the code assume that they always exist that would
lead to desktop-shell client to crash in that case.
This was easier to spot when the display was locked, because Weston
respawns the shell client and the user might not notice since there is
no flicker.
https://bugs.freedesktop.org/show_bug.cgi?id=66531
This lets the code for adding panel launchers and setting up the
background to be moved into panel_* and background_* functions.
Note that this changes the behavior of the default launcher. Before
this change a default launcher would be added only if there was no
config file. Now a launcher is also added if there is no valid
launcher section.
We can get a destroy notify for the frame window after we've removed it
from the hash table. This turns into a NULL pointer deref when we look up
the window and try to use it for debugging printout.
Fixes the failing xwayland test case.
Calling weston_pointer_start_grab can lead to a code path (in this case
when the shell surface is unresponsive) that can try and remove the
popup grab to setup a shell grab.
Ending the popup grab requires removing the surface from the grab's
surfaces list - however the grab had not yet been fully setup so the
grabbed surface was not yet in this list.
With this change we ensure we add the surface to the list before setting
up the pointer grab.
https://bugs.freedesktop.org/show_bug.cgi?id=66167
Make sure the center point of a rotation is not rounded to an
integer. It makes the calculation consistent with others in the
shell. It also ensures surfaces rotated 180 degrees are at the
exact same place.
This commit sets the version numbers for all added/created objects. The
wl_compositor.create_surface implementation was altered to create a surface
with the same version as the underlying wl_compositor. Since no other
"child interfaces" have version greater than 1, they were all hard-coded to
version 1.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>