[digesting_libdecor] move all frame fields into main context

main
Allen Webster 2026-02-27 13:44:53 -08:00
parent 0a2e383fcf
commit 7e78a59c43
2 changed files with 524 additions and 549 deletions

File diff suppressed because it is too large Load Diff

View File

@ -163,65 +163,7 @@ struct border_component {
}; };
struct libdecor_frame { struct libdecor_frame {
//struct libdecor_frame_private; int dummy;
char *app_id;
char *title;
struct libdecor_limits content_limits;
struct xdg_toplevel *parent;
struct libdecor_configuration *pending_configuration;
int frame_content_width;
int frame_content_height;
enum libdecor_window_state frame_window_state;
bool has_decoration_mode;
enum zxdg_toplevel_decoration_v1_mode decoration_mode;
enum libdecor_capabilities frame_capabilities;
enum libdecor_wm_capabilities wm_capabilities;
/* original limits for interactive resize */
struct libdecor_limits interactive_limits;
bool visible;
//struct libdecor_frame_gtk;
int gtk_content_width;
int gtk_content_height;
enum libdecor_window_state gtk_window_state;
enum decoration_type decoration_type;
enum libdecor_capabilities gtk_capabilities;
struct border_component *active;
struct border_component *touch_active;
struct border_component *focus;
struct border_component *grab;
bool shadow_showing;
struct border_component shadow;
GtkWidget *window; /* offscreen window for rendering */
GtkWidget *header; /* header bar with widgets */
struct border_component headerbar;
struct header_element_data hdr_focus;
/* store pre-processed shadow tile */
cairo_surface_t *shadow_blur;
struct {
enum titlebar_gesture_state state;
int button_pressed_count;
uint32_t first_pressed_button;
uint32_t first_pressed_time;
double pressed_x;
double pressed_y;
uint32_t pressed_serial;
} titlebar_gesture;
}; };
// #include "libdecor.c" // #include "libdecor.c"
@ -473,6 +415,66 @@ typedef struct Ctx{
int has_cached_config; int has_cached_config;
struct libdecor_configuration cached_config; struct libdecor_configuration cached_config;
//struct libdecor_frame_private;
char *app_id;
char *title;
struct libdecor_limits content_limits;
struct xdg_toplevel *parent;
struct libdecor_configuration *pending_configuration;
int frame_content_width;
int frame_content_height;
enum libdecor_window_state frame_window_state;
bool has_decoration_mode;
enum zxdg_toplevel_decoration_v1_mode decoration_mode;
enum libdecor_capabilities frame_capabilities;
enum libdecor_wm_capabilities wm_capabilities;
/* original limits for interactive resize */
struct libdecor_limits interactive_limits;
bool visible;
//struct libdecor_frame_gtk;
int gtk_content_width;
int gtk_content_height;
enum libdecor_window_state gtk_window_state;
enum decoration_type decoration_type;
enum libdecor_capabilities gtk_capabilities;
struct border_component *active;
struct border_component *touch_active;
struct border_component *focus;
struct border_component *grab;
bool shadow_showing;
struct border_component shadow;
GtkWidget *window; /* offscreen window for rendering */
GtkWidget *header; /* header bar with widgets */
struct border_component headerbar;
struct header_element_data hdr_focus;
/* store pre-processed shadow tile */
cairo_surface_t *shadow_blur;
struct {
enum titlebar_gesture_state state;
int button_pressed_count;
uint32_t first_pressed_button;
uint32_t first_pressed_time;
double pressed_x;
double pressed_y;
uint32_t pressed_serial;
} titlebar_gesture;
} Ctx; } Ctx;
#endif //DIGESTING_LIBDECOR_H #endif //DIGESTING_LIBDECOR_H