weston/libweston
Sergio Gómez cc837eea61 kiosk-shell: Redesign the function 'find_focus_successor()'
The function find_focus_successor() is called when destroying a surface to find
a successor to the current focus. It, however, has the following issues:

- Its first parameter is the weston layer from which to search for a successor.
  This is an unnecessary flexibility for our use, which only adds complexity to
  the user of the function by having to make a call for each layer. We know
  that we want to search for a successor first in the normal layer, and if that
  fails, then in the inactive layer. So we change the signature of
  find_focus_successor(), removing this first parameter.

- It includes logic to decide whether to do the search or not: if the destroyed
  surface is different from the surface that currently has focus, and if their
  outputs are the same, then abort and don't do the search. This returns NULL to
  the calling function. The problem is that the function also returns NULL if
  it does the search and finds no successor. The distinction for the failing
  reason is lost, and the user of the function needs to add more logic to know
  the reason for failure. To simplify, we take the logic out of
  find_focus_successor() and inside the caller.

- It returns the successor view, although it receives surfaces and the client
  has logic to retrieve the surface corresponding to the returned view. To
  simplify and maintain symmetry, we change the signature so that the function
  returns the surface corresponding to the successor view.

Fixes: #738

Signed-off-by: Sergio Gómez <sergio.g.delreal@gmail.com>
2023-07-27 10:13:48 +03:00
..
backend-drm backend-drm: Make DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP inert 2023-07-18 14:58:08 +03:00
backend-headless libweston: Move output damage subtraction out of backends 2023-07-11 07:26:43 -05:00
backend-pipewire libweston: Move output damage subtraction out of backends 2023-07-11 07:26:43 -05:00
backend-rdp backend-rdp: extract weston_output_set_single_mode() 2023-07-11 15:43:29 +00:00
backend-vnc backend-vnc: use weston_output_set_single_mode() 2023-07-11 15:43:29 +00:00
backend-wayland backend-wayland: Free pixel formats on shutdown 2023-07-12 12:30:53 +01:00
backend-x11 libweston: Move output damage subtraction out of backends 2023-07-11 07:26:43 -05:00
color-lcms color-lcms: increase float precision to print segment breaks 2023-06-29 17:05:06 -03:00
dbus libweston: Split dbus support into seperate build option 2023-07-14 10:55:24 +00:00
desktop libweston: Replace struct_weston_position with weston_coords 2023-07-19 07:48:30 -05:00
renderer-gl renderer-gl: only flush damage for surfaces used in the next output repaint 2023-07-14 16:30:52 +00:00
shell-utils kiosk-shell: Redesign the function 'find_focus_successor()' 2023-07-27 10:13:48 +03:00
animation.c animation: Remove unnecessary repaint schedule 2023-07-24 12:35:47 +03:00
auth.c libweston: Add user authentication support via PAM 2022-11-23 16:58:48 +01:00
backend.h libweston: add weston_backend::shutdown callback 2023-06-27 12:09:45 +01:00
bindings.c input: Fix uint/enum declaration mismatch 2023-04-11 11:44:34 +00:00
clipboard.c libweston: correct argument name in the handler of wl_data_source.accept 2022-04-14 12:05:57 +00:00
color-noop.c libweston: add HDR metadata to weston_output 2022-05-27 10:30:35 +00:00
color.c color-lcms: add debug scope for color tranformations 2023-04-12 10:03:32 +00:00
color.h color-lcms: add debug scope for color tranformations 2023-04-12 10:03:32 +00:00
compositor.c view: Schedule view repaint when changing properties 2023-07-24 12:35:47 +03:00
content-protection.c content-protection: Don't leak update timer on shutdown 2021-12-08 13:38:18 +00:00
data-device.c input: Don't schedule repaints for drag-and-drop 2023-07-24 12:35:47 +03:00
drm-formats.c drm-formats: add weston_drm_format_array_count_pairs() 2021-11-25 10:47:45 -03:00
git-version.h.meson Add Meson build system 2018-12-09 14:50:54 +02:00
gl-borders.c libweston, backends: move GL renderer interface into weston_renderer 2023-01-16 20:40:34 +01:00
gl-borders.h libweston, backends: move GL renderer interface into weston_renderer 2023-01-16 20:40:34 +01:00
input.c input: Remove unnecessary repaint schedules 2023-07-24 12:35:47 +03:00
launcher-impl.h launchers: Remove --tty option 2022-03-03 17:00:15 -06:00
launcher-libseat.c libweston: Decouple dbus helper to public namespace 2023-07-14 10:55:24 +00:00
launcher-logind.c libweston: Decouple dbus helper to public namespace 2023-07-14 10:55:24 +00:00
launcher-util.c launchers: Remove --tty option 2022-03-03 17:00:15 -06:00
launcher-util.h launchers: Remove --tty option 2022-03-03 17:00:15 -06:00
libinput-device.c libinput: hook up tablet events 2023-03-31 12:10:26 +00:00
libinput-device.h libinput: hook up tablet events 2023-03-31 12:10:26 +00:00
libinput-seat.c libweston: Use weston_coord in struct weston_pointer 2023-02-17 13:51:23 +00:00
libinput-seat.h Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
libweston-internal.h libweston: Add output parameter to weston_renderer::flush_damage() 2023-07-14 16:30:52 +00:00
linux-dmabuf.c helpers: Add a u64 from 2 u32 helper 2022-10-27 08:13:30 +00:00
linux-dmabuf.h linux-dmabuf: add missing includes and declarations 2022-12-16 15:05:10 +02:00
linux-explicit-synchronization.c libweston: Advertise minor version 2 of zwp_linux_explicit_synchronization_v1 2019-08-02 15:00:08 +00:00
linux-explicit-synchronization.h libweston: Support zwp_surface_synchronization_v1.set_acquire_fence 2019-02-06 12:21:56 +00:00
linux-sync-file-uapi.h libweston: Introduce an internal linux sync file API 2019-02-06 12:21:56 +00:00
linux-sync-file.c libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
linux-sync-file.h libweston: export weston_linux_sync_file_read_timestamp() 2019-04-18 12:50:55 +03:00
log.c libweston: Add weston_log_paced() 2022-11-08 08:32:26 -06:00
meson.build libweston: Split dbus support into seperate build option 2023-07-14 10:55:24 +00:00
noop-renderer.c libweston: Add output parameter to weston_renderer::flush_damage() 2023-07-14 16:30:52 +00:00
output-capture.c drm: allow to skip composition if pending capture is writeback 2023-03-31 10:36:31 +00:00
output-capture.h drm: allow to skip composition if pending capture is writeback 2023-03-31 10:36:31 +00:00
pixel-formats.c pixel-formats: Add gl_internalformat 2023-06-09 09:21:31 +00:00
pixel-formats.h pixel-formats: Add gl_internalformat 2023-06-09 09:21:31 +00:00
pixman-renderer.c libweston: Add output parameter to weston_renderer::flush_damage() 2023-07-14 16:30:52 +00:00
pixman-renderer.h pixman-renderer: use pixel_format_info instead of pixman_format_code_t 2023-01-28 12:59:16 +00:00
plugin-registry.c Rename plugin-registry.h to libweston/plugin-registry.h 2019-04-18 12:31:46 +03:00
screenshooter.c screenshooter: Add SHM buffer destroy listener to avoid invalid memcpy 2022-10-03 16:52:16 +02:00
spring-tool.c Rename compositor.h to libweston/libweston.h 2019-04-18 12:31:46 +03:00
timeline.c libweston: fix typos 2021-02-24 10:01:17 -05:00
timeline.h libweston: move TYPEVERIFY macro into shared 2021-02-17 12:52:33 +00:00
touch-calibration.c libweston: Use weston_coord in struct weston_output 2023-06-12 16:55:22 -05:00
vertex-clipping.c gl-renderer: Make clip_transformed() surf parameter constant 2023-06-26 12:15:43 +00:00
vertex-clipping.h gl-renderer: Make clip_transformed() surf parameter constant 2023-06-26 12:15:43 +00:00
weston-direct-display.c libweston: Add weston-direct-display server side implementation 2019-11-18 19:33:09 +02:00
weston-log-file.c weston-log: destroy subscriptions with destruction of subscribers 2020-02-10 10:53:50 +00:00
weston-log-flight-rec.c weston-log-flight-rec: Map ring buffer using memset() 2023-03-10 11:35:04 +01:00
weston-log-internal.h weston-log-wayland: make stream_destroy() use weston_log_subscriber_release() 2020-02-10 10:53:50 +00:00
weston-log-wayland.c Fix indentation all through the project 2021-07-31 15:28:20 +00:00
weston-log.c libweston/weston-log: Add a iterator helper for debug scope 2023-05-30 11:05:14 +00:00