mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-23 14:04:19 +02:00
Release 1.8.3
* Adapt cagebreak to wlroots 0.15
This commit is contained in:
parent
a0ef72c6eb
commit
35dbe7cd90
27 changed files with 95 additions and 51 deletions
15
README.md
15
README.md
|
|
@ -204,6 +204,21 @@ For every release after 1.0.5, hashes will be provided.
|
|||
|
||||
For every release after 1.7.0, hashes will be provided for man pages too.
|
||||
|
||||
1.8.3 cagebreak
|
||||
|
||||
* sha 256: 85803b75b1be0d9bf600175ce6aa981a1632768872e5afddea7569f825c1f7c3
|
||||
* sha 512: 96c9b33804bbd7c652e32556d5001e12c2b07ab7127118a050be513bd6e0d6241fb78c80d9cce50447ae32a7b33c5c6a6cf1def36efaf3d8e8ddb028bcd769df
|
||||
|
||||
1.8.3 cagebreak.1
|
||||
|
||||
* sha 256: e583f818d73484cbcae65dbe6ffc226ea58fdad87363213ea5b1059d866216e4
|
||||
* sha 512: b96d8f9308d31bb1faa346267136fd7a53caed95065e7da09713b5f64addb42c835b27cd6cfa6bcf8c5b5d572a73b1e828f47b14e06a00b0871a77a25a286597
|
||||
|
||||
1.8.3 cagebreak-config.5
|
||||
|
||||
* sha 256: d0be008e0e5d47b876ccfb8cf70967097673b81fa93718838db45f4056b76bc0
|
||||
* sha 512: 42f8d25eb89219aebd00e927627a51fd8b7f6fda6f7c6147abbc0e4fae5de1ceb5827b79a814127a0706cc213d7717733e02cfa5275960cb0cce23eb54493b1e
|
||||
|
||||
1.8.2 cagebreak
|
||||
|
||||
* sha 256: f4d275d48ba3d999969f8cb3c8142d27aa8e8d362106ee7575e4b13c02173b2a
|
||||
|
|
|
|||
20
cagebreak.c
20
cagebreak.c
|
|
@ -20,6 +20,7 @@
|
|||
#include <unistd.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/backend.h>
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_cursor.h>
|
||||
|
|
@ -244,7 +245,6 @@ main(int argc, char *argv[]) {
|
|||
struct wl_event_source *sigterm_source = NULL;
|
||||
struct wl_event_source *sigalrm_source = 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;
|
||||
|
|
@ -338,8 +338,20 @@ main(int argc, char *argv[]) {
|
|||
goto end;
|
||||
}
|
||||
|
||||
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 = (float[4]){0, 0, 0, 1};
|
||||
wl_list_init(&server.outputs);
|
||||
|
|
@ -352,7 +364,7 @@ main(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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
#include "seat.h"
|
||||
#include "server.h"
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/util/box.h>
|
||||
|
||||
struct cg_input_manager *
|
||||
input_manager_create(struct cg_server *server);
|
||||
|
|
|
|||
|
|
@ -368,10 +368,10 @@ cg_input_configure_libinput_device(struct cg_input_device *input_device) {
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
cg_input_reset_libinput_device(struct cg_input_device *input_device) {
|
||||
if(!wlr_input_device_is_libinput(input_device->wlr_device)) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
struct libinput_device *device =
|
||||
|
|
@ -416,6 +416,7 @@ cg_input_reset_libinput_device(struct cg_input_device *input_device) {
|
|||
float matrix[6];
|
||||
libinput_device_config_calibration_get_default_matrix(device, matrix);
|
||||
changed |= set_calibration_matrix(device, matrix);
|
||||
return changed;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cagebreak-config(1) "Version 1.8.2" "Cagebreak Manual"
|
||||
cagebreak-config(1) "Version 1.8.3" "Cagebreak Manual"
|
||||
|
||||
# NAME
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
cagebreak(1) "Version 1.8.2" "Cagebreak Manual"
|
||||
cagebreak(1) "Version 1.8.3" "Cagebreak Manual"
|
||||
|
||||
# NAME
|
||||
|
||||
|
|
|
|||
18
meson.build
18
meson.build
|
|
@ -1,5 +1,5 @@
|
|||
project('cagebreak', 'c',
|
||||
version: '1.8.2',
|
||||
version: '1.8.3',
|
||||
license: 'MIT',
|
||||
default_options: [
|
||||
'c_std=c11',
|
||||
|
|
@ -53,7 +53,7 @@ if is_freebsd
|
|||
)
|
||||
endif
|
||||
|
||||
wlroots = dependency('wlroots', version: ['>=0.14.1', '< 0.15.0'])
|
||||
wlroots = dependency('wlroots', version: ['>=0.14.1', '< 0.16.0'])
|
||||
wayland_protos = dependency('wayland-protocols', version: '>=1.14')
|
||||
wayland_server = dependency('wayland-server')
|
||||
wayland_cursor = dependency('wayland-cursor')
|
||||
|
|
@ -204,18 +204,18 @@ cagebreak_dependencies_dict = {
|
|||
reproducible_build_versions = {
|
||||
'server_protos': '-1',
|
||||
'wayland_server': '1.19.0',
|
||||
'wayland_client': '1.19.0',
|
||||
'wayland_cursor': '1.19.0',
|
||||
'wlroots': '0.14.1',
|
||||
'wayland_client': '1.20.0',
|
||||
'wayland_cursor': '1.20.0',
|
||||
'wlroots': '0.15.0',
|
||||
'xkbcommon': '1.3.1',
|
||||
'fontconfig': '2.13.94',
|
||||
'libinput': '1.19.2',
|
||||
'libinput': '1.19.3',
|
||||
'libevdev': '1.12.0',
|
||||
'libudev': '249',
|
||||
'libudev': '250',
|
||||
'pixman': '0.40.0',
|
||||
'pango': '1.50.0',
|
||||
'pango': '1.50.3',
|
||||
'cairo': '1.17.4',
|
||||
'pangocairo': '1.50.0',
|
||||
'pangocairo': '1.50.3',
|
||||
'math': '-1'
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,10 +86,9 @@ create_message_texture(const char *string, const struct cg_output *output) {
|
|||
cairo_surface_flush(surface);
|
||||
unsigned char *data = cairo_image_surface_get_data(surface);
|
||||
int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, width);
|
||||
struct wlr_renderer *renderer =
|
||||
wlr_backend_get_renderer(output->wlr_output->backend);
|
||||
texture = wlr_texture_from_pixels(renderer, DRM_FORMAT_ARGB8888, stride,
|
||||
width, height, data);
|
||||
texture =
|
||||
wlr_texture_from_pixels(output->server->renderer, DRM_FORMAT_ARGB8888,
|
||||
stride, width, height, data);
|
||||
cairo_surface_destroy(surface);
|
||||
g_object_unref(pango);
|
||||
cairo_destroy(cairo);
|
||||
|
|
|
|||
6
output.c
6
output.c
|
|
@ -615,6 +615,12 @@ handle_new_output(struct wl_listener *listener, void *data) {
|
|||
struct cg_server *server = wl_container_of(listener, server, new_output);
|
||||
struct wlr_output *wlr_output = data;
|
||||
|
||||
if(!wlr_output_init_render(wlr_output, server->allocator,
|
||||
server->renderer)) {
|
||||
wlr_log(WLR_ERROR, "Failed to initialize output rendering");
|
||||
return;
|
||||
}
|
||||
|
||||
struct cg_output *output = calloc(1, sizeof(struct cg_output));
|
||||
if(!output) {
|
||||
wlr_log(WLR_ERROR, "Failed to allocate output");
|
||||
|
|
|
|||
2
output.h
2
output.h
|
|
@ -2,7 +2,7 @@
|
|||
#define CG_OUTPUT_H
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/util/box.h>
|
||||
|
||||
struct cg_server;
|
||||
struct cg_view;
|
||||
|
|
|
|||
23
render.c
23
render.c
|
|
@ -12,11 +12,11 @@
|
|||
#include <wayland-server-core.h>
|
||||
#include <wlr/backend.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_box.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>
|
||||
|
||||
|
|
@ -29,8 +29,8 @@
|
|||
#include "workspace.h"
|
||||
|
||||
static void
|
||||
scissor_output(struct wlr_output *output, pixman_box32_t *rect) {
|
||||
struct wlr_renderer *renderer = wlr_backend_get_renderer(output->backend);
|
||||
scissor_output(struct wlr_output *output, pixman_box32_t *rect,
|
||||
struct wlr_renderer *renderer) {
|
||||
|
||||
struct wlr_box box = {
|
||||
.x = rect->x1,
|
||||
|
|
@ -56,10 +56,7 @@ struct render_data {
|
|||
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 =
|
||||
wlr_backend_get_renderer(wlr_output->backend);
|
||||
|
||||
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,
|
||||
|
|
@ -72,7 +69,7 @@ render_texture(struct wlr_output *wlr_output, pixman_region32_t *output_damage,
|
|||
int nrects;
|
||||
pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
|
||||
for(int i = 0; i < nrects; i++) {
|
||||
scissor_output(wlr_output, &rects[i]);
|
||||
scissor_output(wlr_output, &rects[i], renderer);
|
||||
wlr_render_texture_with_matrix(renderer, texture, matrix, 1.0F);
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +106,8 @@ render_surface_iterator(struct cg_output *output, struct wlr_surface *surface,
|
|||
box->height =
|
||||
box->height > data->tile_height ? data->tile_height : box->height;
|
||||
}
|
||||
render_texture(wlr_output, output_damage, texture, box, matrix);
|
||||
render_texture(wlr_output, output_damage, texture, box, matrix,
|
||||
output->server->renderer);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -179,8 +177,7 @@ 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 =
|
||||
wlr_backend_get_renderer(wlr_output->backend);
|
||||
struct wlr_renderer *renderer = output->server->renderer;
|
||||
if(!renderer) {
|
||||
wlr_log(WLR_DEBUG, "Expected the output backend to have a renderer");
|
||||
return;
|
||||
|
|
@ -202,7 +199,7 @@ output_render(struct cg_output *output, pixman_region32_t *damage) {
|
|||
int nrects;
|
||||
pixman_box32_t *rects = pixman_region32_rectangles(damage, &nrects);
|
||||
for(int i = 0; i < nrects; i++) {
|
||||
scissor_output(wlr_output, &rects[i]);
|
||||
scissor_output(wlr_output, &rects[i], renderer);
|
||||
wlr_renderer_clear(renderer, server->bg_color);
|
||||
}
|
||||
|
||||
|
|
@ -238,7 +235,7 @@ output_render(struct cg_output *output, pixman_region32_t *damage) {
|
|||
WL_OUTPUT_TRANSFORM_NORMAL, 0.0F,
|
||||
wlr_output->transform_matrix);
|
||||
render_texture(output->wlr_output, damage, message->message,
|
||||
message->position, matrix);
|
||||
message->position, matrix, renderer);
|
||||
}
|
||||
render_drag_icons(output, damage, &server->seat->drag_icons);
|
||||
|
||||
|
|
|
|||
2
server.c
2
server.c
|
|
@ -12,8 +12,8 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/util/box.h>
|
||||
|
||||
#include "input_manager.h"
|
||||
#include "output.h"
|
||||
|
|
|
|||
2
server.h
2
server.h
|
|
@ -22,6 +22,8 @@ struct cg_server {
|
|||
struct cg_seat *seat;
|
||||
struct cg_input_manager *input;
|
||||
struct wlr_backend *backend;
|
||||
struct wlr_renderer *renderer;
|
||||
struct wlr_allocator *allocator;
|
||||
struct wlr_idle *idle;
|
||||
struct wlr_idle_inhibit_manager_v1 *idle_inhibit_v1;
|
||||
struct wl_listener new_idle_inhibitor_v1;
|
||||
|
|
|
|||
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
util.c
2
util.c
|
|
@ -7,7 +7,7 @@
|
|||
* See the LICENSE file accompanying this file.
|
||||
*/
|
||||
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/util/box.h>
|
||||
|
||||
#include "util.h"
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
10
view.c
10
view.c
|
|
@ -12,11 +12,11 @@
|
|||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_compositor.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 "output.h"
|
||||
#include "seat.h"
|
||||
|
|
@ -311,13 +311,13 @@ view_map(struct cg_view *view, struct wlr_surface *surface,
|
|||
view->wlr_surface = surface;
|
||||
|
||||
struct wlr_subsurface *subsurface;
|
||||
wl_list_for_each(subsurface, &view->wlr_surface->subsurfaces_above,
|
||||
parent_link) {
|
||||
wl_list_for_each(subsurface, &view->wlr_surface->current.subsurfaces_above,
|
||||
current.link) {
|
||||
subsurface_create(NULL, view, subsurface);
|
||||
}
|
||||
|
||||
wl_list_for_each(subsurface, &view->wlr_surface->subsurfaces_below,
|
||||
parent_link) {
|
||||
wl_list_for_each(subsurface, &view->wlr_surface->current.subsurfaces_below,
|
||||
current.link) {
|
||||
subsurface_create(NULL, view, subsurface);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef CG_WORKSPACE_H
|
||||
#define CG_WORKSPACE_H
|
||||
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/util/box.h>
|
||||
|
||||
struct cg_output;
|
||||
struct cg_server;
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_xdg_decoration_v1.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/util/box.h>
|
||||
#include <wlr/util/edges.h>
|
||||
#include <wlr/util/log.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
#include <X11/Xutil.h>
|
||||
#include <stdbool.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/types/wlr_box.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>
|
||||
#include <wlr/xwayland.h>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue