[digesting_libdecor] remove wl_callback and init_done
parent
913a5eb607
commit
23a607fa56
|
|
@ -68,7 +68,6 @@ const struct xdg_surface_listener xdg_surface_listener;
|
|||
const struct xdg_toplevel_listener xdg_toplevel_listener;
|
||||
const struct zxdg_toplevel_decoration_v1_listener xdg_toplevel_decoration_listener;
|
||||
const struct xdg_wm_base_listener xdg_wm_base_listener;
|
||||
const struct wl_callback_listener init_wl_display_callback_listener;
|
||||
const struct wl_buffer_listener buffer_listener;
|
||||
const struct wl_callback_listener shm_callback_listener;
|
||||
|
||||
|
|
@ -230,20 +229,6 @@ const struct wl_registry_listener wl_registry_listener = {
|
|||
wlevent__wl_registry_global_remove,
|
||||
};
|
||||
|
||||
static void
|
||||
init_wl_display_callback(void *user_data, struct wl_callback *callback, uint32_t time){
|
||||
struct libdecor *context = user_data;
|
||||
|
||||
ctx.init_done = true;
|
||||
|
||||
wl_callback_destroy(callback);
|
||||
ctx.wl_callback = 0;
|
||||
}
|
||||
|
||||
const struct wl_callback_listener init_wl_display_callback_listener = {
|
||||
init_wl_display_callback
|
||||
};
|
||||
|
||||
static void
|
||||
seat_capabilities(void *data, struct wl_seat *wl_seat, uint32_t capabilities){
|
||||
struct seat *seat = data;
|
||||
|
|
@ -344,8 +329,6 @@ int main(){
|
|||
|
||||
if (ctx.wl_registry != 0){
|
||||
wl_registry_add_listener(ctx.wl_registry, &wl_registry_listener, 0);
|
||||
ctx.wl_callback = wl_display_sync(ctx.wl_display);
|
||||
wl_callback_add_listener(ctx.wl_callback, &init_wl_display_callback_listener, 0);
|
||||
|
||||
wl_display_flush(ctx.wl_display);
|
||||
wl_display_dispatch(ctx.wl_display);
|
||||
|
|
@ -1225,9 +1208,6 @@ cleanup(void){
|
|||
if (ctx.wl_subcompositor != 0){
|
||||
wl_subcompositor_destroy(ctx.wl_subcompositor);
|
||||
}
|
||||
if (ctx.wl_callback != 0){
|
||||
wl_callback_destroy(ctx.wl_callback);
|
||||
}
|
||||
if (ctx.xdg_wm_base != 0){
|
||||
xdg_wm_base_destroy(ctx.xdg_wm_base);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -358,12 +358,10 @@ typedef struct Ctx{
|
|||
struct wl_shm *wl_shm;
|
||||
struct xdg_wm_base *xdg_wm_base;
|
||||
struct zxdg_decoration_manager_v1 *decoration_manager;
|
||||
struct wl_callback *wl_callback;
|
||||
|
||||
struct wl_list seat_list;
|
||||
struct wl_list output_list;
|
||||
|
||||
bool init_done;
|
||||
bool has_error;
|
||||
|
||||
bool has_argb;
|
||||
|
|
|
|||
Loading…
Reference in New Issue