From 73fcbbf1428cc9ccb09b1c8341dc78050706df73 Mon Sep 17 00:00:00 2001 From: project-repo Date: Thu, 2 Feb 2023 20:37:42 +0100 Subject: [PATCH 1/3] Change some output from stderr to stdout --- cagebreak.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cagebreak.c b/cagebreak.c index e7edb4a..710e9fa 100644 --- a/cagebreak.c +++ b/cagebreak.c @@ -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"); From 0ee4e286b991bfcb8ac637385bd4c05af578c050 Mon Sep 17 00:00:00 2001 From: project-repo Date: Thu, 2 Feb 2023 21:03:10 +0100 Subject: [PATCH 2/3] Add Bugs.md description for some issues - #37 - two npds --- Bugs.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/Bugs.md b/Bugs.md index c1792c4..527110a 100644 --- a/Bugs.md +++ b/Bugs.md @@ -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. From defaaea9d1f814157d90f2774d87c5d074a51da5 Mon Sep 17 00:00:00 2001 From: project-repo Date: Thu, 2 Feb 2023 21:08:22 +0100 Subject: [PATCH 3/3] Apply clang-format --- keybinding.c | 15 +++++++-------- seat.c | 7 ++++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/keybinding.c b/keybinding.c index 8661db4..e699dfd 100644 --- a/keybinding.c +++ b/keybinding.c @@ -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, diff --git a/seat.c b/seat.c index d2b947c..cd085be 100644 --- a/seat.c +++ b/seat.c @@ -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); } }