From 20a81a5204f26c7362d7d0f70eefd2acb4eb4feb Mon Sep 17 00:00:00 2001 From: Cagebreak Signing Key 3 Date: Fri, 26 Jun 2020 15:21:55 +0200 Subject: [PATCH] Release 1.3.2 - Fix Issue 9 - Fix Issue 10 --- Bugs.md | 29 ++++++++++++++++++++++ README.md | 5 ++++ man/cagebreak-config.5.md | 2 +- man/cagebreak.1.md | 2 +- meson.build | 2 +- seat.c | 1 + signatures/1.3.1.sig | Bin 0 -> 566 bytes signatures/cagebreak.sig | Bin 566 -> 566 bytes view.c | 49 +++++++++++++++++++------------------- view.h | 5 ++-- xdg_shell.c | 6 ++--- 11 files changed, 69 insertions(+), 32 deletions(-) create mode 100644 signatures/1.3.1.sig diff --git a/Bugs.md b/Bugs.md index dc238c4..0d81cd2 100644 --- a/Bugs.md +++ b/Bugs.md @@ -119,3 +119,32 @@ to resize to the appropriate size. Calling `vsplit` on inkscape demonstrates this issue, since it causes adjacent tiles to overlap (contrary to the idea of a tiling compositor). +### Issue 9 + + * github issue number: N/A + * Fixed: 1.3.2 + +Cagebreak up to and including release 1.3.1 sometimes does not render +dropdown menus correctly. + +Steps to reproduce: + + * Start firefox with wayland environment variables + * Press `alt` to show dropdown menus + * Move cursor over different menu items + * Rendering will not work correctly + +### Issue 10 + + * github issue number: N/A + * Fixed: 1.3.2 + +Cagebreak up to and including release 1.3.2 does not render drag icons +correctly. + +Steps to reproduce: + + * Start firefox with wayland environment variables + * Click on a link and drag it over the screen + * Let go of the link + * Rendering will not work correctly diff --git a/README.md b/README.md index f4da22e..c3584ab 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,11 @@ ninja -C build For every release after 1.0.5, hashes will be provided. +1.3.2 + + * sha 256: 2cefab73b8d5902b30adb0dda1bd292af2ee808d232abcc4b2a2802d522d5232 + * sha 512: 3789efde2cb6f629c77738dd6c8638646b345d5272868aa9b244b2b19c53e6a0f5911d34744e3a9ff6253c73b2b11f6714f37ae86cc21d6979e0c8539315d659 + 1.3.1 * sha 256: 71be224cd99d20da4f039675ec5c48213dd14ef027b804501fa3241886b2b08b diff --git a/man/cagebreak-config.5.md b/man/cagebreak-config.5.md index 4e8f542..c063dc5 100644 --- a/man/cagebreak-config.5.md +++ b/man/cagebreak-config.5.md @@ -1,4 +1,4 @@ -% CAGEBREAK-CONFIG(1) Version 1.3.1 | Cagebreak Manual +% CAGEBREAK-CONFIG(1) Version 1.3.2 | Cagebreak Manual # NAME diff --git a/man/cagebreak.1.md b/man/cagebreak.1.md index 6777cd7..3445932 100644 --- a/man/cagebreak.1.md +++ b/man/cagebreak.1.md @@ -1,4 +1,4 @@ -% CAGEBREAK(1) Version 1.3.1 | Cagebreak Manual +% CAGEBREAK(1) Version 1.3.2 | Cagebreak Manual # NAME diff --git a/meson.build b/meson.build index c6676ea..decd4b7 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('cagebreak', 'c', - version: '1.3.1', + version: '1.3.2', license: 'MIT', default_options: [ 'c_std=c11', diff --git a/seat.c b/seat.c index ae8e52f..7f3c24f 100644 --- a/seat.c +++ b/seat.c @@ -731,6 +731,7 @@ handle_drag_icon_destroy(struct wl_listener *listener, void *_data) { struct cg_drag_icon *drag_icon = wl_container_of(listener, drag_icon, destroy); + drag_icon_damage(drag_icon); wl_list_remove(&drag_icon->link); wl_list_remove(&drag_icon->destroy.link); free(drag_icon); diff --git a/signatures/1.3.1.sig b/signatures/1.3.1.sig new file mode 100644 index 0000000000000000000000000000000000000000..288094e0abe6c0c0c5f8f02f02e4b23453297d07 GIT binary patch literal 566 zcmV-60?GY}0y6{v0SEvc79j+6HLHmt3S1SZD7Rm95KPD1rPrth0$$h31po>O5Ofes z$K0jYsDzyl|7~X-L$LyQ?Cxv9MrwnDpN7!^p^iuQrsJ(88|V@D3~kLFc}6NeoA9e6 zXW#~a-j?!2tQX)>{Bqlf&!xMiXccM**s^axv7>-p%vdrlDOltSYBe1h5A@GSV#Zj9 zU7X|i|6c0ILEZsxlD@<|GOJfbV!~O^_AF1NJLz(Lj`O?&UNX9_&ZnC_Q3`f{XdT|G zkE*6#Py>LNs1v5|t2w>cIei|%8aP2j4v_-?#=R;LLTA99%}3&U;2{v! zS}{(`TdKe;h!3pno3keDIz@I;NPbSnVVKEPUXVA22pc=(`1kic*<=oR7h+9=1Qam( z(^f(rCukN0@FWpA(2Dg<;usl{;=qMIi=g}Vrz>|XBlUd}&dQ>JUQ>Jis|Y{%Sdp43 EWwj;=*Z=?k literal 0 HcmV?d00001 diff --git a/signatures/cagebreak.sig b/signatures/cagebreak.sig index 288094e0abe6c0c0c5f8f02f02e4b23453297d07..dad0846c873b64c224e9a51e140c518f9bc94e62 100644 GIT binary patch delta 542 zcmV+(0^$9(1hxc_BY*YrH~5Ofes$K0jYs5jsc0KwCoS&1ud7*mD${XT28C=hWp zRY+Y0#~F~#a9?jv&X>iI!y{A@5T4l|+^|+4cP^doL>kp_?PuNs*4K|hbk?r)SQHqt zgjL({wq8Rg<_|_>A53%%Yr=>g+#-Du2G|%#@(cx(_5I>Agyh zoh*CK5518E)Ph(j=pCyf=r=f+{!YIPI$g8+mOpB9d)IxnIb%xpgJOV z{~m5f3?E-G5!Ok=C8w~fe*MrRj-1n<`MByNz5;p{854Ap)cX$S(6~Q{Ahd=tADAr&czVVjGsZWLvoA#vdMbw zrj=9Ax9>g~0G0u82?GYm9N=oR(^wkAfOY!U zpgzI!dWeE=_$f&^^(#skPd4rMUA%DNFGl_TOAv({F}9j;un&f{@ARK~&!e@`&^~TU gmS%Za?iVO5Ofes$K0jYsDzyl|7~X-L$LyQ?Cxv9MrwnDpN7!^ zp^iuQrsJ(88|V@D3~kLFc}6NeoA9e6XW#~a-j?!2tQX)>{Bqlf&!xMiXccM**s^ax zv7>-p%vdrlDOltSYBe1h5A@GSV#Zj9U7X|i|6c0ILEZsxl7GI$JTj|SMPkBP&-N@& zq&w+yeU9_I170$^uFj{MJy8mFe`p=vtB196O2IvM$9LGiqC`Ix*!tG$RugP7aHW8ulG< z!zYw%GkkZKX@Y+CiVU?6q*_hR?+9{d%U+)V6sW#VKz~^uNJl#>+E_1?MAIi|lZ!~p z4tCD!uKSk`kpln5y($qxXTYA#N8)?nArRJDF;2@{s=zFW53KB)vnK31MRrn1eon?= zn8{UMkT-@18$0Cq_xC;7WDa>3Voiet6fpYJRze;pXch(VBoR5#iuFz67#Wh{z=b}G gp!@cxD;IYxBlUd}&dQ>JUQ>Jis|Y{%Sdp43W&RWclK=n! diff --git a/view.c b/view.c index 142ac36..1560885 100644 --- a/view.c +++ b/view.c @@ -46,25 +46,29 @@ view_get_prev_view(struct cg_view *view) { } void -view_damage_child(struct cg_view_child *child, int x, int y, bool whole); +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); +} 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, child->view->ox + x, child->view->oy + y, false); + view_damage_child(child, x, y, false); } static void -subsurface_create(struct cg_view *view, struct wlr_subsurface *wlr_subsurface); +subsurface_create(struct cg_view_child *parent, struct cg_view *view, + struct wlr_subsurface *wlr_subsurface); static void view_child_handle_new_subsurface(struct wl_listener *listener, void *data) { struct cg_view_child *child = wl_container_of(listener, child, new_subsurface); struct wlr_subsurface *wlr_subsurface = data; - subsurface_create(child->view, wlr_subsurface); + subsurface_create(child, child->view, wlr_subsurface); } void @@ -73,19 +77,16 @@ view_child_finish(struct cg_view_child *child) { return; } - int x, y; - child->get_coords(child, &x, &y); - view_damage_child(child, child->view->ox + x, child->view->oy + y, true); - wl_list_remove(&child->link); wl_list_remove(&child->commit.link); wl_list_remove(&child->new_subsurface.link); } void -view_child_init(struct cg_view_child *child, struct cg_view *view, - struct wlr_surface *wlr_surface) { +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; child->wlr_surface = wlr_surface; child->commit.notify = view_child_handle_commit; @@ -118,12 +119,16 @@ subsurface_handle_destroy(struct wl_listener *listener, void *_data) { static void subsurface_get_coords(struct cg_view_child *child, int *x, int *y) { - struct wlr_surface *surface = child->wlr_surface; - *x = 0; - *y = 0; + *x = -child->view->ox; + *y = -child->view->oy; - if(!(child->view && child->view->impl)) { + if(child->parent && child->parent->get_coords) { + int sx, sy; + child->parent->get_coords(child->parent, &sx, &sy); + *x += sx; + *y += sy; + } else { while(surface && wlr_surface_is_subsurface(surface)) { struct wlr_subsurface *subsurface = wlr_subsurface_from_wlr_surface(surface); @@ -138,13 +143,15 @@ subsurface_get_coords(struct cg_view_child *child, int *x, int *y) { } static void -subsurface_create(struct cg_view *view, struct wlr_subsurface *wlr_subsurface) { +subsurface_create(struct cg_view_child *parent, struct cg_view *view, + struct wlr_subsurface *wlr_subsurface) { struct cg_subsurface *subsurface = calloc(1, sizeof(struct cg_subsurface)); if(!subsurface) { return; } - view_child_init(&subsurface->view_child, view, wlr_subsurface->surface); + view_child_init(&subsurface->view_child, parent, view, + wlr_subsurface->surface); subsurface->view_child.destroy = subsurface_destroy; subsurface->view_child.get_coords = subsurface_get_coords; subsurface->wlr_subsurface = wlr_subsurface; @@ -157,7 +164,7 @@ static void handle_new_subsurface(struct wl_listener *listener, void *data) { struct cg_view *view = wl_container_of(listener, view, new_subsurface); struct wlr_subsurface *wlr_subsurface = data; - subsurface_create(view, wlr_subsurface); + subsurface_create(NULL, view, wlr_subsurface); } char * @@ -210,12 +217,6 @@ view_damage(struct cg_view *view, bool whole) { view->oy, whole); } -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); -} - void view_damage_part(struct cg_view *view) { view_damage(view, false); @@ -325,7 +326,7 @@ view_map(struct cg_view *view, struct wlr_surface *surface) { struct wlr_subsurface *subsurface; wl_list_for_each(subsurface, &view->wlr_surface->subsurfaces, parent_link) { - subsurface_create(view, subsurface); + subsurface_create(NULL, view, subsurface); } view->new_subsurface.notify = handle_new_subsurface; diff --git a/view.h b/view.h index 8b405da..bcb8908 100644 --- a/view.h +++ b/view.h @@ -52,6 +52,7 @@ struct cg_view_impl { struct cg_view_child { struct cg_view *view; + struct cg_view_child *parent; struct wlr_surface *wlr_surface; struct wl_list link; @@ -110,7 +111,7 @@ view_wlr_surface_at(const struct cg_view *view, double sx, double sy, void view_child_finish(struct cg_view_child *child); void -view_child_init(struct cg_view_child *child, struct cg_view *view, - struct wlr_surface *wlr_surface); +view_child_init(struct cg_view_child *child, struct cg_view_child *parent, + struct cg_view *view, struct wlr_surface *wlr_surface); #endif diff --git a/xdg_shell.c b/xdg_shell.c index 59b3334..7d8ee4f 100644 --- a/xdg_shell.c +++ b/xdg_shell.c @@ -128,8 +128,8 @@ xdg_popup_get_coords(struct cg_view_child *child, int *x, int *y) { struct cg_xdg_popup *popup = (struct cg_xdg_popup *)child; struct wlr_xdg_surface *surface = popup->wlr_popup->base; - int x_offset = -surface->geometry.x; - int y_offset = -surface->geometry.y; + int x_offset = -surface->geometry.x - child->view->ox; + int y_offset = -surface->geometry.y - child->view->oy; wlr_xdg_popup_get_toplevel_coords( surface->popup, x_offset + surface->popup->geometry.x, @@ -145,7 +145,7 @@ xdg_popup_create(struct cg_view *view, struct wlr_xdg_popup *wlr_popup) { popup->wlr_popup = wlr_popup; popup->view_child.get_coords = xdg_popup_get_coords; - view_child_init(&popup->view_child, view, wlr_popup->base->surface); + view_child_init(&popup->view_child, NULL, view, wlr_popup->base->surface); popup->view_child.destroy = xdg_popup_destroy; popup->destroy.notify = handle_xdg_popup_destroy; wl_signal_add(&wlr_popup->base->events.destroy, &popup->destroy);