Release 1.3.3

- Fix Issue 11
- Fix Issue 12
This commit is contained in:
Cagebreak Signing Key 3 2020-07-21 15:43:47 +02:00
commit c20e63b349
15 changed files with 78 additions and 35 deletions

25
Bugs.md
View file

@ -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

View file

@ -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

View file

@ -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 "

View file

@ -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 {

View file

@ -1,4 +1,4 @@
% CAGEBREAK-CONFIG(1) Version 1.3.2 | Cagebreak Manual
% CAGEBREAK-CONFIG(1) Version 1.3.3 | Cagebreak Manual
# NAME

View file

@ -1,4 +1,4 @@
% CAGEBREAK(1) Version 1.3.2 | Cagebreak Manual
% CAGEBREAK(1) Version 1.3.3 | Cagebreak Manual
# NAME

View file

@ -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',

View file

@ -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);
}

22
parse.c
View file

@ -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 <name> pos <x> "
"<y> res <width>x<height> rate <refresh_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 {

BIN
signatures/1.3.2.sig Normal file

Binary file not shown.

Binary file not shown.

5
view.c
View file

@ -56,7 +56,7 @@ 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, 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;

2
view.h
View file

@ -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);

View file

@ -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,

View file

@ -7,6 +7,7 @@
* See the LICENSE file accompanying this file.
*/
#include <X11/Xutil.h>
#include <stdbool.h>
#include <stdlib.h>
#include <wayland-server-core.h>