Fixes crash with a backtrace like this:
==2418== Invalid read of size 8
==2418== at 0x8AC5B70: unresponsive_fade_frame (shell.c:374)
==2418== by 0x409FE0: weston_output_finish_frame (compositor.c:1060)
==2418== by 0x567043B: wl_event_loop_dispatch (event-loop.c:389)
==2418== by 0x566E84C: wl_display_run (wayland-server.c:1003)
==2418== by 0x4055EB: main (compositor.c:2937)
==2418== Address 0x8aba650 is 80 bytes inside a block of size 656 free'd
==2418== at 0x4A0662E: free (vg_replace_malloc.c:366)
==2418== by 0x566D93B: wl_resource_destroy (wayland-server.c:408)
==2418== by 0x566D30E: destroy_resource (wayland-server.h:166)
==2418== by 0x566D93B: wl_resource_destroy (wayland-server.c:408)
==2418== by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==2418== by 0x34ECE05784: ffi_call (ffi64.c:486)
==2418== by 0x5671AAE: wl_closure_invoke (connection.c:770)
==2418== by 0x566DBAA: wl_client_connection_data (wayland-server.c:255)
==2418== by 0x5670497: wl_event_loop_dispatch (event-loop.c:410)
==2418== by 0x566E84C: wl_display_run (wayland-server.c:1003)
==2418== by 0x4055EB: main (compositor.c:2937)a
and
==2418== Invalid read of size 8
==2418== at 0x34F1E180E1: pixman_region32_union (pixman-region.c:1405)
==2418== by 0x407F66: weston_surface_damage (compositor.c:551)
==2418== by 0x409FE0: weston_output_finish_frame (compositor.c:1060)
==2418== by 0x567043B: wl_event_loop_dispatch (event-loop.c:389)
==2418== by 0x566E84C: wl_display_run (wayland-server.c:1003)
==2418== by 0x4055EB: main (compositor.c:2937)
==2418== Address 0x851dfe8 is 136 bytes inside a block of size 680 free'd
==2418== at 0x4A0662E: free (vg_replace_malloc.c:366)
==2418== by 0x566D93B: wl_resource_destroy (wayland-server.c:408)
==2418== by 0x34ECE05D63: ffi_call_unix64 (unix64.S:75)
==2418== by 0x34ECE05784: ffi_call (ffi64.c:486)
==2418== by 0x5671AAE: wl_closure_invoke (connection.c:770)
==2418== by 0x566DBAA: wl_client_connection_data (wayland-server.c:255)
==2418== by 0x5670497: wl_event_loop_dispatch (event-loop.c:410)
==2418== by 0x566E84C: wl_display_run (wayland-server.c:1003)
==2418== by 0x4055EB: main (compositor.c:2937)
wl_input_device has been both renamed and split. wl_seat is now a
virtual object representing a group of logically related input devices
with related focus.
It now only generates one event: to let clients know that it has new
capabilities. It takes requests which hand back objects for the
wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all
provide the old input interface, just under different names.
This commit tracks these changes in weston and the clients, as well as
similar renames (e.g. weston_input_device -> weston_seat). Some other
changes were necessary, e.g. renaming the name for the visible mouse
sprite from 'pointer' to 'cursor' so as to not conflict.
For simplicity, every seat is always exposed with all three interfaces,
although this will change as time goes on.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
To add greater precision when working with transformed surfaces and/or
high-resolution input devices.
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>
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're able now to create shell_surfaces inside Weston. This makes possible the
glue needed between shell and xserver-launcher.
On the desktop-shell, it was split the protocol part from shell_surface
specific functions to make this possible.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
This patch makes the main modifier configurable. We used to hardcode super
(windows key) for most bindings, but now that can be changed.
The change affects two key bindings: rotation moves to mod+right click
and backlight moves to from ctrl+f9/f10 to mod+f9/f10.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
- Added ping_timer_destroy() to simplify cleanup.
- Changed timeout and fade step to more realistic values.
- Renamed ping_timeout_fade_frame() to unresponsive_fade_frame().
If a client is not responding, lower the brightness and
saturation to indicate it's stalled. The surface is restored
to it's original color values if the client later becomes
responsive.
Switching display mode may happen when:
1. The fullscreen surface is at top most in fullscreen layer and with
"driver" method. Shell will switch output mode to match the surface
size. If no matched mode found, fall back to "fill" method.
2. The top fullscreen surface is destroyed or unset. Switch back to the
origin mode.
wl_shell is more likely to be used for core protocol specific. Now it follows
pretty much the same style of what tablet-shell is using.
No functional changes.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
When the surface being moved, resized or rotated was destroyed, the
compositor would crash.
Fix this by using a destroy listener on the referenced surface. To
reduce code duplication, the surface reference and the destroy
listener is added to a new struct shell_grab.
Use shell_stack_fullscreen() to raise fullscreen surface in activate(),
and before activate() a regular surface, move all the fullscreen
surfaces from fullscreen_layer to toplevel_layer.
Also add a void *private into struct wesont_surface since we already
have a configure() vfunc. That helps to get the associated fullscreen
surface of black surface.
This allows us to move the logic that calls shell->map() or
shell->configure() into shell while allowing it to be overriden for
surfaces that should not be handle by the shell, such as drag icons.
This patch adds a pointer function called configure to weston_surface,
moves the currsent surface_configure() code into shell and implements
a separate configure() for drag surfaces.
While activating and deactivating rotation mechanism without moving
the pointer, rotation matrix from rotate_grab object is not being
initialised and damage shell surface rotation matrix in
rotate_grab_button handler, making it invertible.
This patch initialise rotate matrix in rotate_binding
and moves surface position check to rotate_grab_motion handler.
How to reproduce: rotate the surface to something like 45 degrees,
resize it drastically, continue to rotate. The surface will jump
some space and the rotation point will not be in the center
of the surface.
Fix is to shift the surface position to match the rotation point