[digesting_libdecor] eliminate frame poitner pass throughs everywhere

main
Allen Webster 2026-02-27 14:08:10 -08:00
parent 7e78a59c43
commit e556f5aa26
2 changed files with 268 additions and 405 deletions

File diff suppressed because it is too large Load Diff

View File

@ -162,10 +162,6 @@ struct border_component {
struct wl_list link; /* border_component::child_components */
};
struct libdecor_frame {
int dummy;
};
// #include "libdecor.c"
struct libdecor_state {
@ -279,50 +275,27 @@ enum titlebar_gesture {
// libdecor.h
void libdecor_frame_unref(struct libdecor_frame *frame);
void libdecor_frame_set_visibility(struct libdecor_frame *frame,
bool visible);
void libdecor_frame_unref(void);
void libdecor_frame_set_visibility(bool visible);
void libdecor_frame_set_title(struct libdecor_frame *frame,
const char *title);
void libdecor_frame_set_app_id(struct libdecor_frame *frame,
const char *app_id);
void libdecor_frame_show_window_menu(struct libdecor_frame *frame,
struct wl_seat *wl_seat,
uint32_t serial,
int x,
int y);
void libdecor_frame_set_title(const char *title);
void libdecor_frame_set_app_id(const char *app_id);
void libdecor_frame_show_window_menu(struct wl_seat *wl_seat, uint32_t serial, int x, int y);
void libdecor_frame_popup_grab(struct libdecor_frame *frame,
const char *seat_name);
void libdecor_frame_popup_ungrab(struct libdecor_frame *frame,
const char *seat_name);
void libdecor_frame_translate_coordinate(struct libdecor_frame *frame,
int surface_x, int surface_y,
int *frame_x, int *frame_y);
void libdecor_frame_popup_grab(const char *seat_name);
void libdecor_frame_popup_ungrab(const char *seat_name);
void libdecor_frame_translate_coordinate(int surface_x, int surface_y, int *frame_x, int *frame_y);
void libdecor_frame_resize(struct libdecor_frame *frame,
struct wl_seat *wl_seat,
uint32_t serial,
enum libdecor_resize_edge edge);
void libdecor_frame_move(struct libdecor_frame *frame,
struct wl_seat *wl_seat,
uint32_t serial);
void libdecor_frame_commit(struct libdecor_frame *frame,
int w, int h,
struct libdecor_configuration *configuration);
void libdecor_frame_set_fullscreen(struct libdecor_frame *frame,
struct wl_output *output);
void libdecor_frame_unset_fullscreen(struct libdecor_frame *frame);
bool libdecor_frame_is_floating(struct libdecor_frame *frame);
void libdecor_frame_map(struct libdecor_frame *frame);
void libdecor_frame_resize(struct wl_seat *wl_seat, uint32_t serial, enum libdecor_resize_edge edge);
void libdecor_frame_move(struct wl_seat *wl_seat, uint32_t serial);
void libdecor_frame_commit(int w, int h, struct libdecor_configuration *configuration);
void libdecor_frame_set_fullscreen(struct wl_output *output);
void libdecor_frame_unset_fullscreen(void);
bool libdecor_frame_is_floating(void);
void libdecor_frame_map(void);
bool libdecor_configuration_get_content_size(struct libdecor_configuration *configuration,
struct libdecor_frame *frame,
int *width,
int *height);
bool libdecor_configuration_get_window_state(struct libdecor_configuration *configuration,
enum libdecor_window_state *window_state);
bool libdecor_configuration_get_content_size(struct libdecor_configuration *configuration, int *width, int *height);
bool libdecor_configuration_get_window_state(struct libdecor_configuration *configuration, enum libdecor_window_state *window_state);
int libdecor_dispatch(int timeout);
@ -343,11 +316,11 @@ int libdecor_os_create_anonymous_file(off_t size);
// #include "libdecor.c"
static void init_shell_surface(struct libdecor_frame *frame);
static void init_shell_surface(void);
static void set_capabilities(struct libdecor_frame *frame, const enum libdecor_capabilities new_capabilities);
static void set_capabilities(const enum libdecor_capabilities new_capabilities);
static void do_map(struct libdecor_frame *frame);
static void do_map(void);
//#include "plugins/gtk/libdecor-gtk.c"
@ -360,13 +333,13 @@ static const char *libdecor_gtk_proxy_tag = "libdecor-gtk";
static int libdecor_plugin_gtk_dispatch(int timeout);
static void libdecor_plugin_gtk_set_handle_application_cursor(bool handle_cursor);
static void libdecor_plugin_gtk_frame_free(struct libdecor_frame *frame);
static void libdecor_plugin_gtk_frame_commit(struct libdecor_frame *frame, struct libdecor_state *state, struct libdecor_configuration *configuration);
static void libdecor_plugin_gtk_frame_popup_grab(struct libdecor_frame *frame, const char *seat_name);
static void libdecor_plugin_gtk_frame_popup_ungrab(struct libdecor_frame *frame, const char *seat_name);
static bool libdecor_plugin_gtk_frame_get_border_size(struct libdecor_frame *frame, struct libdecor_configuration *configuration, int *left, int *right, int *top, int *bottom);
static void libdecor_plugin_gtk_frame_free(void);
static void libdecor_plugin_gtk_frame_commit(struct libdecor_state *state, struct libdecor_configuration *configuration);
static void libdecor_plugin_gtk_frame_popup_grab(const char *seat_name);
static void libdecor_plugin_gtk_frame_popup_ungrab(const char *seat_name);
static bool libdecor_plugin_gtk_frame_get_border_size(struct libdecor_configuration *configuration, int *left, int *right, int *top, int *bottom);
static void draw_decoration(struct libdecor_frame *frame);
static void draw_decoration(void);
// digesting_libdecor
@ -400,7 +373,6 @@ typedef struct Ctx{
/* window */
struct wl_surface *wl_surface;
struct libdecor_frame *frame;
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct zxdg_toplevel_decoration_v1 *toplevel_decoration;