Skip to content

Commit

Permalink
Release 1.4.2
Browse files Browse the repository at this point in the history
- Fix Issue 16
  • Loading branch information
Cagebreak Signing Key 3 committed Sep 20, 2020
1 parent 7790995 commit 6846fe4
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 17 deletions.
8 changes: 8 additions & 0 deletions Bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,11 @@ Steps to reproduce:
* Click on dialog box (not on the dropdown menu) to make the menu disappear
* Observe flickering of the area, where the dropdown menu used to be

### Issue 16

* github issue number: N/A
* Fixed: 1.4.2

Cagebreak up to and including release 1.4.1 has a difficult-to-reproduce
use-after-free bug, which can sometimes trigger crashes when popups are closed.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ ninja -C build

For every release after 1.0.5, hashes will be provided.

1.4.2

* sha 256: 27efb9328cf9cab1f81e66627696baf8c7cc2c372339a2890f955b40f3a7c396
* sha 512: afcdbbce0753aff4770a88ddbd7df5687a7de0c77de3a2d296f85a8b8e01813212be6a0b69548aadef58e0e7da19ffea71c4f3448572656d4b19ff7f2f2fb70a

1.4.1

* sha 256: c3e0ccceaf1078b91071c40b0ccb7c4f8e53ae38b05ee6637f9f39f7f6ece2cb
Expand Down
2 changes: 1 addition & 1 deletion man/cagebreak-config.5.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% CAGEBREAK-CONFIG(1) Version 1.4.1 | Cagebreak Manual
% CAGEBREAK-CONFIG(1) Version 1.4.2 | Cagebreak Manual

# NAME

Expand Down
2 changes: 1 addition & 1 deletion man/cagebreak.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% CAGEBREAK(1) Version 1.4.1 | Cagebreak Manual
% CAGEBREAK(1) Version 1.4.2 | Cagebreak Manual

# NAME

Expand Down
6 changes: 3 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('cagebreak', 'c',
version: '1.4.1',
version: '1.4.2',
license: 'MIT',
default_options: [
'c_std=c11',
Expand Down Expand Up @@ -199,9 +199,9 @@ reproducible_build_versions = {
'xkbcommon': '1.0.1',
'fontconfig': '2.13.91',
'pixman': '0.40.0',
'pango': '1.46.1',
'pango': '1.46.2',
'cairo': '1.17.3',
'pangocairo': '1.46.1',
'pangocairo': '1.46.2',
'math': '-1'
}

Expand Down
Binary file added signatures/1.4.1.sig
Binary file not shown.
Binary file modified signatures/cagebreak.sig
Binary file not shown.
29 changes: 21 additions & 8 deletions view.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ view_get_prev_view(struct cg_view *view) {
}

void
view_damage_child(struct cg_view_child *child, int x, int y, bool whole) {
output_damage_surface(child->view->workspace->output, child->wlr_surface, x,
y, whole);
view_damage_child(struct cg_view_child *child, bool whole) {
int x, y;
child->get_coords(child, &x, &y);
output_damage_surface(child->view->workspace->output, child->wlr_surface,
x + child->view->ox, y + child->view->oy, whole);
}

static void
view_child_handle_commit(struct wl_listener *listener, void *_data) {
struct cg_view_child *child = wl_container_of(listener, child, commit);
int x, y;
child->get_coords(child, &x, &y);
view_damage_child(child, x + child->view->ox, y + child->view->oy, false);
view_damage_child(child, false);
}

static void
Expand All @@ -74,11 +74,20 @@ view_child_finish(struct cg_view_child *child) {
return;
}

if(child->view != NULL && child->view->wlr_surface != NULL) {
view_damage_whole(child->view);
if(child->view != NULL) {
view_damage_child(child, true);
}

struct cg_view_child *subchild, *tmpchild;
wl_list_for_each_safe(subchild, tmpchild, &child->children, parent_link) {
subchild->parent = NULL;
wl_list_remove(&subchild->parent_link);
}

wl_list_remove(&child->link);
if(child->parent != NULL) {
wl_list_remove(&child->parent_link);
}
wl_list_remove(&child->commit.link);
wl_list_remove(&child->new_subsurface.link);
}
Expand All @@ -88,7 +97,11 @@ view_child_init(struct cg_view_child *child, struct cg_view_child *parent,
struct cg_view *view, struct wlr_surface *wlr_surface) {
child->view = view;
child->parent = parent;
if(parent != NULL) {
wl_list_insert(&parent->children, &child->parent_link);
}
child->wlr_surface = wlr_surface;
wl_list_init(&child->children);

child->commit.notify = view_child_handle_commit;
wl_signal_add(&wlr_surface->events.commit, &child->commit);
Expand Down
4 changes: 3 additions & 1 deletion view.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ struct cg_view_impl {
struct cg_view_child {
struct cg_view *view;
struct cg_view_child *parent;
struct wl_list children;
struct wlr_surface *wlr_surface;
struct wl_list link;
struct wl_list parent_link;

struct wl_listener commit;
struct wl_listener new_subsurface;
Expand Down Expand Up @@ -83,7 +85,7 @@ view_damage_part(struct cg_view *view);
void
view_damage_whole(struct cg_view *view);
void
view_damage_child(struct cg_view_child *view, int x, int y, bool whole);
view_damage_child(struct cg_view_child *view, bool whole);
void
view_activate(struct cg_view *view, bool activate);
void
Expand Down
4 changes: 1 addition & 3 deletions xdg_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ xdg_popup_destroy(struct cg_view_child *child) {
return;
}

int x, y;
child->get_coords(child, &x, &y);
view_damage_child(child, x + child->view->ox, y + child->view->oy, true);
view_damage_child(child, true);
struct cg_xdg_popup *popup = (struct cg_xdg_popup *)child;
wl_list_remove(&popup->destroy.link);
wl_list_remove(&popup->map.link);
Expand Down

0 comments on commit 6846fe4

Please sign in to comment.