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
If map is called with a surface of type none it will call
weston_surface_assign_output, even though the surface will
not be mapped.
This change was lost with the changes for using wl_layers.
This can happen for instance running a toytoolkit application, launching
the popup menu and then clicking on a surface that does not belong to
the client that create the popup surface.
When a client with fullscreen surface displayed was aborted by Ctrl-C, the
black surface still be there. Destroy the black surface in
destroy_shell_surface().