labwc/include
John Lindgren 3022985ba7 view: try to reduce confusion in focused_view tracking
Our current approach to handling the focused/active view is a bit
confusing. In particular, it's hard to be sure when server->focused_view
is or isn't in sync with the real wlroots keyboard focus.

Try to clean things up a bit. In particular:

- Add comments to server->focused_view and desktop_focused_view() to
  clarify that they should match, but it's not guaranteed.

- desktop_focused_view() now prints a warning if it detects that
  server->focused_view is out of sync. We should keep an eye out for
  this warning, and if we see it, try to figure out why it happened.

- For consistency, use only "focus/defocus" as the verbs in function
  names rather than "activate". This is a bit arbitrary, but the idea is
  that focus is the primary action while the active/inactive state is a
  side effect.

- view_focus/defocus() replace view_set_activated() and now update both
  focus and active/inactive state, to try to keep them in sync.

- Add comments at view_focus/defocus() to warn against calling them
  directly (we should generally call the desktop.c functions).

- desktop_focus_view(NULL) is now forbidden and is no longer handled as
  a special case to clear the focus. This was (at least to me) a
  surprising behavior and caused trouble when working on another change.

- To maintain existing behavior, desktop_focus_topmost_mapped_view() now
  explicitly clears the focus if there are no mapped views.

There should be no behavioral change here.
2023-09-27 17:13:08 +01:00
..
button button-png.c: s/png_load/button_png_load/ 2023-09-17 19:26:41 +01:00
common action: do not expand env vars in Exec action 2023-09-23 14:52:59 +01:00
config keybinds: add optional layoutDependent argument 2023-09-11 15:41:19 +02:00
menu src/menu/menu.c: support keyboard driven selection 2023-09-05 19:57:14 +01:00
action.h Restore SnapToEdge and MoveToEdge default keybinds 2023-08-06 10:37:36 +02:00
buffer.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
cursor.h dnd: refocus surface under cursor on drag-destroy 2023-05-28 22:17:29 +01:00
debug.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
decorations.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
dnd.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
idle.h Add support for ext_idle_notify_v1.. 2023-07-09 08:26:33 +01:00
key-state.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
labwc.h view: try to reduce confusion in focused_view tracking 2023-09-27 17:13:08 +01:00
layers.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
meson.build Make xwayland support optional 2020-12-30 10:29:21 +00:00
node.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
regions.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
resistance.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
resize_indicator.h Add window resize indicator 2023-08-19 18:37:16 +02:00
session-lock.h includes: identifier consistency in include guards 2023-05-13 22:29:21 +01:00
ssd-internal.h Add ARRAY_SIZE() macro 2023-09-19 22:03:59 +01:00
ssd.h src/ssd: use view->ssd_titlebar_hidden for ssd_thickness calculations 2023-09-21 22:21:19 +01:00
theme.h theme: simplify loading of xbm buttons 2023-08-09 07:38:17 +01:00
view-impl-common.h view: make move_sub_views() use append_children method 2023-08-05 21:06:28 +02:00
view.h view: try to reduce confusion in focused_view tracking 2023-09-27 17:13:08 +01:00
window-rules.h window-rules: add ignoreFocusRequest property 2023-09-10 13:31:15 +02:00
workspaces.h action: support {Go,Send}ToDesktop 'wrap' option 2023-05-21 22:32:07 +02:00
xwayland.h view: account for base size in resize indicator 2023-09-26 01:24:02 -04:00