mirror of
https://github.com/labwc/labwc.git
synced 2026-05-02 06:47:03 -04:00
server: add pending auto-raise state + decl
Add two fields to struct server: struct view *pending_auto_raise_view; struct wl_event_source *pending_auto_raise_timer; and forward-declare desktop_cancel_pending_auto_raise() in labwc.h. The state is a single 'slot' (at most one view/timer pending) since a new focus change supersedes any previous pending raise. This commit just reserves the state and the public API; the behaviour is implemented in the following commit.
This commit is contained in:
parent
7b3f37725f
commit
fe6ea66b82
1 changed files with 12 additions and 0 deletions
|
|
@ -150,6 +150,11 @@ struct seat {
|
|||
struct server {
|
||||
struct wl_display *wl_display;
|
||||
struct wl_event_loop *wl_event_loop; /* Can be used for timer events */
|
||||
|
||||
/* Pending auto-raise timer (used when rc.raise_on_focus_delay_ms > 0) */
|
||||
struct view *pending_auto_raise_view;
|
||||
struct wl_event_source *pending_auto_raise_timer;
|
||||
|
||||
struct wlr_renderer *renderer;
|
||||
struct wlr_allocator *allocator;
|
||||
struct wlr_backend *backend;
|
||||
|
|
@ -343,6 +348,13 @@ void xdg_shell_finish(void);
|
|||
*/
|
||||
void desktop_focus_view(struct view *view, bool raise);
|
||||
|
||||
/**
|
||||
* desktop_cancel_pending_auto_raise() - cancel any pending delayed auto-raise
|
||||
* (from raiseOnFocusDelay). Called when a view is being destroyed, on config
|
||||
* reload, or when a new focus change with raise=false supersedes the pending.
|
||||
*/
|
||||
void desktop_cancel_pending_auto_raise(void);
|
||||
|
||||
/**
|
||||
* desktop_focus_view_or_surface() - like desktop_focus_view() but can
|
||||
* also focus other (e.g. xwayland-unmanaged) surfaces
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue