]> git.mdlowis.com Git - proto/labwc.git/commit
xwayland: Factor out focus_next_surface() from unmanaged_handle_unmap()
authorJohn Lindgren <john@jlindgren.net>
Sat, 3 Sep 2022 17:10:33 +0000 (13:10 -0400)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 3 Sep 2022 17:31:20 +0000 (19:31 +0200)
commit05b7afd05a32abc6c167dae3d8634853bec78799
tree531946b37673bc46dc091aee00f9b1cd416bce05
parentd405a2b3c61fd5e82fbd4b719b86215d6b25469d
xwayland: Factor out focus_next_surface() from unmanaged_handle_unmap()

- Eliminate multiple "return" paths in unmanaged_handle_unmap(), which
  were a bug waiting to happen.
- Use wl_list_for_each_reverse() rather than wl_list_for_each() to find
  the topmost (most-recently-created) unmanaged surface.
- Only call desktop_focus_topmost_mapped_view() if the unmapped surface
  was actually focused.
src/xwayland-unmanaged.c