mirror of
https://github.com/swaywm/sway.git
synced 2025-11-12 13:29:56 -05:00
ipc: add window::mark event
This commit is contained in:
parent
dd6debf367
commit
317217f2c8
4 changed files with 21 additions and 5 deletions
|
|
@ -888,6 +888,7 @@ bool view_find_and_unmark(char *mark) {
|
|||
free(view_mark);
|
||||
list_del(view->marks, i);
|
||||
view_update_marks_textures(view);
|
||||
ipc_event_window(container, "mark");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -895,11 +896,10 @@ bool view_find_and_unmark(char *mark) {
|
|||
}
|
||||
|
||||
void view_clear_marks(struct sway_view *view) {
|
||||
for (int i = 0; i < view->marks->length; ++i) {
|
||||
free(view->marks->items[i]);
|
||||
while (view->marks->length) {
|
||||
list_del(view->marks, 0);
|
||||
ipc_event_window(view->swayc, "mark");
|
||||
}
|
||||
list_free(view->marks);
|
||||
view->marks = create_list();
|
||||
}
|
||||
|
||||
bool view_has_mark(struct sway_view *view, char *mark) {
|
||||
|
|
@ -912,6 +912,11 @@ bool view_has_mark(struct sway_view *view, char *mark) {
|
|||
return false;
|
||||
}
|
||||
|
||||
void view_add_mark(struct sway_view *view, char *mark) {
|
||||
list_add(view->marks, strdup(mark));
|
||||
ipc_event_window(view->swayc, "mark");
|
||||
}
|
||||
|
||||
static void update_marks_texture(struct sway_view *view,
|
||||
struct wlr_texture **texture, struct border_colors *class) {
|
||||
struct sway_container *output = container_parent(view->swayc, C_OUTPUT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue