Merge branch 'master' into fix-resize-wiggle

This commit is contained in:
emersion 2018-08-02 08:11:10 +01:00 committed by GitHub
commit 47bf4ed0cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 529 additions and 94 deletions

View file

@ -303,6 +303,12 @@ void view_close(struct sway_view *view) {
}
}
void view_close_popups(struct sway_view *view) {
if (view->impl->close_popups) {
view->impl->close_popups(view);
}
}
void view_damage_from(struct sway_view *view) {
for (int i = 0; i < root_container.children->length; ++i) {
struct sway_container *cont = root_container.children->items[i];
@ -333,6 +339,16 @@ void view_for_each_surface(struct sway_view *view,
}
}
void view_for_each_popup(struct sway_view *view,
wlr_surface_iterator_func_t iterator, void *user_data) {
if (!view->surface) {
return;
}
if (view->impl->for_each_popup) {
view->impl->for_each_popup(view, iterator, user_data);
}
}
static void view_subsurface_create(struct sway_view *view,
struct wlr_subsurface *subsurface);
@ -865,6 +881,8 @@ void view_update_title(struct sway_view *view, bool force) {
// Update title after the global font height is updated
container_update_title_textures(view->swayc);
ipc_event_window(view->swayc, "title");
}
static bool find_by_mark_iterator(struct sway_container *con,
@ -887,6 +905,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;
}
}
@ -894,11 +913,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) {
@ -911,6 +929,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);