aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-04-16 20:36:40 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-04-16 20:36:40 +1000
commit52420cc24d61db8d22cf0d391f1f84b37bf087d5 (patch)
treef975a3708c0d1562a8d2fcdceaed9a76aadbf1f4 /include/sway
parentMerge pull request #1816 from thejan2009/multi-output-ws-destroy (diff)
downloadsway-52420cc24d61db8d22cf0d391f1f84b37bf087d5.tar.gz
sway-52420cc24d61db8d22cf0d391f1f84b37bf087d5.tar.zst
sway-52420cc24d61db8d22cf0d391f1f84b37bf087d5.zip
Implement fullscreen.
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/ipc-server.h1
-rw-r--r--include/sway/tree/container.h4
-rw-r--r--include/sway/tree/view.h9
3 files changed, 14 insertions, 0 deletions
diff --git a/include/sway/ipc-server.h b/include/sway/ipc-server.h
index c3389fe8..dd16a175 100644
--- a/include/sway/ipc-server.h
+++ b/include/sway/ipc-server.h
@@ -1,6 +1,7 @@
1#ifndef _SWAY_IPC_SERVER_H 1#ifndef _SWAY_IPC_SERVER_H
2#define _SWAY_IPC_SERVER_H 2#define _SWAY_IPC_SERVER_H
3#include <sys/socket.h> 3#include <sys/socket.h>
4#include "sway/config.h"
4#include "sway/tree/container.h" 5#include "sway/tree/container.h"
5#include "ipc.h" 6#include "ipc.h"
6 7
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 2a8b8aba..22bd7240 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -72,9 +72,13 @@ struct sway_container {
72 // For C_OUTPUT, this is the output position in layout coordinates 72 // For C_OUTPUT, this is the output position in layout coordinates
73 // For other types, this is the position in output-local coordinates 73 // For other types, this is the position in output-local coordinates
74 double x, y; 74 double x, y;
75 double saved_x, saved_y;
75 // does not include borders or gaps. 76 // does not include borders or gaps.
76 double width, height; 77 double width, height;
77 78
79 // For C_WORKSPACE only
80 struct sway_view *fullscreen;
81
78 list_t *children; 82 list_t *children;
79 83
80 struct sway_container *parent; 84 struct sway_container *parent;
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index b51c54b5..73d5f6c7 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -28,6 +28,7 @@ struct sway_view_impl {
28 void (*configure)(struct sway_view *view, double ox, double oy, int width, 28 void (*configure)(struct sway_view *view, double ox, double oy, int width,
29 int height); 29 int height);
30 void (*set_activated)(struct sway_view *view, bool activated); 30 void (*set_activated)(struct sway_view *view, bool activated);
31 void (*set_fullscreen)(struct sway_view *view, bool fullscreen);
31 void (*for_each_surface)(struct sway_view *view, 32 void (*for_each_surface)(struct sway_view *view,
32 wlr_surface_iterator_func_t iterator, void *user_data); 33 wlr_surface_iterator_func_t iterator, void *user_data);
33 void (*close)(struct sway_view *view); 34 void (*close)(struct sway_view *view);
@@ -41,6 +42,8 @@ struct sway_view {
41 struct sway_container *swayc; // NULL for unmanaged views 42 struct sway_container *swayc; // NULL for unmanaged views
42 struct wlr_surface *surface; // NULL for unmapped views 43 struct wlr_surface *surface; // NULL for unmapped views
43 int width, height; 44 int width, height;
45 int saved_width, saved_height;
46 bool is_fullscreen;
44 47
45 union { 48 union {
46 struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; 49 struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6;
@@ -63,6 +66,7 @@ struct sway_xdg_shell_v6_view {
63 struct wl_listener request_move; 66 struct wl_listener request_move;
64 struct wl_listener request_resize; 67 struct wl_listener request_resize;
65 struct wl_listener request_maximize; 68 struct wl_listener request_maximize;
69 struct wl_listener request_fullscreen;
66 struct wl_listener new_popup; 70 struct wl_listener new_popup;
67 struct wl_listener map; 71 struct wl_listener map;
68 struct wl_listener unmap; 72 struct wl_listener unmap;
@@ -79,6 +83,7 @@ struct sway_xwayland_view {
79 struct wl_listener request_resize; 83 struct wl_listener request_resize;
80 struct wl_listener request_maximize; 84 struct wl_listener request_maximize;
81 struct wl_listener request_configure; 85 struct wl_listener request_configure;
86 struct wl_listener request_fullscreen;
82 struct wl_listener map; 87 struct wl_listener map;
83 struct wl_listener unmap; 88 struct wl_listener unmap;
84 struct wl_listener destroy; 89 struct wl_listener destroy;
@@ -93,6 +98,7 @@ struct sway_xwayland_unmanaged {
93 int lx, ly; 98 int lx, ly;
94 99
95 struct wl_listener request_configure; 100 struct wl_listener request_configure;
101 struct wl_listener request_fullscreen;
96 struct wl_listener commit; 102 struct wl_listener commit;
97 struct wl_listener map; 103 struct wl_listener map;
98 struct wl_listener unmap; 104 struct wl_listener unmap;
@@ -106,6 +112,7 @@ struct sway_wl_shell_view {
106 struct wl_listener request_move; 112 struct wl_listener request_move;
107 struct wl_listener request_resize; 113 struct wl_listener request_resize;
108 struct wl_listener request_maximize; 114 struct wl_listener request_maximize;
115 struct wl_listener request_fullscreen;
109 struct wl_listener destroy; 116 struct wl_listener destroy;
110 117
111 int pending_width, pending_height; 118 int pending_width, pending_height;
@@ -155,6 +162,8 @@ void view_configure(struct sway_view *view, double ox, double oy, int width,
155 162
156void view_set_activated(struct sway_view *view, bool activated); 163void view_set_activated(struct sway_view *view, bool activated);
157 164
165void view_set_fullscreen(struct sway_view *view, bool fullscreen);
166
158void view_close(struct sway_view *view); 167void view_close(struct sway_view *view);
159 168
160void view_damage(struct sway_view *view, bool whole); 169void view_damage(struct sway_view *view, bool whole);