Wire up output frame loop

This commit is contained in:
Drew DeVault 2017-11-11 14:41:18 -05:00
parent 7eafcc75f6
commit 1efd5f819f
10 changed files with 75 additions and 13 deletions

View file

@ -4,7 +4,6 @@
#include <wlc/wlc.h>
#include <wlr/types/wlr_output.h>
#include <stdint.h>
#include "list.h"
typedef struct sway_container swayc_t;
@ -76,7 +75,7 @@ struct sway_container {
wlc_handle handle;
union {
struct wlr_output *output;
struct sway_output *output;
} _handle;
/**
@ -186,10 +185,11 @@ enum visibility_mask {
VISIBLE = true
} visible;
struct sway_output;
/**
* Allocates a new output container.
*/
swayc_t *new_output(struct wlr_output *wlr_output);
swayc_t *new_output(struct sway_output *sway_output);
/**
* Allocates a new workspace container.
*/

View file

@ -1,9 +1,20 @@
#ifndef _SWAY_OUTPUT_H
#define _SWAY_OUTPUT_H
#include <time.h>
#include <wayland-server.h>
#include <wlr/types/wlr_output.h>
#include "container.h"
#include "focus.h"
struct sway_server;
struct sway_output {
struct wlr_output *wlr_output;
struct wl_listener frame;
struct sway_server *server;
struct timespec last_frame;
};
// Position is absolute coordinates on the edge where the adjacent output
// should be searched for.
swayc_t *output_by_name(const char* name, const struct wlc_point *abs_pos);

View file

@ -33,5 +33,6 @@ void server_fini(struct sway_server *server);
void server_run(struct sway_server *server);
void output_add_notify(struct wl_listener *listener, void *data);
void output_remove_notify(struct wl_listener *listener, void *data);
#endif