From c20e63b3498e9f9f25784abe632cfc3a99789509 Mon Sep 17 00:00:00 2001 From: Cagebreak Signing Key 3 Date: Tue, 21 Jul 2020 15:43:47 +0200 Subject: [PATCH] Release 1.3.3 - Fix Issue 11 - Fix Issue 12 --- Bugs.md | 25 ++++++++++++++++++++++++- README.md | 13 ++++++++++--- keybinding.c | 16 ++++++++++++++++ keybinding.h | 9 ++++++--- man/cagebreak-config.5.md | 2 +- man/cagebreak.1.md | 2 +- meson.build | 4 ++-- output.c | 5 +---- parse.c | 22 +++++++--------------- signatures/1.3.2.sig | Bin 0 -> 566 bytes signatures/cagebreak.sig | Bin 566 -> 566 bytes view.c | 5 ++--- view.h | 2 ++ xdg_shell.c | 7 +++++-- xwayland.c | 1 + 15 files changed, 78 insertions(+), 35 deletions(-) create mode 100644 signatures/1.3.2.sig diff --git a/Bugs.md b/Bugs.md index 0d81cd2..b30fe4f 100644 --- a/Bugs.md +++ b/Bugs.md @@ -139,7 +139,7 @@ Steps to reproduce: * github issue number: N/A * Fixed: 1.3.2 -Cagebreak up to and including release 1.3.2 does not render drag icons +Cagebreak up to and including release 1.3.1 does not render drag icons correctly. Steps to reproduce: @@ -148,3 +148,26 @@ Steps to reproduce: * Click on a link and drag it over the screen * Let go of the link * Rendering will not work correctly + +### Issue 11 + + * github issue number: N/A + * Fixed: 1.3.3 + +Cagebreak up to and including release 1.3.2 does not parse configuration +"on-keypress" but "on-parse". This does not conform to the documentation. + +### Issue 12 + + * github issue number: N/A + * Fixed: 1.3.3 + +Cagebreak up to and including release 1.3.2 does not render firefox correctly, +given certain splits. + +Steps to reproduce: + + * Open firefox + * Split screen with firefox on the right side of the screen + * Observe firefox freezing and flickering, especially while scrolling + diff --git a/README.md b/README.md index c3584ab..e96c3ba 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@ provide a successor to ratpoison for Wayland users. However, this is no reimplementation of ratpoison. Should you like to know if a feature will be implemented, open an issue or get in touch with the development team. -This README is only relevant for development resources and instructions. For -documentation of Cagebreak, please see +For documentation of Cagebreak, please see the man pages for [cagebreak](man/cagebreak.1.md) and cagebreak [configuration](man/cagebreak-config.5.md) and the [Wiki](https://github.com/project-repo/cagebreak/wiki/). @@ -20,7 +19,10 @@ other distributions given the proper library versions. ## Installation -If you are using archlinux, just clone the [PKGBUILD](https://aur.archlinux.org/cagebreak.git) from the aur. +If you are using archlinux, just use the PKGBUILDs from the aur: + + * Using the `cagebreak` package, Cagebreak is compiled on the target system (since release 1.3.0) + * Using `cagebreak-bin` package, the pre-built binaries are extracted to the appropriate paths on the target system (since release 1.3.2) See [cagebreak-pkgbuild](https://github.com/project-repo/cagebreak-pkgbuild) for details. @@ -178,6 +180,11 @@ ninja -C build For every release after 1.0.5, hashes will be provided. +1.3.3 + + * sha 256: 801851ceb52afac333a1decdd236ddef55555f8b36f865e8b3a831975a496f0d + * sha 512: ce64dd56ab99bba0a83414fecc82d85322e1ca5ca3a2ca77bdc7055b2dd10fd5e20e3ff62809a696d1b04ff0046fed88e2d7538aa447099d7c2d7df8e627b2e0 + 1.3.2 * sha 256: 2cefab73b8d5902b30adb0dda1bd292af2ee808d232abcc4b2a2802d522d5232 diff --git a/keybinding.c b/keybinding.c index 752a434..054f638 100644 --- a/keybinding.c +++ b/keybinding.c @@ -825,6 +825,19 @@ keybinding_move_view_to_workspace(struct cg_server *server, uint32_t ws) { } } +void +keybinding_configure_output(struct cg_server *server, + struct cg_output_config *cfg) { + struct cg_output_config *it, *tmp; + wl_list_for_each_safe(it, tmp, &server->output_config, link) { + if(strcmp(cfg->output_name, it->output_name) == 0) { + wl_list_remove(&it->link); + free(it->output_name); + } + } + wl_list_insert(&server->output_config, &cfg->link); +} + /* Hint: see keybinding.h for details on "data" */ int run_action(enum keybinding_action action, struct cg_server *server, @@ -947,6 +960,9 @@ run_action(enum keybinding_action action, struct cg_server *server, case KEYBINDING_WORKSPACES: keybinding_set_nws(server, data.i); break; + case KEYBINDING_CONFIGURE_OUTPUT: + keybinding_configure_output(server, data.o_cfg); + break; default: { wlr_log(WLR_ERROR, "run_action was called with a value not present in \"enum " diff --git a/keybinding.h b/keybinding.h index 24f8af2..cd48840 100644 --- a/keybinding.h +++ b/keybinding.h @@ -18,9 +18,11 @@ enum keybinding_action { KEYBINDING_SPLIT_HORIZONTAL, KEYBINDING_CHANGE_TTY, // data.u is the desired tty KEYBINDING_LAYOUT_FULLSCREEN, - KEYBINDING_CYCLE_VIEWS, // data.b is 0 if forward, 1 if reverse - KEYBINDING_CYCLE_TILES, // data.b is 0 if forward, 1 if reverse - KEYBINDING_CYCLE_OUTPUT, // data.b is 0 if forward, 1 if reverse + KEYBINDING_CYCLE_VIEWS, // data.b is 0 if forward, 1 if reverse + KEYBINDING_CYCLE_TILES, // data.b is 0 if forward, 1 if reverse + KEYBINDING_CYCLE_OUTPUT, // data.b is 0 if forward, 1 if reverse + KEYBINDING_CONFIGURE_OUTPUT, // data.o_cfg is the desired output + // configuration KEYBINDING_QUIT, KEYBINDING_NOOP, KEYBINDING_SWITCH_WORKSPACE, // data.u is the desired workspace @@ -57,6 +59,7 @@ union keybinding_params { bool b; float color[3]; struct keybinding *kb; + struct cg_output_config *o_cfg; }; struct keybinding { diff --git a/man/cagebreak-config.5.md b/man/cagebreak-config.5.md index c063dc5..969f56d 100644 --- a/man/cagebreak-config.5.md +++ b/man/cagebreak-config.5.md @@ -1,4 +1,4 @@ -% CAGEBREAK-CONFIG(1) Version 1.3.2 | Cagebreak Manual +% CAGEBREAK-CONFIG(1) Version 1.3.3 | Cagebreak Manual # NAME diff --git a/man/cagebreak.1.md b/man/cagebreak.1.md index 3445932..0ae8733 100644 --- a/man/cagebreak.1.md +++ b/man/cagebreak.1.md @@ -1,4 +1,4 @@ -% CAGEBREAK(1) Version 1.3.2 | Cagebreak Manual +% CAGEBREAK(1) Version 1.3.3 | Cagebreak Manual # NAME diff --git a/meson.build b/meson.build index decd4b7..53edb52 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('cagebreak', 'c', - version: '1.3.2', + version: '1.3.3', license: 'MIT', default_options: [ 'c_std=c11', @@ -195,7 +195,7 @@ reproducible_build_versions = { 'wayland_server': '1.18.0', 'wayland_client': '1.18.0', 'wayland_cursor': '1.18.0', - 'wlroots': '0.10.1', + 'wlroots': '0.11.0', 'xkbcommon': '0.10.0', 'fontconfig': '2.13.91', 'pixman': '0.40.0', diff --git a/output.c b/output.c index 4f40050..53f7b25 100644 --- a/output.c +++ b/output.c @@ -261,10 +261,7 @@ scan_out_primary_view(struct cg_output *output) { return false; } - if(!wlr_output_attach_buffer(wlr_output, surface->buffer)) { - return false; - } - + wlr_output_attach_buffer(wlr_output, &surface->buffer->base); return wlr_output_commit(wlr_output); } diff --git a/parse.c b/parse.c index 1cdcd0c..ff1f8c0 100644 --- a/parse.c +++ b/parse.c @@ -261,9 +261,8 @@ parse_float(char **saveptr, const char *delim) { } } -int -parse_output_config(struct wl_list *config_list, char **saveptr, - char **errstr) { +struct cg_output_config * +parse_output_config(char **saveptr, char **errstr) { struct cg_output_config *cfg = malloc(sizeof(struct cg_output_config)); if(cfg == NULL) { *errstr = @@ -340,23 +339,14 @@ parse_output_config(struct wl_list *config_list, char **saveptr, goto error; } -#if CG_HAS_FANALYZE -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wanalyzer-malloc-leak" -#endif cfg->output_name = strdup(name); - wl_list_insert(config_list, &cfg->link); - return 0; -#if CG_HAS_FANALYZE -#pragma GCC diagnostic pop -#endif - + return cfg; error: free(cfg); wlr_log(WLR_ERROR, "Output configuration must be of the form \"output pos " " res x rate "); - return -1; + return NULL; } int @@ -546,7 +536,9 @@ parse_command(struct cg_server *server, struct keybinding *keybinding, return -1; } } else if(strcmp(action, "output") == 0) { - if(parse_output_config(&server->output_config, &saveptr, errstr) != 0) { + keybinding->action = KEYBINDING_CONFIGURE_OUTPUT; + keybinding->data.o_cfg = parse_output_config(&saveptr, errstr); + if(keybinding->data.o_cfg == NULL) { return -1; } } else { diff --git a/signatures/1.3.2.sig b/signatures/1.3.2.sig new file mode 100644 index 0000000000000000000000000000000000000000..dad0846c873b64c224e9a51e140c518f9bc94e62 GIT binary patch literal 566 zcmV-60?GY}0y6{v0SEvc79j+6HLHmt3S1SZD7Rm95KPD1rPrth0$%m;H~5Ofes z$K0jYs5jsc0KwCoS&1ud7*mD${XT28C=hWpRY+Y0#~F~#a9?jv&X>iI!y{A@5T4l| z+^|+4cP^doL>kp_?PuNs*4K|hbk?r)SQHqtgjL({wq8Rg<_| z_>A53%%Yr=>g+#-D!%E=l%USK4Lk7bdKMWIbduEj4(HIgKY&{cL&n4ObzDb$aCwo{xIXtmkH@P|;13sk@Z8wHa2K zD!Yh-Omw^;^ndBZAs=T6_=lkcfoUDkQSA|F)cC6;2`2z@!Z0!WLP#M@tpd~(p6>py z(r#E4emoHS3GkhFJLW3FlBaNe1+gj7)6!0oqTMfrC4sw9I$-NuKGz_j{V_Bt&_$WZ zP_fsPpsL9SujWeFtGsELy*4q01wj}V0mzk^xc6HwZ-1IFm!eR4DT|$hj==}hIW+~x>`#DWsdvhr6N9^9^qjD3VZ+n delta 543 zcmV+)0^t3&1hxc_B7a`>@i+hq2@rG;Ovl`%*Qht(5CFl`oLPx0ZWvRA`Tag?wI~pA zG*w7l1;-hX&2V3DPtKRcki#QX5)hu*AKb83Aa^dE?nD~ZaP4Q_0@l}$LUh)y^jH)a zvV>LL)rdc^_|mrSi~$`mQqy!fhECBX%&bkjIBxm2$%FfCCBPK^~7xgu?{ z2AONx71PZl%ztU_MeM&mSlSH;XnFF&U}8&Jw2ulx_qxDbAsoV2Bx5>eH<=C!zHJ%tA72^BaWQYpZU1zB)$TA78w(ClGOVS=g_!6fLjYg#>4b= zTvJ(nQCCg-ZZ?$RpesV%OMlI0=GC8get_coords(child, &x, &y); - view_damage_child(child, x, y, false); + view_damage_child(child, x + child->view->ox, y + child->view->oy, false); } static void @@ -120,8 +120,7 @@ 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 = -child->view->ox; - *y = -child->view->oy; + *x = *y = 0; if(child->parent && child->parent->get_coords) { int sx, sy; diff --git a/view.h b/view.h index bcb8908..b7cc426 100644 --- a/view.h +++ b/view.h @@ -83,6 +83,8 @@ 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); +void view_activate(struct cg_view *view, bool activate); void view_position(struct cg_view *view); diff --git a/xdg_shell.c b/xdg_shell.c index 7d8ee4f..a6d850c 100644 --- a/xdg_shell.c +++ b/xdg_shell.c @@ -59,6 +59,9 @@ 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); struct cg_xdg_popup *popup = (struct cg_xdg_popup *)child; wl_list_remove(&popup->destroy.link); wl_list_remove(&popup->map.link); @@ -128,8 +131,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 - child->view->ox; - int y_offset = -surface->geometry.y - child->view->oy; + int x_offset = -surface->geometry.x; + int y_offset = -surface->geometry.y; wlr_xdg_popup_get_toplevel_coords( surface->popup, x_offset + surface->popup->geometry.x, diff --git a/xwayland.c b/xwayland.c index f2d6086..9256945 100644 --- a/xwayland.c +++ b/xwayland.c @@ -7,6 +7,7 @@ * See the LICENSE file accompanying this file. */ +#include #include #include #include