switch to meson build + refactor code to remove compile warning
This commit is contained in:
20
xdg.c
20
xdg.c
@@ -55,6 +55,7 @@ static void begin_interactive(struct diyac_view *toplevel,
|
||||
}
|
||||
static void xdg_toplevel_commit(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
struct diyac_view *toplevel = wl_container_of(listener, toplevel, commit);
|
||||
uint32_t serial = toplevel->configuration_serial;
|
||||
|
||||
@@ -84,6 +85,7 @@ static void xdg_toplevel_commit(struct wl_listener *listener, void *data)
|
||||
}
|
||||
static void xdg_toplevel_map(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
wlr_log(WLR_INFO, "xdg_toplevel_map: %p", listener);
|
||||
/* Called when the surface is mapped, or ready to display on-screen. */
|
||||
struct diyac_view *toplevel = wl_container_of(listener, toplevel, map);
|
||||
@@ -120,6 +122,7 @@ static void xdg_toplevel_map(struct wl_listener *listener, void *data)
|
||||
|
||||
static void xdg_toplevel_unmap(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
/* Called when the surface is unmapped, and should no longer be shown. */
|
||||
struct diyac_view *toplevel = wl_container_of(listener, toplevel, unmap);
|
||||
toplevel->mapped = false;
|
||||
@@ -158,6 +161,7 @@ static void xdg_toplevel_unmap(struct wl_listener *listener, void *data)
|
||||
static void xdg_toplevel_request_move(
|
||||
struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
/* This event is raised when a client would like to begin an interactive
|
||||
* move, typically because the user clicked on their client-side
|
||||
* decorations. Note that a more sophisticated compositor should check the
|
||||
@@ -184,6 +188,7 @@ static void xdg_toplevel_request_resize(
|
||||
static void xdg_toplevel_request_maximize(
|
||||
struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
/* 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. diyac doesn't support maximization, but
|
||||
@@ -197,6 +202,7 @@ static void xdg_toplevel_request_maximize(
|
||||
|
||||
static void xdg_toplevel_request_fullscreen(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
struct diyac_view *toplevel =
|
||||
wl_container_of(listener, toplevel, request_fullscreen);
|
||||
diyac_view_set_fullscreen(toplevel, toplevel->xdg_toplevel->requested.fullscreen);
|
||||
@@ -204,6 +210,7 @@ static void xdg_toplevel_request_fullscreen(struct wl_listener *listener, void *
|
||||
|
||||
static void xdg_toplevel_request_minimize(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
struct diyac_view *toplevel =
|
||||
wl_container_of(listener, toplevel, request_minimize);
|
||||
diyac_view_set_mimimize(toplevel, toplevel->xdg_toplevel->requested.minimized);
|
||||
@@ -211,6 +218,7 @@ static void xdg_toplevel_request_minimize(struct wl_listener *listener, void *da
|
||||
|
||||
static void xdg_toplevel_destroy(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
/* Called when the xdg_toplevel is destroyed. */
|
||||
struct diyac_view *toplevel = wl_container_of(listener, toplevel, destroy);
|
||||
if (toplevel->toplevel.handle)
|
||||
@@ -243,6 +251,7 @@ static void xdg_toplevel_destroy(struct wl_listener *listener, void *data)
|
||||
|
||||
static void handle_xdg_popup_destroy(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
struct diyac_popup *popup = wl_container_of(listener, popup, destroy);
|
||||
wl_list_remove(&popup->destroy.link);
|
||||
wl_list_remove(&popup->new_popup.link);
|
||||
@@ -262,9 +271,9 @@ static void popup_unconstrain(struct diyac_popup *popup)
|
||||
{
|
||||
return;
|
||||
}
|
||||
struct diyac_server *server = view->server;
|
||||
struct wlr_output_layout *output_layout = server->output_layout;
|
||||
struct wlr_output *wlr_output = view->output->wlr_output;
|
||||
// struct diyac_server *server = view->server;
|
||||
//struct wlr_output_layout *output_layout = server->output_layout;
|
||||
//struct wlr_output *wlr_output = view->output->wlr_output;
|
||||
struct wlr_box usable = {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
@@ -287,6 +296,7 @@ static void popup_unconstrain(struct diyac_popup *popup)
|
||||
|
||||
static void handle_xdg_popup_commit(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
struct diyac_popup *popup = wl_container_of(listener, popup, commit);
|
||||
struct wlr_box popup_box;
|
||||
wlr_xdg_surface_get_geometry(popup->wlr_popup->base, &popup_box);
|
||||
@@ -294,7 +304,7 @@ static void handle_xdg_popup_commit(struct wl_listener *listener, void *data)
|
||||
if (!wlr_box_empty(&popup_box))
|
||||
// if (popup->wlr_popup->base->initial_commit)
|
||||
{
|
||||
struct diyac_view *view = popup->parent;
|
||||
// struct diyac_view *view = popup->parent;
|
||||
// wlr_output_commit(view->output->wlr_output);
|
||||
/* Prevent getting called over and over again */
|
||||
wl_list_remove(&popup->commit.link);
|
||||
@@ -366,12 +376,14 @@ static void xdg_popup_create(struct diyac_view *view, struct wlr_xdg_popup *wlr_
|
||||
|
||||
static void xdg_set_appid_notify(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
struct diyac_view *view = wl_container_of(listener, view, set_app_id);
|
||||
diyac_view_update_app_id(view);
|
||||
}
|
||||
|
||||
static void xdg_set_title_notify(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void)data;
|
||||
struct diyac_view *view = wl_container_of(listener, view, set_title);
|
||||
diyac_view_update_title(view);
|
||||
}
|
||||
|
Reference in New Issue
Block a user