Move over tinywm as the base boilerplate
This commit is contained in:
parent
f0c40d02fd
commit
27ecafc2a2
|
@ -23,7 +23,7 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: clang-format
|
- id: clang-format
|
||||||
- id: cppcheck
|
- id: cppcheck
|
||||||
args: ['--project=compile_commands.json']
|
args: ['--project=compile_commands.json', '--std=c99', '--inline-suppr']
|
||||||
- repo: https://github.com/detailyang/pre-commit-shell
|
- repo: https://github.com/detailyang/pre-commit-shell
|
||||||
rev: 1.0.5
|
rev: 1.0.5
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include <wlr/render/wlr_renderer.h>
|
#include <wlr/render/wlr_renderer.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
/* cppcheck-suppress constParameter */
|
||||||
focus_view (struct feynman_view *view, struct wlr_surface *surface)
|
focus_view (struct feynman_view *view, struct wlr_surface *surface)
|
||||||
{
|
{
|
||||||
/* Note: this function only deals with keyboard focus. */
|
/* 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;
|
node = node->parent;
|
||||||
}
|
}
|
||||||
// cppcheck-suppress nullPointerRedundantCheck
|
/* cppcheck-suppress nullPointerRedundantCheck */
|
||||||
return node->data;
|
return node->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -853,7 +854,7 @@ start_feynman (emacs_env *env, struct feynman_server *server)
|
||||||
wl_list_init (&server->keyboards);
|
wl_list_init (&server->keyboards);
|
||||||
server->new_input.notify = server_new_input;
|
server->new_input.notify = server_new_input;
|
||||||
wl_signal_add (&server->backend->events.new_input, &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;
|
server->request_cursor.notify = seat_request_cursor;
|
||||||
wl_signal_add (&server->seat->events.request_set_cursor,
|
wl_signal_add (&server->seat->events.request_set_cursor,
|
||||||
&server->request_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
|
* compositor. Starting the backend rigged up all of the necessary event
|
||||||
* loop configuration to listen to libinput events, DRM events, generate
|
* loop configuration to listen to libinput events, DRM events, generate
|
||||||
* frame events at the refresh rate, and so on. */
|
* frame events at the refresh rate, and so on. */
|
||||||
em_message (env, "Running Wayland compositor on WAYLAND_DISPLAY=%s",
|
em_message (env, "Running Wayland compositor on WAYLAND_DISPLAY=%s", socket);
|
||||||
socket);
|
|
||||||
wlr_log (WLR_INFO, "Running Wayland compositor on WAYLAND_DISPLAY=%s",
|
wlr_log (WLR_INFO, "Running Wayland compositor on WAYLAND_DISPLAY=%s",
|
||||||
socket);
|
socket);
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
/* Declare mandatory GPL symbol. */
|
/* Declare mandatory GPL symbol. */
|
||||||
FEYNMAN_EXPORT int plugin_is_GPL_compatible = 0;
|
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
|
// This value will hold a global reference to a `feynman_server` struct
|
||||||
emacs_value server_state;
|
emacs_value server_state;
|
||||||
|
@ -53,14 +53,16 @@ feynman_start (emacs_env *env, ptrdiff_t nargs, emacs_value args[], void *data)
|
||||||
(void)nargs;
|
(void)nargs;
|
||||||
(void)args;
|
(void)args;
|
||||||
(void)data;
|
(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));
|
struct feynman_server *server = malloc (sizeof (struct feynman_server));
|
||||||
int err = start_feynman(env, server);
|
int err = start_feynman (env, server);
|
||||||
if (err != 0) {
|
if (err != 0)
|
||||||
em_error(env, "Start process failed.Received none zero error code: %d", err);
|
{
|
||||||
return nil;
|
em_error (env, "Start process failed.Received none zero error code: %d",
|
||||||
}
|
err);
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
// feynman_events_q = (queue_t *)init_queue(100);
|
// feynman_events_q = (queue_t *)init_queue(100);
|
||||||
|
|
||||||
/* pthread_create (&server->server_thread_id, NULL, start_event_loop, */
|
/* 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
|
static emacs_value
|
||||||
|
/* cppcheck-suppress constParameter */
|
||||||
feynman_stop (emacs_env *env, ptrdiff_t nargs, emacs_value args[], void *data)
|
feynman_stop (emacs_env *env, ptrdiff_t nargs, emacs_value args[], void *data)
|
||||||
{
|
{
|
||||||
(void)nargs;
|
(void)nargs;
|
||||||
|
|
Loading…
Reference in New Issue