mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-22 05:24:22 +02:00
Merge branch 'master' into development
This commit is contained in:
commit
23ad14f44d
24 changed files with 398 additions and 7 deletions
33
Bugs.md
33
Bugs.md
|
|
@ -619,3 +619,36 @@ xwayland-devel-21.0.99.1.171
|
|||
wlroots-0.15.1
|
||||
```
|
||||
```
|
||||
|
||||
## Issue 34
|
||||
|
||||
* github issue number: N/A
|
||||
* Fixed: 1.9.0
|
||||
|
||||
Cagebreak crashed when a touch device was removed due to a call to
|
||||
`wl_list_remove` on a pointer which was never initialized.
|
||||
|
||||
## Issue 35
|
||||
|
||||
* github issue number: N/A
|
||||
* Fixed: 1.9.1
|
||||
|
||||
Cagebreak 1.9.0 broke the nextscreen and prevscreen functionality.
|
||||
This issue was not present in earlier releases.
|
||||
|
||||
## Issue 36
|
||||
|
||||
* github issue number: N/A
|
||||
* Fixed: 1.9.1
|
||||
|
||||
Cagebreak 1.9.0 broke the configure_message functionality.
|
||||
This issue was not present in earlier releases.
|
||||
|
||||
## Issue 37
|
||||
|
||||
* github issue number: N/A
|
||||
* Fixed: 1.9.1
|
||||
|
||||
Cagebreak 1.9.0 broke the screen/movetoscreen functionality.
|
||||
This issue was not present in earlier releases.
|
||||
|
||||
|
|
|
|||
27
Changelog.md
27
Changelog.md
|
|
@ -38,4 +38,29 @@ Adds libinput configuration and virtual keyboard and pointer support.
|
|||
|
||||
## Release 1.9.0
|
||||
|
||||
Adds TODO see release.delete
|
||||
- Add message functionality (as per Issue 29 in Bugs.md)
|
||||
- message <text>
|
||||
- configure_message
|
||||
- Add (as per Issue 30 in Bugs.md)
|
||||
- movetoprevscreen
|
||||
- movetoscreen <n>
|
||||
- screen <n>
|
||||
- additional output functionality for monitor numbering
|
||||
- Improve configuration documentation
|
||||
- Fix Issue 31 in Bugs.md (word omission)
|
||||
- Improve README.md and split off some files
|
||||
- Add SECURITY.md
|
||||
- Add Hashes.md (hashes of cagebreak binaries and man pages if built reproducably)
|
||||
- Add Changelog.md (changelog for major and minor releases but not patches)
|
||||
- Add FAQ.md (updated information from the former wiki)
|
||||
- Depreciate wiki
|
||||
- Fix Issue 32 in Bugs.md
|
||||
- Improve release checklist to partially prevent the above issue
|
||||
in the future
|
||||
- Fix Issue 33 in Bugs.md
|
||||
- Fix Issue 34 in Bugs.md
|
||||
- Manage gpg keys
|
||||
- Add new cagebreak gpg signing keys
|
||||
- Add new cagebreak email contact gpg key
|
||||
- Add new project-repo AUR gpg key (relevant for cagebreak-pkgbuild)
|
||||
|
||||
|
|
|
|||
30
Hashes.md
30
Hashes.md
|
|
@ -1,5 +1,35 @@
|
|||
# Hashes
|
||||
|
||||
1.9.1 cagebreak
|
||||
|
||||
* sha 256: 262c67170eb2a39174d40f97d940707029dca0b2b613b514a1cca29152a12665
|
||||
* sha 512: bbd962eaf90441338a67215fc7ac0a717b8cb7bd93ce7ef7ed446aa1df9f4e44026994cc1172e6245e5cd4b9c588150ed9c894941069c5c132c9e2009523c241
|
||||
|
||||
1.9.1 cagebreak.1
|
||||
|
||||
* sha 256: f9c1ee94c0788b98f1e8d93433a0e39d4265ed5c8107e964648da11c60c995ed
|
||||
* sha 512: 1d39748c42a56852ce21aa5ea872160da0810d0539901f6c307b141d4c2545c52a7de98d924e4e45827dafa8cb76b483abf5e02403e6536f69d2144575d3dfdb
|
||||
|
||||
1.9.1 cagebreak-config.5
|
||||
|
||||
* sha 256: 2b0d5655e01942cb5130a95c7209e32c1ce3f44411f2a3294a160d6a2232bef4
|
||||
* sha 512: c13a92e091e56aad099c12c4bf652943bf43dad5aace61677af992331a2700d3d2f433cd2a674cbc2cc080e971169516973835c44416de555a85b5aae9da9a9d
|
||||
|
||||
1.9.0 cagebreak
|
||||
|
||||
* sha 256: 91096b4c558970666c5ef1ebd5c16301fbb40b52b34a73589f18a14c48edf5c1
|
||||
* sha 512: 52ec9c6996377d01d35df87ea5480a33c93cd7c62645f54523f3808fa9f84578f3a6201e969c6bdb5987e69b667be7edc8ce7067091c8413193c5e33cb434883
|
||||
|
||||
1.9.0 cagebreak.1
|
||||
|
||||
* sha 256: 431909f4c62157e57e789359a8458fc650b5f266b2fccc6fc5c0e501f8c879d3
|
||||
* sha 512: f7523288ef3ca406507ee996e189fd339623fa465585973ac769cbea7948399545e8886fe585c7ddd70ca89465c81a188137dcea5b7273353966ea882d9806bd
|
||||
|
||||
1.9.0 cagebreak-config.5
|
||||
|
||||
* sha 256: 4433d8a160e48834fefb4cdd54fcec1f6038e21801c7a1dffb041b5eb238a2cc
|
||||
* sha 512: af44aa42fe05b50a773420000c383fac837e45ead248876bb617c53e44e36d09a88ae26df80c1c9ffd6cf7c4dac72acb02d369888a79fed35114ed7e88fbe159
|
||||
|
||||
1.8.2 cagebreak
|
||||
|
||||
* sha 256: f4d275d48ba3d999969f8cb3c8142d27aa8e8d362106ee7575e4b13c02173b2a
|
||||
|
|
|
|||
|
|
@ -231,7 +231,6 @@ For every release after 1.7.0, hashes will be provided for man pages too.
|
|||
|
||||
See [Hashes.md](Hashes.md)
|
||||
|
||||
|
||||
#### GPG Signatures
|
||||
|
||||
For every release after 1.0.5, a GPG signature will be provided in `signatures`.
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include <wlr/backend.h>
|
||||
#include <wlr/backend/headless.h>
|
||||
#include <wlr/backend/multi.h>
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_cursor.h>
|
||||
|
|
@ -127,7 +128,6 @@ int
|
|||
LLVMFuzzerInitialize(int *argc, char ***argv) {
|
||||
struct wl_event_loop *event_loop = NULL;
|
||||
struct wlr_backend *backend = NULL;
|
||||
struct wlr_renderer *renderer = NULL;
|
||||
struct wlr_compositor *compositor = NULL;
|
||||
struct wlr_data_device_manager *data_device_manager = NULL;
|
||||
struct wlr_server_decoration_manager *server_decoration_manager = NULL;
|
||||
|
|
@ -215,8 +215,20 @@ LLVMFuzzerInitialize(int *argc, char ***argv) {
|
|||
|
||||
wl_list_init(&server.output_config);
|
||||
|
||||
renderer = wlr_backend_get_renderer(backend);
|
||||
wlr_renderer_init_wl_display(renderer, server.wl_display);
|
||||
server.renderer = wlr_renderer_autocreate(backend);
|
||||
if(!server.renderer) {
|
||||
wlr_log(WLR_ERROR, "Unable to create the wlroots renderer");
|
||||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
server.allocator =
|
||||
wlr_allocator_autocreate(server.backend, server.renderer);
|
||||
if(!server.allocator) {
|
||||
wlr_log(WLR_ERROR, "Unable to create the wlroots allocator");
|
||||
ret = 1;
|
||||
goto end;
|
||||
}
|
||||
wlr_renderer_init_wl_display(server.renderer, server.wl_display);
|
||||
|
||||
server.bg_color = malloc(4 * sizeof(float));
|
||||
server.bg_color[0] = 0;
|
||||
|
|
@ -343,7 +355,7 @@ LLVMFuzzerInitialize(int *argc, char ***argv) {
|
|||
goto end;
|
||||
}
|
||||
|
||||
compositor = wlr_compositor_create(server.wl_display, renderer);
|
||||
compositor = wlr_compositor_create(server.wl_display, server.renderer);
|
||||
if(!compositor) {
|
||||
wlr_log(WLR_ERROR, "Unable to create the wlroots compositor");
|
||||
ret = 1;
|
||||
|
|
|
|||
2
input.h
2
input.h
|
|
@ -13,7 +13,7 @@ cg_input_configure_libinput_device(struct cg_input_device *device);
|
|||
void
|
||||
cg_input_apply_config(struct cg_input_config *config, struct cg_server *server);
|
||||
|
||||
void
|
||||
bool
|
||||
cg_input_reset_libinput_device(struct cg_input_device *device);
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -375,6 +375,14 @@ is used.
|
|||
|
||||
See GitHub Issues: <https://github.com/project-repo/cagebreak/issues>
|
||||
|
||||
Mail contact: `cagebreak @ project-repo . co`
|
||||
|
||||
GPG Fingerprints:
|
||||
|
||||
- B15B92642760E11FE002DE168708D42451A94AB5
|
||||
- F8DD9F8DD12B85A28F5827C4678E34D2E753AA3C
|
||||
- 3ACEA46CCECD59E4C8222F791CBEB493681E8693
|
||||
|
||||
# LICENSE
|
||||
|
||||
Copyright (c) 2020-2022 The Cagebreak authors
|
||||
|
|
|
|||
|
|
@ -74,6 +74,14 @@ are displayed in a message box at the top right of the screen.
|
|||
|
||||
See GitHub Issues: <https://github.com/project-repo/cagebreak/issues>
|
||||
|
||||
Mail contact: `cagebreak @ project-repo . co`
|
||||
|
||||
GPG Fingerprints:
|
||||
|
||||
- B15B92642760E11FE002DE168708D42451A94AB5
|
||||
- F8DD9F8DD12B85A28F5827C4678E34D2E753AA3C
|
||||
- 3ACEA46CCECD59E4C8222F791CBEB493681E8693
|
||||
|
||||
# LICENSE
|
||||
|
||||
Copyright (c) 2020-2022 The Cagebreak authors
|
||||
|
|
|
|||
1
parse.c
1
parse.c
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "input_manager.h"
|
||||
#include "keybinding.h"
|
||||
#include "message.h"
|
||||
#include "output.h"
|
||||
#include "parse.h"
|
||||
#include "server.h"
|
||||
|
|
|
|||
274
render.c
Normal file
274
render.c
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
/*
|
||||
* Cagebreak: A Wayland tiling compositor.
|
||||
*
|
||||
* Copyright (C) 2020-2022 The Cagebreak Authors
|
||||
* Copyright (C) 2018-2020 Jente Hidskes
|
||||
* Copyright (C) 2019 The Sway authors
|
||||
*
|
||||
* See the LICENSE file accompanying this file.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/backend.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_matrix.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_output_damage.h>
|
||||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/region.h>
|
||||
|
||||
#include "message.h"
|
||||
#include "output.h"
|
||||
#include "seat.h"
|
||||
#include "server.h"
|
||||
#include "util.h"
|
||||
#include "view.h"
|
||||
#include "workspace.h"
|
||||
|
||||
static void
|
||||
scissor_output(struct wlr_output *output, pixman_box32_t *rect,
|
||||
struct wlr_renderer *renderer) {
|
||||
|
||||
struct wlr_box box = {
|
||||
.x = rect->x1,
|
||||
.y = rect->y1,
|
||||
.width = rect->x2 - rect->x1,
|
||||
.height = rect->y2 - rect->y1,
|
||||
};
|
||||
|
||||
int output_width, output_height;
|
||||
wlr_output_transformed_resolution(output, &output_width, &output_height);
|
||||
enum wl_output_transform transform =
|
||||
wlr_output_transform_invert(output->transform);
|
||||
wlr_box_transform(&box, &box, transform, output_width, output_height);
|
||||
|
||||
wlr_renderer_scissor(renderer, &box);
|
||||
}
|
||||
|
||||
struct render_data {
|
||||
pixman_region32_t *damage;
|
||||
int tile_width, tile_height;
|
||||
};
|
||||
|
||||
static void
|
||||
render_texture(struct wlr_output *wlr_output, pixman_region32_t *output_damage,
|
||||
struct wlr_texture *texture, const struct wlr_box *box,
|
||||
const float matrix[static 9], struct wlr_renderer *renderer) {
|
||||
pixman_region32_t damage;
|
||||
pixman_region32_init(&damage);
|
||||
pixman_region32_union_rect(&damage, &damage, box->x, box->y, box->width,
|
||||
box->height);
|
||||
pixman_region32_intersect(&damage, &damage, output_damage);
|
||||
if(!pixman_region32_not_empty(&damage)) {
|
||||
goto damage_finish;
|
||||
}
|
||||
|
||||
int nrects;
|
||||
pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
|
||||
for(int i = 0; i < nrects; i++) {
|
||||
scissor_output(wlr_output, &rects[i], renderer);
|
||||
wlr_render_texture_with_matrix(renderer, texture, matrix, 1.0F);
|
||||
}
|
||||
|
||||
damage_finish:
|
||||
pixman_region32_fini(&damage);
|
||||
}
|
||||
|
||||
static void
|
||||
render_surface_iterator(struct cg_output *output, struct wlr_surface *surface,
|
||||
struct wlr_box *box, void *user_data) {
|
||||
struct render_data *data = user_data;
|
||||
struct wlr_output *wlr_output = output->wlr_output;
|
||||
pixman_region32_t *output_damage = data->damage;
|
||||
|
||||
struct wlr_texture *texture = wlr_surface_get_texture(surface);
|
||||
if(!texture) {
|
||||
wlr_log(WLR_DEBUG, "Cannot obtain surface texture");
|
||||
return;
|
||||
}
|
||||
|
||||
scale_box(box, wlr_output->scale);
|
||||
|
||||
float matrix[9];
|
||||
enum wl_output_transform transform =
|
||||
wlr_output_transform_invert(surface->current.transform);
|
||||
wlr_matrix_project_box(matrix, box, transform, 0.0F,
|
||||
wlr_output->transform_matrix);
|
||||
|
||||
if(data->tile_width != 0) {
|
||||
box->width =
|
||||
box->width > data->tile_width ? data->tile_width : box->width;
|
||||
}
|
||||
if(data->tile_height != 0) {
|
||||
box->height =
|
||||
box->height > data->tile_height ? data->tile_height : box->height;
|
||||
}
|
||||
render_texture(wlr_output, output_damage, texture, box, matrix,
|
||||
output->server->renderer);
|
||||
}
|
||||
|
||||
static void
|
||||
render_drag_icons(struct cg_output *output, pixman_region32_t *damage,
|
||||
struct wl_list *drag_icons) {
|
||||
struct render_data data = {
|
||||
.damage = damage,
|
||||
.tile_width = 0,
|
||||
.tile_height = 0,
|
||||
};
|
||||
output_drag_icons_for_each_surface(output, drag_icons,
|
||||
render_surface_iterator, &data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render all toplevels without descending into popups.
|
||||
*/
|
||||
static void
|
||||
render_view_toplevels(struct cg_view *view, struct cg_output *output,
|
||||
pixman_region32_t *damage) {
|
||||
struct render_data data = {
|
||||
.damage = damage,
|
||||
.tile_width = 0,
|
||||
.tile_height = 0,
|
||||
};
|
||||
struct cg_tile *view_tile = view_get_tile(view);
|
||||
if(view_tile != NULL) {
|
||||
if(view_tile->tile.width != view->wlr_surface->current.width ||
|
||||
view_tile->tile.height != view->wlr_surface->current.height) {
|
||||
view_damage_whole(view);
|
||||
}
|
||||
data.tile_width = view_tile->tile.width;
|
||||
data.tile_height = view_tile->tile.height;
|
||||
}
|
||||
|
||||
double ox, oy;
|
||||
ox = view->ox;
|
||||
oy = view->oy;
|
||||
output_surface_for_each_surface(output, view->wlr_surface, ox, oy,
|
||||
render_surface_iterator, &data);
|
||||
}
|
||||
|
||||
static void
|
||||
render_popup_iterator(struct cg_output *output, struct wlr_surface *surface,
|
||||
struct wlr_box *box, void *data) {
|
||||
/* Render this popup's surface. */
|
||||
render_surface_iterator(output, surface, box, data);
|
||||
|
||||
/* Render this popup's child toplevels. */
|
||||
output_surface_for_each_surface(output, surface, box->x, box->y,
|
||||
render_surface_iterator, data);
|
||||
}
|
||||
|
||||
static void
|
||||
render_view_popups(struct cg_view *view, struct cg_output *output,
|
||||
pixman_region32_t *damage) {
|
||||
struct render_data data = {
|
||||
.damage = damage,
|
||||
.tile_width = 0,
|
||||
.tile_height = 0,
|
||||
};
|
||||
output_view_for_each_popup(output, view, render_popup_iterator, &data);
|
||||
}
|
||||
|
||||
void
|
||||
output_render(struct cg_output *output, pixman_region32_t *damage) {
|
||||
struct cg_server *server = output->server;
|
||||
struct wlr_output *wlr_output = output->wlr_output;
|
||||
|
||||
struct wlr_renderer *renderer = output->server->renderer;
|
||||
if(!renderer) {
|
||||
wlr_log(WLR_DEBUG, "Expected the output backend to have a renderer");
|
||||
return;
|
||||
}
|
||||
|
||||
wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height);
|
||||
|
||||
if(!pixman_region32_not_empty(damage)) {
|
||||
wlr_log(WLR_DEBUG, "Output isn't damaged but needs a buffer swap");
|
||||
goto renderer_end;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if(server->debug_damage_tracking) {
|
||||
wlr_renderer_clear(renderer, (float[]){1.0F, 0.0F, 0.0F, 1.0F});
|
||||
}
|
||||
#endif
|
||||
|
||||
int nrects;
|
||||
pixman_box32_t *rects = pixman_region32_rectangles(damage, &nrects);
|
||||
for(int i = 0; i < nrects; i++) {
|
||||
scissor_output(wlr_output, &rects[i], renderer);
|
||||
wlr_renderer_clear(renderer, server->bg_color);
|
||||
}
|
||||
|
||||
bool first = true;
|
||||
for(struct cg_tile *tile =
|
||||
output->workspaces[output->curr_workspace]->focused_tile;
|
||||
first ||
|
||||
tile != output->workspaces[output->curr_workspace]->focused_tile;
|
||||
tile = tile->next) {
|
||||
first = false;
|
||||
/* Only render visible views */
|
||||
if(tile->view != NULL) {
|
||||
render_view_toplevels(tile->view, output, damage);
|
||||
}
|
||||
}
|
||||
|
||||
struct cg_view *view;
|
||||
wl_list_for_each_reverse(
|
||||
view, &output->workspaces[output->curr_workspace]->unmanaged_views,
|
||||
link) {
|
||||
render_view_toplevels(view, output, damage);
|
||||
}
|
||||
|
||||
struct cg_view *focused_view = seat_get_focus(server->seat);
|
||||
if(focused_view != NULL) {
|
||||
render_view_popups(focused_view, output, damage);
|
||||
}
|
||||
|
||||
struct cg_message *message;
|
||||
wl_list_for_each_reverse(message, &output->messages, link) {
|
||||
float matrix[9];
|
||||
wlr_matrix_project_box(matrix, message->position,
|
||||
WL_OUTPUT_TRANSFORM_NORMAL, 0.0F,
|
||||
wlr_output->transform_matrix);
|
||||
render_texture(output->wlr_output, damage, message->message,
|
||||
message->position, matrix, renderer);
|
||||
}
|
||||
render_drag_icons(output, damage, &server->seat->drag_icons);
|
||||
|
||||
renderer_end:
|
||||
/* Draw software cursor in case hardware cursors aren't
|
||||
available. This is a no-op when they are. */
|
||||
wlr_output_render_software_cursors(wlr_output, damage);
|
||||
wlr_renderer_scissor(renderer, NULL);
|
||||
wlr_renderer_end(renderer);
|
||||
|
||||
int output_width, output_height;
|
||||
wlr_output_transformed_resolution(wlr_output, &output_width,
|
||||
&output_height);
|
||||
|
||||
pixman_region32_t frame_damage;
|
||||
pixman_region32_init(&frame_damage);
|
||||
|
||||
enum wl_output_transform transform =
|
||||
wlr_output_transform_invert(wlr_output->transform);
|
||||
wlr_region_transform(&frame_damage, &output->damage->current, transform,
|
||||
output_width, output_height);
|
||||
|
||||
#ifdef DEBUG
|
||||
if(server->debug_damage_tracking) {
|
||||
pixman_region32_union_rect(&frame_damage, &frame_damage, 0, 0,
|
||||
output_width, output_height);
|
||||
}
|
||||
#endif
|
||||
|
||||
wlr_output_set_damage(wlr_output, &frame_damage);
|
||||
pixman_region32_fini(&frame_damage);
|
||||
|
||||
if(!wlr_output_commit(wlr_output)) {
|
||||
wlr_log(WLR_ERROR, "Could not commit output");
|
||||
}
|
||||
}
|
||||
BIN
signatures/1.8.1.sig
Normal file
BIN
signatures/1.8.1.sig
Normal file
Binary file not shown.
BIN
signatures/1.8.2-cagebreak-config.5.sig
Normal file
BIN
signatures/1.8.2-cagebreak-config.5.sig
Normal file
Binary file not shown.
BIN
signatures/1.8.2-cagebreak.1.sig
Normal file
BIN
signatures/1.8.2-cagebreak.1.sig
Normal file
Binary file not shown.
Binary file not shown.
BIN
signatures/1.8.3-cagebreak-config.5.sig
Normal file
BIN
signatures/1.8.3-cagebreak-config.5.sig
Normal file
Binary file not shown.
BIN
signatures/1.8.3-cagebreak.1.sig
Normal file
BIN
signatures/1.8.3-cagebreak.1.sig
Normal file
Binary file not shown.
BIN
signatures/1.8.3.sig
Normal file
BIN
signatures/1.8.3.sig
Normal file
Binary file not shown.
BIN
signatures/1.9.0-cagebreak-config.5.sig
Normal file
BIN
signatures/1.9.0-cagebreak-config.5.sig
Normal file
Binary file not shown.
BIN
signatures/1.9.0-cagebreak.1.sig
Normal file
BIN
signatures/1.9.0-cagebreak.1.sig
Normal file
Binary file not shown.
BIN
signatures/1.9.0.sig
Normal file
BIN
signatures/1.9.0.sig
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -13,6 +13,7 @@
|
|||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_output_damage.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <wlr/util/log.h>
|
||||
#if CG_HAS_XWAYLAND
|
||||
#include <wlr/xwayland.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue