Merge branch 'development' of https://github.com/project-repo/cagebreak into development

This commit is contained in:
project-repo 2023-02-08 19:22:38 +01:00
commit ba590d7d89
4 changed files with 46 additions and 13 deletions

33
Bugs.md
View file

@ -1120,3 +1120,36 @@ Cagebreak was not compatible with clang 15 and POSIX which was causing issues
with building under FreeBSD.
Thanks to Jan Beich for pointing this out and providing a PR.
## Issue 55
* github issue number: N/A
* Fixed: 2.0.2
Prior to release 2.0.2, cagebreak sometimes crased due to a null pointer
derefrence when the cursor was moved.
## Issue 56
* github issue numner: N/A
* Fixed: 2.0.2
Prior to release 2.0.2, the following workflow caused cagebreak to
crash:
* Split an empty workspace.
* Open 2 windows on the left tile.
* exchangeright
* focus left
* cycle views
The reason for this is that the ipc send event did not handle
focussing the background correctly when cycling.
## Issue 57
* github issue number: #39
* Fixed: 2.0.2
maxhbr pointed out that there was a spelling mistake in the
SPDX-License-Identifier.

View file

@ -611,7 +611,7 @@ main(int argc, char *argv[]) {
wlr_log_errno(WLR_ERROR, "Unable to set WAYLAND_DISPLAY.",
"Clients may not be able to connect");
} else {
fprintf(stderr,
fprintf(stdout,
"Cagebreak " CG_VERSION " is running on Wayland display %s\n",
socket);
}
@ -623,7 +623,7 @@ main(int argc, char *argv[]) {
if(show_info) {
char *msg = server_show_info(&server);
if(msg != NULL) {
fprintf(stderr, "%s", msg);
fprintf(stdout, "%s", msg);
free(msg);
} else {
wlr_log(WLR_ERROR, "Failed to get info on cagebreak setup\n");

View file

@ -699,11 +699,12 @@ keybinding_cycle_views(struct cg_server *server, bool reverse, bool ipc) {
seat_set_focus(server->seat, next_view);
if(ipc) {
int curr_id=-1;
int curr_pid=-1;
if(current_view!=NULL && current_view->link.next != curr_workspace->views.next) {
curr_id=current_view->id;
curr_pid=current_view->impl->get_pid(current_view);
int curr_id = -1;
int curr_pid = -1;
if(current_view != NULL &&
current_view->link.next != curr_workspace->views.next) {
curr_id = current_view->id;
curr_pid = current_view->impl->get_pid(current_view);
}
ipc_send_event(
curr_workspace->output->server,
@ -711,9 +712,7 @@ keybinding_cycle_views(struct cg_server *server, bool reverse, bool ipc) {
"pid\":%d,"
"\"new_view_id\":%d,\"new_view_pid\":%d,\"tile_id\":%d,"
"\"workspace\":%d,\"output\":\"%s\",\"output_id\":%d}",
curr_id,
curr_pid,
next_view == NULL ? -1 : (int)next_view->id,
curr_id, curr_pid, next_view == NULL ? -1 : (int)next_view->id,
next_view == NULL ? -1 : (int)next_view->impl->get_pid(next_view),
next_view->tile->id, curr_workspace->num + 1,
curr_workspace->output->wlr_output->name,

7
seat.c
View file

@ -214,8 +214,9 @@ handle_command_key_bindings(struct cg_server *server, xkb_keysym_t sym,
wlr_scene_buffer_from_node(node));
if(scene_surface != NULL) {
surface = scene_surface->surface;
if(surface!=NULL) {
wlr_seat_pointer_notify_enter(wlr_seat, surface, sx, sy);
if(surface != NULL) {
wlr_seat_pointer_notify_enter(wlr_seat, surface, sx,
sy);
}
}
}
@ -703,7 +704,7 @@ process_cursor_motion(struct cg_seat *seat, uint32_t time) {
wlr_scene_surface_from_buffer(wlr_scene_buffer_from_node(node));
if(scene_surface != NULL) {
surface = scene_surface->surface;
if(surface!=NULL) {
if(surface != NULL) {
wlr_seat_pointer_notify_enter(wlr_seat, surface, sx, sy);
}
}