aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-07-15 22:43:33 +1000
committerFurkan Sahin <furkan-dev@proton.me>2018-07-15 22:43:33 +1000
commit8cc65028b72d4dced646540b9c274a5f8dea71b5 (patch)
tree1a70d1d73cbffb26bf432c1c7b395ee996651ad3 /include
parente4c2193f0bffbe0f1ccef3f02f02adf2bda194bb (diff)
Implement urgency base functionality
Introduces a command to manually set urgency, as well as rendering of urgent views, sending the IPC event, removing urgency after focused for one second, and matching urgent views via criteria.
Diffstat (limited to 'include')
-rw-r--r--include/sway/commands.h1
-rw-r--r--include/sway/tree/view.h8
-rw-r--r--include/sway/tree/workspace.h3
3 files changed, 12 insertions, 0 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 3ebd0002..1e93e2a3 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -152,6 +152,7 @@ sway_cmd cmd_swaybg_command;
sway_cmd cmd_swap;
sway_cmd cmd_title_format;
sway_cmd cmd_unmark;
+sway_cmd cmd_urgent;
sway_cmd cmd_workspace;
sway_cmd cmd_ws_auto_back_and_forth;
sway_cmd cmd_workspace_layout;
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 21d6403e..9022f7a6 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -70,6 +70,10 @@ struct sway_view {
bool border_left;
bool border_right;
+ struct timespec urgent;
+ bool allow_request_urgent;
+ struct wl_event_source *urgent_timer;
+
bool destroying;
list_t *executed_criteria; // struct criteria *
@@ -305,4 +309,8 @@ void view_update_marks_textures(struct sway_view *view);
*/
bool view_is_visible(struct sway_view *view);
+void view_set_urgent(struct sway_view *view, bool enable);
+
+bool view_is_urgent(struct sway_view *view);
+
#endif
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index c72a4ac0..8c2f4cd5 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -42,4 +42,7 @@ void workspace_output_add_priority(struct sway_container *workspace,
struct sway_container *workspace_output_get_highest_available(
struct sway_container *ws, struct sway_container *exclude);
+
+bool workspace_is_urgent(struct sway_container *workspace);
+
#endif