mirror of
https://github.com/swaywm/sway.git
synced 2024-11-04 23:43:14 +00:00
c1479701de
If e.g. a window has a popup open then that will lock the current focus, making a workspace switch denied. So don't move the mouse pointer in such cases.
38 lines
932 B
C
38 lines
932 B
C
#ifndef _SWAY_FOCUS_H
|
|
#define _SWAY_FOCUS_H
|
|
enum movement_direction {
|
|
MOVE_LEFT,
|
|
MOVE_RIGHT,
|
|
MOVE_UP,
|
|
MOVE_DOWN,
|
|
MOVE_PARENT
|
|
};
|
|
|
|
#include "container.h"
|
|
|
|
// focused_container - the container found by following the `focused` pointer
|
|
// from a given container to a container with `is_focused` boolean set
|
|
// ---
|
|
// focused_view - the container found by following the `focused` pointer from a
|
|
// given container to a view.
|
|
// ---
|
|
|
|
swayc_t *get_focused_container(swayc_t *parent);
|
|
swayc_t *get_focused_view(swayc_t *parent);
|
|
swayc_t *get_focused_float(swayc_t *ws);
|
|
|
|
bool set_focused_container(swayc_t *container);
|
|
bool set_focused_container_for(swayc_t *ancestor, swayc_t *container);
|
|
|
|
// lock focused container/view. locked by windows with OVERRIDE attribute
|
|
// and unlocked when they are destroyed
|
|
|
|
extern bool locked_container_focus;
|
|
extern bool locked_view_focus;
|
|
|
|
|
|
bool move_focus(enum movement_direction direction);
|
|
|
|
#endif
|
|
|