mirror of
https://github.com/wizbright/waybox.git
synced 2025-11-07 13:29:58 -05:00
Replaced the old mcwayface rendering code with tinywl's xdg_shell code,
allowing it to compile with wlroots 0.9.0+
This commit is contained in:
parent
fe78796f7f
commit
874c844ce0
8 changed files with 291 additions and 16 deletions
|
|
@ -28,6 +28,20 @@ struct wb_output {
|
|||
struct wl_list link;
|
||||
};
|
||||
|
||||
struct wb_view {
|
||||
struct wl_list link;
|
||||
struct wb_server *server;
|
||||
struct wlr_xdg_surface *xdg_surface;
|
||||
|
||||
struct wl_listener map;
|
||||
struct wl_listener unmap;
|
||||
struct wl_listener destroy;
|
||||
struct wl_listener request_move;
|
||||
struct wl_listener request_resize;
|
||||
bool mapped;
|
||||
int x, y;
|
||||
};
|
||||
|
||||
void output_frame_notify(struct wl_listener* listener, void *data);
|
||||
void output_destroy_notify(struct wl_listener* listener, void *data);
|
||||
void new_output_notify(struct wl_listener* listener, void *data);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,12 @@
|
|||
#include "waybox/cursor.h"
|
||||
#include "waybox/seat.h"
|
||||
|
||||
enum wb_cursor_mode {
|
||||
WB_CURSOR_PASSTHROUGH,
|
||||
WB_CURSOR_MOVE,
|
||||
WB_CURSOR_RESIZE,
|
||||
};
|
||||
|
||||
struct wb_server {
|
||||
struct wl_display *wl_display;
|
||||
struct wl_event_loop *wl_event_loop;
|
||||
|
|
@ -38,6 +44,16 @@ struct wb_server {
|
|||
struct wb_cursor *cursor;
|
||||
struct wb_seat * seat;
|
||||
|
||||
enum wb_cursor_mode cursor_mode;
|
||||
struct wb_view *grabbed_view;
|
||||
double grab_x, grab_y;
|
||||
int grab_width, grab_height;
|
||||
uint32_t resize_edges;
|
||||
|
||||
struct wlr_xdg_shell *xdg_shell;
|
||||
struct wl_listener new_xdg_surface;
|
||||
struct wl_list views;
|
||||
|
||||
struct wl_listener new_output;
|
||||
struct wl_listener new_input;
|
||||
struct wl_list outputs; // wb_output::link
|
||||
|
|
|
|||
3
include/waybox/xdg_shell.h
Normal file
3
include/waybox/xdg_shell.h
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#include "waybox/server.h"
|
||||
|
||||
void init_xdg_shell(struct wb_server *server);
|
||||
Loading…
Add table
Add a link
Reference in a new issue