aboutsummaryrefslogtreecommitdiff
path: root/include/rootston
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-08 09:22:44 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-08 09:22:44 -0500
commit35188834db182db43b407b58db167950fab05477 (patch)
tree4ce63cc7f7f01f1e7cf7fb0f6994c4306ae4cad2 /include/rootston
parente3542d879d50d6239ad4ca24b4d30520fef40a87 (diff)
parent381a646d2fbcb1b488e1551438444ac267f39138 (diff)
Merge branch 'master' into feature/xwm-selection
Diffstat (limited to 'include/rootston')
-rw-r--r--include/rootston/cursor.h7
-rw-r--r--include/rootston/desktop.h11
-rw-r--r--include/rootston/view.h19
-rw-r--r--include/rootston/xcursor.h4
4 files changed, 26 insertions, 15 deletions
diff --git a/include/rootston/cursor.h b/include/rootston/cursor.h
index e2a371bf..2d9a9215 100644
--- a/include/rootston/cursor.h
+++ b/include/rootston/cursor.h
@@ -10,13 +10,6 @@ enum roots_cursor_mode {
ROOTS_CURSOR_ROTATE = 3,
};
-enum roots_cursor_resize_edge {
- ROOTS_CURSOR_RESIZE_EDGE_TOP = 1,
- ROOTS_CURSOR_RESIZE_EDGE_BOTTOM = 2,
- ROOTS_CURSOR_RESIZE_EDGE_LEFT = 4,
- ROOTS_CURSOR_RESIZE_EDGE_RIGHT = 8,
-};
-
struct roots_input_event {
uint32_t serial;
struct wlr_cursor *cursor;
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h
index c245eb09..e5c5f806 100644
--- a/include/rootston/desktop.h
+++ b/include/rootston/desktop.h
@@ -19,13 +19,14 @@ struct roots_output {
struct wlr_output *wlr_output;
struct wl_listener frame;
struct timespec last_frame;
- struct wl_list link;
+ struct wl_list link; // roots_desktop:outputs
+ struct roots_view *fullscreen_view;
};
struct roots_desktop {
struct wl_list views; // roots_view::link
- struct wl_list outputs;
+ struct wl_list outputs; // roots_output::link
struct timespec last_frame;
struct roots_server *server;
@@ -59,11 +60,13 @@ struct roots_server;
struct roots_desktop *desktop_create(struct roots_server *server,
struct roots_config *config);
void desktop_destroy(struct roots_desktop *desktop);
+struct roots_output *desktop_output_from_wlr_output(
+ struct roots_desktop *desktop, struct wlr_output *output);
+struct roots_view *desktop_view_at(struct roots_desktop *desktop, double lx,
+ double ly, struct wlr_surface **surface, double *sx, double *sy);
void view_init(struct roots_view *view, struct roots_desktop *desktop);
void view_destroy(struct roots_view *view);
-struct roots_view *view_at(struct roots_desktop *desktop, double lx, double ly,
- struct wlr_surface **surface, double *sx, double *sy);
void view_activate(struct roots_view *view, bool activate);
void output_add_notify(struct wl_listener *listener, void *data);
diff --git a/include/rootston/view.h b/include/rootston/view.h
index 69034d60..bb7297d0 100644
--- a/include/rootston/view.h
+++ b/include/rootston/view.h
@@ -12,7 +12,8 @@ struct roots_wl_shell_surface {
struct wl_listener destroy;
struct wl_listener request_move;
struct wl_listener request_resize;
- struct wl_listener request_set_maximized;
+ struct wl_listener request_maximize;
+ struct wl_listener request_fullscreen;
struct wl_listener set_state;
struct wl_listener surface_commit;
@@ -26,6 +27,9 @@ struct roots_xdg_surface_v6 {
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_maximize;
+ struct wl_listener request_fullscreen;
+
+ uint32_t pending_move_resize_configure_serial;
};
struct roots_xwayland_surface {
@@ -36,8 +40,11 @@ struct roots_xwayland_surface {
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_maximize;
+ struct wl_listener request_fullscreen;
struct wl_listener map_notify;
struct wl_listener unmap_notify;
+
+ struct wl_listener surface_commit;
};
enum roots_view_type {
@@ -54,12 +61,19 @@ struct roots_view {
float rotation;
bool maximized;
+ struct roots_output *fullscreen_output;
struct {
double x, y;
uint32_t width, height;
float rotation;
} saved;
+ struct {
+ bool update_x, update_y;
+ double x, y;
+ uint32_t width, height;
+ } pending_move_resize;
+
// TODO: Something for roots-enforced width/height
enum roots_view_type type;
union {
@@ -93,6 +107,7 @@ struct roots_view {
void (*move_resize)(struct roots_view *view, double x, double y,
uint32_t width, uint32_t height);
void (*maximize)(struct roots_view *view, bool maximized);
+ void (*set_fullscreen)(struct roots_view *view, bool fullscreen);
void (*close)(struct roots_view *view);
};
@@ -103,6 +118,8 @@ void view_resize(struct roots_view *view, uint32_t width, uint32_t height);
void view_move_resize(struct roots_view *view, double x, double y,
uint32_t width, uint32_t height);
void view_maximize(struct roots_view *view, bool maximized);
+void view_set_fullscreen(struct roots_view *view, bool fullscreen,
+ struct wlr_output *output);
void view_close(struct roots_view *view);
bool view_center(struct roots_view *view);
void view_setup(struct roots_view *view);
diff --git a/include/rootston/xcursor.h b/include/rootston/xcursor.h
index bc00f79c..a7d2b960 100644
--- a/include/rootston/xcursor.h
+++ b/include/rootston/xcursor.h
@@ -3,12 +3,10 @@
#include <stdint.h>
-#define ROOTS_XCURSOR_SIZE 16
+#define ROOTS_XCURSOR_SIZE 24
#define ROOTS_XCURSOR_DEFAULT "left_ptr"
#define ROOTS_XCURSOR_MOVE "grabbing"
#define ROOTS_XCURSOR_ROTATE "grabbing"
-const char *roots_xcursor_get_resize_name(uint32_t edges);
-
#endif