Require wlroots 0.17.0

This commit is contained in:
Keith Bowes 2023-11-22 10:06:39 -05:00
parent 7fb889d171
commit bceafa5b6b
18 changed files with 305 additions and 400 deletions

View file

@ -1,7 +1,6 @@
#ifndef _WB_OUTPUT_H
#define _WB_OUTPUT_H
#include <stdlib.h>
#include <time.h>
#include "waybox/server.h"
@ -32,28 +31,6 @@ struct wb_output {
struct wl_list link;
};
struct wb_view {
struct wl_list link;
struct wb_server *server;
struct wlr_xdg_toplevel *xdg_toplevel;
struct wlr_scene_tree *scene_tree;
struct wlr_xdg_toplevel_decoration_v1 *decoration;
struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
struct wl_listener new_popup;
struct wl_listener request_fullscreen;
struct wl_listener request_maximize;
struct wl_listener request_minimize;
struct wl_listener request_move;
struct wl_listener request_resize;
struct wlr_box geometry;
struct wlr_box previous_geometry;
};
void handle_gamma_control_set_gamma(struct wl_listener *listener, void *data);
void output_frame_notify(struct wl_listener *listener, void *data);
void output_destroy_notify(struct wl_listener *listener, void *data);

View file

@ -22,6 +22,8 @@
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h>
#include <stdlib.h>
#ifdef USE_NLS
# include <libintl.h>
# include <locale.h>
@ -34,7 +36,7 @@
#include "waybox/cursor.h"
#include "decoration.h"
#include "layer_shell.h"
#include "waybox/output.h"
#include "waybox/xdg_shell.h"
#include "waybox/seat.h"
struct wb_server {
@ -58,11 +60,11 @@ struct wb_server {
struct wb_cursor *cursor;
struct wb_seat *seat;
struct wb_view *grabbed_view;
struct wb_toplevel *grabbed_toplevel;
struct wlr_box grab_geo_box;
double grab_x, grab_y;
uint32_t resize_edges;
struct wl_list views;
struct wl_list toplevels;
struct wlr_layer_shell_v1 *layer_shell;
struct wlr_xdg_shell *xdg_shell;

View file

@ -3,10 +3,32 @@
#include "waybox/server.h"
struct wb_toplevel {
struct wl_list link;
struct wb_server *server;
struct wlr_xdg_toplevel *xdg_toplevel;
struct wlr_scene_tree *scene_tree;
struct wlr_xdg_toplevel_decoration_v1 *decoration;
struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
struct wl_listener new_popup;
struct wl_listener request_fullscreen;
struct wl_listener request_maximize;
struct wl_listener request_minimize;
struct wl_listener request_move;
struct wl_listener request_resize;
struct wlr_box geometry;
struct wlr_box previous_geometry;
};
void init_xdg_shell(struct wb_server *server);
void focus_view(struct wb_view *view, struct wlr_surface *surface);
struct wlr_output *get_active_output(struct wb_view *view);
struct wb_view *get_view_at(
void focus_toplevel(struct wb_toplevel *toplevel, struct wlr_surface *surface);
struct wlr_output *get_active_output(struct wb_toplevel *toplevel);
struct wb_toplevel *get_toplevel_at(
struct wb_server *server, double lx, double ly,
struct wlr_surface **surface, double *sx, double *sy);
#endif