weston/include/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.h backend-drm: add additional-devices to support multi GPU 2023-03-03 08:08:46 +00:00
backend-headless.h backend-headless: Use renderer enum type for config selection 2023-01-10 10:59:04 +02:00
backend-pipewire.h backend-pipewire: pass backend to weston_pipewire_output_api::create_head() 2023-04-19 13:36:45 +00:00
backend-rdp.h rdp: Add preliminary rdp multihead support 2023-01-10 12:12:49 +00:00
backend-vnc.h backend-vnc: Add renderer parameter to backend config 2023-01-10 10:59:04 +02:00
backend-wayland.h backend-wayland: Use renderer enum type for config selection 2023-01-10 10:59:04 +02:00
backend-x11.h backend-x11: Use renderer enum type for config selection 2023-01-10 10:59:04 +02:00
config-parser.h libweston, shared: Move out weston_shell_get_binding_modifier 2023-01-09 22:13:07 +00:00
dbus.h libweston: Decouple dbus helper to public namespace 2023-07-14 10:55:24 +00:00
desktop.h shell: Keep window 'activated' state if child has focus 2023-03-30 17:14:29 +00:00
libweston.h kiosk-shell: Redesign the function 'find_focus_successor()' 2023-07-27 10:13:48 +03:00
matrix.h libweston: Add more weston_coord arithmetic helpers 2023-06-19 13:09:03 +00:00
meson.build libweston: Split dbus support into seperate build option 2023-07-14 10:55:24 +00:00
pipewire-plugin.h plug-ins: Migrate pipewire and remoting plug-ins headers to public header 2020-09-04 10:36:48 +00:00
plugin-registry.h Rename plugin-registry.h to libweston/plugin-registry.h 2019-04-18 12:31:46 +03:00
remoting-plugin.h plug-ins: Migrate pipewire and remoting plug-ins headers to public header 2020-09-04 10:36:48 +00:00
shell-utils.h kiosk-shell: Redesign the function 'find_focus_successor()' 2023-07-27 10:13:48 +03:00
version.h.in Rename version.h to libweston/version.h 2019-04-18 12:31:46 +03:00
weston-log.h libweston/weston-log: Add a iterator helper for debug scope 2023-05-30 11:05:14 +00:00
windowed-output-api.h libweston: pass backend to weston_windowed_output_api::create_head() 2023-04-17 09:38:50 +02:00
xwayland-api.h xwayland: Remove process exit status from libweston API 2023-06-19 21:32:47 +01:00
zalloc.h Rename zalloc.h to libweston/zalloc.h 2019-04-18 12:31:46 +03:00