Move over tinywm as the base boilerplate

This commit is contained in:
Sameer Rahmani 2022-08-21 12:56:39 +01:00
parent f0c40d02fd
commit 27ecafc2a2
3 changed files with 15 additions and 12 deletions

View File

@ -23,7 +23,7 @@ repos:
hooks:
- id: clang-format
- id: cppcheck
args: ['--project=compile_commands.json']
args: ['--project=compile_commands.json', '--std=c99', '--inline-suppr']
- repo: https://github.com/detailyang/pre-commit-shell
rev: 1.0.5
hooks:

View File

@ -27,6 +27,7 @@
#include <wlr/render/wlr_renderer.h>
static void
/* cppcheck-suppress constParameter */
focus_view (struct feynman_view *view, struct wlr_surface *surface)
{
/* Note: this function only deals with keyboard focus. */
@ -288,7 +289,7 @@ desktop_view_at (struct feynman_server *server, double lx, double ly,
{
node = node->parent;
}
// cppcheck-suppress nullPointerRedundantCheck
/* cppcheck-suppress nullPointerRedundantCheck */
return node->data;
}
@ -853,7 +854,7 @@ start_feynman (emacs_env *env, struct feynman_server *server)
wl_list_init (&server->keyboards);
server->new_input.notify = server_new_input;
wl_signal_add (&server->backend->events.new_input, &server->new_input);
server->seat = wlr_seat_create (server->wl_display, "seat0");
server->seat = wlr_seat_create (server->wl_display, "seat0");
server->request_cursor.notify = seat_request_cursor;
wl_signal_add (&server->seat->events.request_set_cursor,
&server->request_cursor);
@ -887,8 +888,7 @@ start_feynman (emacs_env *env, struct feynman_server *server)
* compositor. Starting the backend rigged up all of the necessary event
* loop configuration to listen to libinput events, DRM events, generate
* frame events at the refresh rate, and so on. */
em_message (env, "Running Wayland compositor on WAYLAND_DISPLAY=%s",
socket);
em_message (env, "Running Wayland compositor on WAYLAND_DISPLAY=%s", socket);
wlr_log (WLR_INFO, "Running Wayland compositor on WAYLAND_DISPLAY=%s",
socket);

View File

@ -26,7 +26,7 @@
/* Declare mandatory GPL symbol. */
FEYNMAN_EXPORT int plugin_is_GPL_compatible = 0;
//static queue_t *feynman_events_q;
// static queue_t *feynman_events_q;
// This value will hold a global reference to a `feynman_server` struct
emacs_value server_state;
@ -53,14 +53,16 @@ feynman_start (emacs_env *env, ptrdiff_t nargs, emacs_value args[], void *data)
(void)nargs;
(void)args;
(void)data;
emacs_value nil = env->intern (env, "nil");
emacs_value nil = env->intern (env, "nil");
struct feynman_server *server = malloc (sizeof (struct feynman_server));
int err = start_feynman(env, server);
if (err != 0) {
em_error(env, "Start process failed.Received none zero error code: %d", err);
return nil;
}
int err = start_feynman (env, server);
if (err != 0)
{
em_error (env, "Start process failed.Received none zero error code: %d",
err);
return nil;
}
// feynman_events_q = (queue_t *)init_queue(100);
/* pthread_create (&server->server_thread_id, NULL, start_event_loop, */
@ -72,6 +74,7 @@ feynman_start (emacs_env *env, ptrdiff_t nargs, emacs_value args[], void *data)
}
static emacs_value
/* cppcheck-suppress constParameter */
feynman_stop (emacs_env *env, ptrdiff_t nargs, emacs_value args[], void *data)
{
(void)nargs;