diff options
-rw-r--r-- | harness/include/wl.h | 22 | ||||
-rw-r--r-- | harness/src/main.c | 77 | ||||
-rw-r--r-- | harness/src/plugin.c | 3 | ||||
-rw-r--r-- | harness/src/wl.c | 110 |
4 files changed, 68 insertions, 144 deletions
diff --git a/harness/include/wl.h b/harness/include/wl.h index 2d4f763..dc7fe9f 100644 --- a/harness/include/wl.h +++ b/harness/include/wl.h @@ -28,13 +28,13 @@ #include <plugin.h> /* For brevity's sake, struct members are annotated where they are used. */ -enum tinywl_cursor_mode { +enum montis_cursor_mode { TINYWL_CURSOR_PASSTHROUGH, TINYWL_CURSOR_MOVE, TINYWL_CURSOR_RESIZE, }; -struct tinywl_server { +struct montis_server { struct wl_display *wl_display; struct wlr_backend *backend; struct wlr_renderer *renderer; @@ -60,8 +60,8 @@ struct tinywl_server { struct wl_listener request_cursor; struct wl_listener request_set_selection; struct wl_list keyboards; - enum tinywl_cursor_mode cursor_mode; - struct tinywl_toplevel *grabbed_toplevel; + enum montis_cursor_mode cursor_mode; + struct montis_toplevel *grabbed_toplevel; double grab_x, grab_y; struct wlr_box grab_geobox; uint32_t resize_edges; @@ -74,18 +74,18 @@ struct tinywl_server { plugin_t plugin; }; -struct tinywl_output { +struct montis_output { struct wl_list link; - struct tinywl_server *server; + struct montis_server *server; struct wlr_output *wlr_output; struct wl_listener frame; struct wl_listener request_state; struct wl_listener destroy; }; -struct tinywl_toplevel { +struct montis_toplevel { struct wl_list link; - struct tinywl_server *server; + struct montis_server *server; struct wlr_xdg_toplevel *xdg_toplevel; struct wlr_scene_tree *scene_tree; struct wl_listener map; @@ -98,9 +98,9 @@ struct tinywl_toplevel { struct wl_listener request_fullscreen; }; -struct tinywl_keyboard { +struct montis_keyboard { struct wl_list link; - struct tinywl_server *server; + struct montis_server *server; struct wlr_keyboard *wlr_keyboard; struct wl_listener modifiers; @@ -108,7 +108,7 @@ struct tinywl_keyboard { struct wl_listener destroy; }; -struct tinywl_popup { +struct montis_popup { struct wlr_xdg_popup *xdg_popup; struct wl_listener commit; struct wl_listener destroy; diff --git a/harness/src/main.c b/harness/src/main.c deleted file mode 100644 index 05b06ff..0000000 --- a/harness/src/main.c +++ /dev/null @@ -1,77 +0,0 @@ -#include "plugin.h" - -#include <ctype.h> -#include <dlfcn.h> -#include <stdio.h> -#include <stdlib.h> - -typedef void *dllib_t; - -typedef void *opqst_t; - -void shx(uint8_t *state, uint32_t sz) { - uint32_t i = 0; - while (i < sz) { - for (int j = 0; j < 16; ++j) { - if (i < sz) { - printf("%02x ", (unsigned int)state[i]); - } else { - printf(" "); - } - ++i; - } - - i -= 16; - - printf(" "); - - for (int j = 0; j < 16; ++j) { - if (i < sz) { - if (isprint(state[i]) && !isspace(state[i])) { - printf("%c", state[i]); - } else { - printf("."); - } - } else { - printf(" "); - } - ++i; - } - printf("\n"); - } -} - -void run_plugin(int argc, char **argv, plugin_t *plugin) { - fprintf(stderr, "Running plugin: %s\n", plugin->plugin_name); - - uint32_t sz; - - void* new_handle = dlopen(argv[2], RTLD_LAZY); - printf("old plugin init: %p\n", plugin->plugin_name); - if (new_handle) { - plugin_hot_reload(argc, argv, new_handle, plugin); - printf("new plugin init: %p\n", plugin->plugin_name); - } else { - fprintf(stderr, "Unable to open new library: %s\n", dlerror()); - } - - return; -} - -int main_(int argc, char **argv) { - if (!argv[0] && !argv[1]) { - fprintf(stderr, "Missing argument.\n"); - return 1; - } - - plugin_t plugin; - if (load_plugin_from_file(argc, argv, argv[1], &plugin)) { - fprintf(stderr, "Exiting due to other failures.\n"); - return 1; - } - plugin_cold_start(&plugin); - - run_plugin(argc, argv, &plugin); - - return 0; -} diff --git a/harness/src/plugin.c b/harness/src/plugin.c index 38dd0bf..37a6dd3 100644 --- a/harness/src/plugin.c +++ b/harness/src/plugin.c @@ -11,6 +11,7 @@ #include <stdlib.h> #include <string.h> +/* Utility function for showing the marshalled states as hex code */ static void shx(uint8_t *state, uint32_t sz) { uint32_t i = 0; @@ -108,7 +109,7 @@ void do_request_exit(void *plugv, int ec) } static void* plugin_get_seat(void* ctx) { - struct tinywl_server* server = wl_container_of(ctx, server, plugin); + struct montis_server* server = wl_container_of(ctx, server, plugin); return server->seat; } diff --git a/harness/src/wl.c b/harness/src/wl.c index a174e40..261e082 100644 --- a/harness/src/wl.c +++ b/harness/src/wl.c @@ -27,14 +27,14 @@ plugin_run_requested_actions(pl__); \ } while (0) -static void focus_toplevel(struct tinywl_toplevel *toplevel, +static void focus_toplevel(struct montis_toplevel *toplevel, struct wlr_surface *surface) { /* Note: this function only deals with keyboard focus. */ if (toplevel == NULL) { return; } - struct tinywl_server *server = toplevel->server; + struct montis_server *server = toplevel->server; struct wlr_seat *seat = server->seat; struct wlr_surface *prev_surface = seat->keyboard_state.focused_surface; if (prev_surface == surface) { @@ -76,7 +76,7 @@ static void keyboard_handle_modifiers(struct wl_listener *listener, void *data) { /* This event is raised when a modifier key, such as shift or alt, is * pressed. We simply communicate this to the client. */ - struct tinywl_keyboard *keyboard = + struct montis_keyboard *keyboard = wl_container_of(listener, keyboard, modifiers); /* * A seat can only have one keyboard, but this is a limitation of the @@ -93,8 +93,8 @@ static void keyboard_handle_modifiers(struct wl_listener *listener, void *data) static void keyboard_handle_key(struct wl_listener *listener, void *data) { /* This event is raised when a key is pressed or released. */ - struct tinywl_keyboard *keyboard = wl_container_of(listener, keyboard, key); - struct tinywl_server *server = keyboard->server; + struct montis_keyboard *keyboard = wl_container_of(listener, keyboard, key); + struct montis_server *server = keyboard->server; struct wlr_keyboard_key_event *event = data; struct wlr_seat *seat = server->seat; @@ -154,7 +154,7 @@ static void keyboard_handle_destroy(struct wl_listener *listener, void *data) * the destruction of the wlr_keyboard. It will no longer receive events * and should be destroyed. */ - struct tinywl_keyboard *keyboard = + struct montis_keyboard *keyboard = wl_container_of(listener, keyboard, destroy); wl_list_remove(&keyboard->modifiers.link); wl_list_remove(&keyboard->key.link); @@ -163,12 +163,12 @@ static void keyboard_handle_destroy(struct wl_listener *listener, void *data) free(keyboard); } -static void server_new_keyboard(struct tinywl_server *server, +static void server_new_keyboard(struct montis_server *server, struct wlr_input_device *device) { struct wlr_keyboard *wlr_keyboard = wlr_keyboard_from_input_device(device); - struct tinywl_keyboard *keyboard = calloc(1, sizeof(*keyboard)); + struct montis_keyboard *keyboard = calloc(1, sizeof(*keyboard)); keyboard->server = server; keyboard->wlr_keyboard = wlr_keyboard; @@ -207,7 +207,7 @@ static void server_new_keyboard(struct tinywl_server *server, wl_list_insert(&server->keyboards, &keyboard->link); } -static void server_new_pointer(struct tinywl_server *server, +static void server_new_pointer(struct montis_server *server, struct wlr_input_device *device) { /* We don't do anything special with pointers. All of our pointer handling @@ -221,7 +221,7 @@ static void server_new_input(struct wl_listener *listener, void *data) { /* This event is raised by the backend when a new input device becomes * available. */ - struct tinywl_server *server = wl_container_of(listener, server, new_input); + struct montis_server *server = wl_container_of(listener, server, new_input); struct wlr_input_device *device = data; switch (device->type) { case WLR_INPUT_DEVICE_KEYBOARD: @@ -245,7 +245,7 @@ static void server_new_input(struct wl_listener *listener, void *data) static void seat_request_cursor(struct wl_listener *listener, void *data) { - struct tinywl_server *server = + struct montis_server *server = wl_container_of(listener, server, request_cursor); /* This event is raised by the seat when a client provides a cursor image */ struct wlr_seat_pointer_request_set_cursor_event *event = data; @@ -267,22 +267,22 @@ static void seat_request_set_selection(struct wl_listener *listener, void *data) { /* This event is raised by the seat when a client wants to set the selection, * usually when the user copies something. wlroots allows compositors to - * ignore such requests if they so choose, but in tinywl we always honor + * ignore such requests if they so choose, but in montis we always honor */ - struct tinywl_server *server = + struct montis_server *server = wl_container_of(listener, server, request_set_selection); struct wlr_seat_request_set_selection_event *event = data; wlr_seat_set_selection(server->seat, event->source, event->serial); } -static struct tinywl_toplevel *desktop_toplevel_at(struct tinywl_server *server, +static struct montis_toplevel *desktop_toplevel_at(struct montis_server *server, double lx, double ly, struct wlr_surface **surface, double *sx, double *sy) { /* This returns the topmost node in the scene at the given layout coords. * We only care about surface nodes as we are specifically looking for a - * surface in the surface tree of a tinywl_toplevel. */ + * surface in the surface tree of a montis_toplevel. */ struct wlr_scene_node *node = wlr_scene_node_at(&server->scene->tree.node, lx, ly, sx, sy); if (node == NULL || node->type != WLR_SCENE_NODE_BUFFER) { @@ -296,7 +296,7 @@ static struct tinywl_toplevel *desktop_toplevel_at(struct tinywl_server *server, } *surface = scene_surface->surface; - /* Find the node corresponding to the tinywl_toplevel at the root of this + /* Find the node corresponding to the montis_toplevel at the root of this * surface tree, it is the only one for which we set the data field. */ struct wlr_scene_tree *tree = node->parent; while (tree != NULL && tree->node.data == NULL) { @@ -305,23 +305,23 @@ static struct tinywl_toplevel *desktop_toplevel_at(struct tinywl_server *server, return tree->node.data; } -static void reset_cursor_mode(struct tinywl_server *server) +static void reset_cursor_mode(struct montis_server *server) { /* Reset the cursor mode to passthrough. */ server->cursor_mode = TINYWL_CURSOR_PASSTHROUGH; server->grabbed_toplevel = NULL; } -static void process_cursor_move(struct tinywl_server *server, uint32_t time) +static void process_cursor_move(struct montis_server *server, uint32_t time) { /* Move the grabbed toplevel to the new position. */ - struct tinywl_toplevel *toplevel = server->grabbed_toplevel; + struct montis_toplevel *toplevel = server->grabbed_toplevel; wlr_scene_node_set_position(&toplevel->scene_tree->node, server->cursor->x - server->grab_x, server->cursor->y - server->grab_y); } -static void process_cursor_resize(struct tinywl_server *server, uint32_t time) +static void process_cursor_resize(struct montis_server *server, uint32_t time) { /* * Resizing the grabbed toplevel can be a little bit complicated, because we @@ -333,7 +333,7 @@ static void process_cursor_resize(struct tinywl_server *server, uint32_t time) * compositor, you'd wait for the client to prepare a buffer at the new * size, then commit any movement that was prepared. */ - struct tinywl_toplevel *toplevel = server->grabbed_toplevel; + struct montis_toplevel *toplevel = server->grabbed_toplevel; double border_x = server->cursor->x - server->grab_x; double border_y = server->cursor->y - server->grab_y; int new_left = server->grab_geobox.x; @@ -376,7 +376,7 @@ static void process_cursor_resize(struct tinywl_server *server, uint32_t time) wlr_xdg_toplevel_set_size(toplevel->xdg_toplevel, new_width, new_height); } -static void process_cursor_motion(struct tinywl_server *server, uint32_t time) +static void process_cursor_motion(struct montis_server *server, uint32_t time) { /* If the mode is non-passthrough, delegate to those functions. */ if (server->cursor_mode == TINYWL_CURSOR_MOVE) { @@ -392,7 +392,7 @@ static void process_cursor_motion(struct tinywl_server *server, uint32_t time) double sx, sy; struct wlr_seat *seat = server->seat; struct wlr_surface *surface = NULL; - struct tinywl_toplevel *toplevel = desktop_toplevel_at( + struct montis_toplevel *toplevel = desktop_toplevel_at( server, server->cursor->x, server->cursor->y, &surface, &sx, &sy); if (!toplevel) { /* If there's no toplevel under the cursor, set the cursor image to a @@ -426,7 +426,7 @@ static void server_cursor_motion(struct wl_listener *listener, void *data) { /* This event is forwarded by the cursor when a pointer emits a _relative_ * pointer motion event (i.e. a delta) */ - struct tinywl_server *server = + struct montis_server *server = wl_container_of(listener, server, cursor_motion); struct wlr_pointer_motion_event *event = data; /* The cursor doesn't move unless we tell it to. The cursor automatically @@ -448,7 +448,7 @@ static void server_cursor_motion_absolute(struct wl_listener *listener, * move the mouse over the window. You could enter the window from any edge, * so we have to warp the mouse there. There is also some hardware which * emits these events. */ - struct tinywl_server *server = + struct montis_server *server = wl_container_of(listener, server, cursor_motion_absolute); struct wlr_pointer_motion_absolute_event *event = data; wlr_cursor_warp_absolute(server->cursor, &event->pointer->base, event->x, @@ -460,7 +460,7 @@ static void server_cursor_button(struct wl_listener *listener, void *data) { /* This event is forwarded by the cursor when a pointer emits a button * event. */ - struct tinywl_server *server = + struct montis_server *server = wl_container_of(listener, server, cursor_button); struct wlr_pointer_button_event *event = data; struct wlr_seat *seat = server->seat; @@ -476,7 +476,7 @@ static void server_cursor_button(struct wl_listener *listener, void *data) // event->state); // double sx, sy; // struct wlr_surface *surface = NULL; - // struct tinywl_toplevel *toplevel = desktop_toplevel_at( + // struct montis_toplevel *toplevel = desktop_toplevel_at( // server, server->cursor->x, server->cursor->y, &surface, &sx, &sy); // if (event->state == WLR_BUTTON_RELEASED) { // /* If you released any buttons, we exit interactive move/resize mode. */ @@ -492,7 +492,7 @@ static void server_cursor_axis(struct wl_listener *listener, void *data) { /* This event is forwarded by the cursor when a pointer emits an axis event, * for example when you move the scroll wheel. */ - struct tinywl_server *server = wl_container_of(listener, server, cursor_axis); + struct montis_server *server = wl_container_of(listener, server, cursor_axis); struct wlr_pointer_axis_event *event = data; /* Notify the client with pointer focus of the axis event. */ wlr_seat_pointer_notify_axis( @@ -506,7 +506,7 @@ static void server_cursor_frame(struct wl_listener *listener, void *data) * event. Frame events are sent after regular pointer events to group * multiple events together. For instance, two axis events may happen at the * same time, in which case a frame event won't be sent in between. */ - struct tinywl_server *server = + struct montis_server *server = wl_container_of(listener, server, cursor_frame); /* Notify the client with pointer focus of the frame event. */ wlr_seat_pointer_notify_frame(server->seat); @@ -516,7 +516,7 @@ static void output_frame(struct wl_listener *listener, void *data) { /* This function is called every time an output is ready to display a frame, * generally at the output's refresh rate (e.g. 60Hz). */ - struct tinywl_output *output = wl_container_of(listener, output, frame); + struct montis_output *output = wl_container_of(listener, output, frame); struct wlr_scene *scene = output->server->scene; struct wlr_scene_output *scene_output = @@ -535,7 +535,7 @@ static void output_request_state(struct wl_listener *listener, void *data) /* This function is called when the backend requests a new state for * the output. For example, Wayland and X11 backends request a new mode * when the output window is resized. */ - struct tinywl_output *output = + struct montis_output *output = wl_container_of(listener, output, request_state); const struct wlr_output_event_request_state *event = data; wlr_output_commit_state(output->wlr_output, event->state); @@ -543,7 +543,7 @@ static void output_request_state(struct wl_listener *listener, void *data) static void output_destroy(struct wl_listener *listener, void *data) { - struct tinywl_output *output = wl_container_of(listener, output, destroy); + struct montis_output *output = wl_container_of(listener, output, destroy); wl_list_remove(&output->frame.link); wl_list_remove(&output->request_state.link); @@ -556,7 +556,7 @@ static void server_new_output(struct wl_listener *listener, void *data) { /* This event is raised by the backend when a new output (aka a display or * monitor) becomes available. */ - struct tinywl_server *server = wl_container_of(listener, server, new_output); + struct montis_server *server = wl_container_of(listener, server, new_output); struct wlr_output *wlr_output = data; /* Configures the output created by the backend to use our allocator @@ -583,7 +583,7 @@ static void server_new_output(struct wl_listener *listener, void *data) wlr_output_state_finish(&state); /* Allocates and configures our state for this output */ - struct tinywl_output *output = calloc(1, sizeof(*output)); + struct montis_output *output = calloc(1, sizeof(*output)); output->wlr_output = wlr_output; output->server = server; @@ -621,7 +621,7 @@ static void server_new_output(struct wl_listener *listener, void *data) static void xdg_toplevel_map(struct wl_listener *listener, void *data) { /* Called when the surface is mapped, or ready to display on-screen. */ - struct tinywl_toplevel *toplevel = wl_container_of(listener, toplevel, map); + struct montis_toplevel *toplevel = wl_container_of(listener, toplevel, map); wl_list_insert(&toplevel->server->toplevels, &toplevel->link); @@ -636,7 +636,7 @@ static void xdg_toplevel_map(struct wl_listener *listener, void *data) static void xdg_toplevel_unmap(struct wl_listener *listener, void *data) { /* Called when the surface is unmapped, and should no longer be shown. */ - struct tinywl_toplevel *toplevel = wl_container_of(listener, toplevel, unmap); + struct montis_toplevel *toplevel = wl_container_of(listener, toplevel, unmap); /* Reset the cursor mode if the grabbed toplevel was unmapped. */ if (toplevel == toplevel->server->grabbed_toplevel) { @@ -654,7 +654,7 @@ static void xdg_toplevel_unmap(struct wl_listener *listener, void *data) static void xdg_toplevel_destroy(struct wl_listener *listener, void *data) { /* Called when the xdg_toplevel is destroyed. */ - struct tinywl_toplevel *toplevel = + struct montis_toplevel *toplevel = wl_container_of(listener, toplevel, destroy); wl_list_remove(&toplevel->map.link); @@ -673,13 +673,13 @@ static void xdg_toplevel_destroy(struct wl_listener *listener, void *data) free(toplevel); } -static void begin_interactive(struct tinywl_toplevel *toplevel, - enum tinywl_cursor_mode mode, uint32_t edges) +static void begin_interactive(struct montis_toplevel *toplevel, + enum montis_cursor_mode mode, uint32_t edges) { /* This function sets up an interactive move or resize operation, where the * compositor stops propegating pointer events to clients and instead * consumes them itself, to move or resize windows. */ - struct tinywl_server *server = toplevel->server; + struct montis_server *server = toplevel->server; struct wlr_surface *focused_surface = server->seat->pointer_state.focused_surface; if (toplevel->xdg_toplevel->base->surface != @@ -720,7 +720,7 @@ static void xdg_toplevel_request_move(struct wl_listener *listener, void *data) * decorations. Note that a more sophisticated compositor should check the * provided serial against a list of button press serials sent to this * client, to prevent the client from requesting this whenever they want. */ - struct tinywl_toplevel *toplevel = + struct montis_toplevel *toplevel = wl_container_of(listener, toplevel, request_move); begin_interactive(toplevel, TINYWL_CURSOR_MOVE, 0); } @@ -734,7 +734,7 @@ static void xdg_toplevel_request_resize(struct wl_listener *listener, * provided serial against a list of button press serials sent to this * client, to prevent the client from requesting this whenever they want. */ struct wlr_xdg_toplevel_resize_event *event = data; - struct tinywl_toplevel *toplevel = + struct montis_toplevel *toplevel = wl_container_of(listener, toplevel, request_resize); begin_interactive(toplevel, TINYWL_CURSOR_RESIZE, event->edges); } @@ -744,10 +744,10 @@ static void xdg_toplevel_request_maximize(struct wl_listener *listener, { /* This event is raised when a client would like to maximize itself, * typically because the user clicked on the maximize button on - * client-side decorations. tinywl doesn't support maximization, but + * client-side decorations. montis doesn't support maximization, but * to conform to xdg-shell protocol we still must send a configure. * wlr_xdg_surface_schedule_configure() is used to send an empty reply. */ - struct tinywl_toplevel *toplevel = + struct montis_toplevel *toplevel = wl_container_of(listener, toplevel, request_maximize); wlr_xdg_surface_schedule_configure(toplevel->xdg_toplevel->base); } @@ -756,19 +756,19 @@ static void xdg_toplevel_request_fullscreen(struct wl_listener *listener, void *data) { /* Just as with request_maximize, we must send a configure here. */ - struct tinywl_toplevel *toplevel = + struct montis_toplevel *toplevel = wl_container_of(listener, toplevel, request_fullscreen); wlr_xdg_surface_schedule_configure(toplevel->xdg_toplevel->base); } static void xdg_popup_commit(struct wl_listener *listener, void *data) { /* Called when a new surface state is committed. */ - struct tinywl_popup *popup = wl_container_of(listener, popup, commit); + struct montis_popup *popup = wl_container_of(listener, popup, commit); if (popup->xdg_popup->base->initial_commit) { /* When an xdg_surface performs an initial commit, the compositor must * reply with a configure so the client can map the surface. - * tinywl sends an empty configure. A more sophisticated compositor + * montis sends an empty configure. A more sophisticated compositor * might change an xdg_popup's geometry to ensure it's not positioned * off-screen, for example. */ wlr_xdg_surface_schedule_configure(popup->xdg_popup->base); @@ -777,7 +777,7 @@ static void xdg_popup_commit(struct wl_listener *listener, void *data) { static void xdg_popup_destroy(struct wl_listener *listener, void *data) { /* Called when the xdg_popup is destroyed. */ - struct tinywl_popup *popup = wl_container_of(listener, popup, destroy); + struct montis_popup *popup = wl_container_of(listener, popup, destroy); wl_list_remove(&popup->commit.link); wl_list_remove(&popup->destroy.link); @@ -789,7 +789,7 @@ static void server_new_xdg_popup(struct wl_listener *listener, void *data) { /* This event is raised when a client creates a new popup. */ struct wlr_xdg_popup *xdg_popup = data; - struct tinywl_popup *popup = calloc(1, sizeof(*popup)); + struct montis_popup *popup = calloc(1, sizeof(*popup)); popup->xdg_popup = xdg_popup; /* We must add xdg popups to the scene graph so they get rendered. The @@ -811,11 +811,11 @@ static void server_new_xdg_popup(struct wl_listener *listener, void *data) { static void xdg_toplevel_commit(struct wl_listener *listener, void *data) { /* Called when a new surface state is committed. */ - struct tinywl_toplevel *toplevel = wl_container_of(listener, toplevel, commit); + struct montis_toplevel *toplevel = wl_container_of(listener, toplevel, commit); if (toplevel->xdg_toplevel->base->initial_commit) { /* When an xdg_surface performs an initial commit, the compositor must - * reply with a configure so the client can map the surface. tinywl + * reply with a configure so the client can map the surface. montis * configures the xdg_toplevel with 0,0 size to let the client pick the * dimensions itself. */ wlr_xdg_toplevel_set_size(toplevel->xdg_toplevel, 0, 0); @@ -825,11 +825,11 @@ static void xdg_toplevel_commit(struct wl_listener *listener, void *data) { static void server_new_xdg_toplevel(struct wl_listener *listener, void *data) { /* This event is raised when a client creates a new toplevel (application window). */ - struct tinywl_server *server = wl_container_of(listener, server, new_xdg_toplevel); + struct montis_server *server = wl_container_of(listener, server, new_xdg_toplevel); struct wlr_xdg_toplevel *xdg_toplevel = data; - /* Allocate a tinywl_toplevel for this surface */ - struct tinywl_toplevel *toplevel = calloc(1, sizeof(*toplevel)); + /* Allocate a montis_toplevel for this surface */ + struct montis_toplevel *toplevel = calloc(1, sizeof(*toplevel)); toplevel->server = server; toplevel->xdg_toplevel = xdg_toplevel; toplevel->scene_tree = @@ -884,7 +884,7 @@ int main(int argc, char *argv[]) return 0; } - struct tinywl_server server = {0}; + struct montis_server server = {0}; if (load_plugin_from_file(argc, argv, plugin, &server.plugin)) { fprintf(stderr, "Failed to read plugin from file.\n"); |