formatting
This commit is contained in:
parent
35d8ca7358
commit
ae999d1b83
2 changed files with 19 additions and 33 deletions
40
wayland.c
40
wayland.c
|
|
@ -3,9 +3,7 @@
|
|||
#include <stdlib.h>
|
||||
#include "wayland.h"
|
||||
|
||||
static void
|
||||
wl_buffer_release(void *data, struct wl_buffer *wl_buffer)
|
||||
{
|
||||
static void wl_buffer_release(void *data, struct wl_buffer *wl_buffer) {
|
||||
/* Sent by the compositor when it's no longer using this buffer */
|
||||
wl_buffer_destroy(wl_buffer);
|
||||
}
|
||||
|
|
@ -14,10 +12,7 @@ static const struct wl_buffer_listener wl_buffer_listener = {
|
|||
.release = wl_buffer_release,
|
||||
};
|
||||
|
||||
static void
|
||||
xdg_surface_configure(void *data,
|
||||
struct xdg_surface *xdg_surface, uint32_t serial)
|
||||
{
|
||||
static void xdg_surface_configure(void *data, struct xdg_surface *xdg_surface, uint32_t serial) {
|
||||
struct client_state *state = data;
|
||||
xdg_surface_ack_configure(xdg_surface, serial);
|
||||
}
|
||||
|
|
@ -26,10 +21,10 @@ static const struct xdg_surface_listener xdg_surface_listener = {
|
|||
.configure = xdg_surface_configure,
|
||||
};
|
||||
|
||||
static void
|
||||
xdg_wm_base_ping(void *data, struct xdg_wm_base *xdg_wm_base, uint32_t serial)
|
||||
{
|
||||
xdg_wm_base_pong(xdg_wm_base, serial); }
|
||||
static void xdg_wm_base_ping(void *data, struct xdg_wm_base *xdg_wm_base, uint32_t serial) {
|
||||
xdg_wm_base_pong(xdg_wm_base, serial);
|
||||
}
|
||||
|
||||
static const struct xdg_wm_base_listener xdg_wm_base_listener = {
|
||||
.ping = xdg_wm_base_ping,
|
||||
};
|
||||
|
|
@ -59,10 +54,13 @@ static const struct xdg_toplevel_listener xdg_toplevel_listener = {
|
|||
.close = xdg_toplevel_close,
|
||||
};
|
||||
|
||||
static void
|
||||
registry_handle_global(void *data, struct wl_registry *registry,
|
||||
uint32_t name, const char *interface, uint32_t version)
|
||||
{
|
||||
static void registry_handle_global(
|
||||
void *data,
|
||||
struct wl_registry *registry,
|
||||
uint32_t name,
|
||||
const char *interface,
|
||||
uint32_t version
|
||||
) {
|
||||
printf("interface: '%s', version: %d, name: %d\n",
|
||||
interface, version, name);
|
||||
|
||||
|
|
@ -96,15 +94,15 @@ registry_handle_global(void *data, struct wl_registry *registry,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
registry_handle_global_remove(void *data, struct wl_registry *registry,
|
||||
uint32_t name)
|
||||
{
|
||||
static void registry_handle_global_remove(
|
||||
void *data,
|
||||
struct wl_registry *registry,
|
||||
uint32_t name
|
||||
) {
|
||||
// This space deliberately left blank
|
||||
}
|
||||
|
||||
static const struct wl_registry_listener
|
||||
wl_registry_listener = {
|
||||
static const struct wl_registry_listener wl_registry_listener = {
|
||||
.global = registry_handle_global,
|
||||
.global_remove = registry_handle_global_remove,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue