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>
Originally window.c was requesting version 1 but several clients were
calling version 2 and 3 events including the desktop shell itself.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Window contents cannot be assumed to be fully opaque for windows drawn with
a RGBA visual. The optimization of setting a full opaque region is limited to
windows with a color depth != 32.
In embedded environments, devices that appear as evdev "keyboards" often
have no resemblence to PC-style keyboards. It is not uncommon for such
environments to have no concept of modifier keys and no need for XKB key
mapping; in these cases libxkbcommon initialization becomes unnecessary
startup overhead. On some SOC platforms, xkb keymap compilation can
account for as much as 1/3 - 1/2 of the total compositor startup time.
This patch introduces a 'use_xkbcommon' flag in the core compositor
structure that indicates whether the compositor is running in "raw
keyboard" mode. In raw keyboard mode, the compositor bypasses all
libxkbcommon initialization and processing. 'key' events containing the
integer keycode will continue to be delivered via the wl_keyboard
interface, but no 'keymap' event will be sent to clients. No modifier
handling or keysym mapping is performed in this mode.
Note that upstream sample apps (e.g., weston-terminal or the
desktop-shell client) will not recognize raw keycodes and will not react
to keypresses when the compositor is operating in raw keyboard mode.
This is expected behavior; key events are still being sent to the
client, the client (and/or its toolkit) just isn't written to handle
keypresses without doing xkb keysym mapping. Applications written
specifically for such embedded environments would be handling keypresses
via the raw keycode delivered as part of the 'key' event rather than
using xkb keysym mapping.
Whether to use xkbcommon is a global option that applies to all
compositor keyboard devices on the system; it is an all-or-nothing flag.
This patch simply adds conditional checks on whether xkbcommon is to be
used or not.
v3 don't send zero as the file descriptor - instead send the result of
opening /dev/null
v2 by Rob Bradford <rob@linux.intel.com>: the original version of the
patch used a "raw_keycodes" flag instead of the "use_xkbcommon" used in
this patch.
v1: Reviewed-by: Singh, Satyeshwar <satyeshwar.singh@intel.com>
v1: Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>