summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar jdiez17 <jose.manuel.diez@gmail.com>2015-08-10 02:39:54 +0200
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-08-09 20:49:58 -0400
commitb922e1cb29198c841d81090542d309e2be6f8ba9 (patch)
tree44994455793c99fbcf6fde44e08b08b90b38176e
parentKeep track of window names (diff)
downloadsway-b922e1cb29198c841d81090542d309e2be6f8ba9.tar.gz
sway-b922e1cb29198c841d81090542d309e2be6f8ba9.tar.zst
sway-b922e1cb29198c841d81090542d309e2be6f8ba9.zip
fullscreen: partially working
-rw-r--r--sway/layout.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 2913daa9..affcb83e 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -41,11 +41,30 @@ void arrange_windows(swayc_t *container, int width, int height) {
41 } 41 }
42 return; 42 return;
43 case C_VIEW: 43 case C_VIEW:
44 sway_log(L_DEBUG, "Setting view to %d x %d @ %d, %d", width, height, container->x, container->y);
45 // If the view is fullscreen, we need to tell wlc to draw it as such 44 // If the view is fullscreen, we need to tell wlc to draw it as such
46 if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN > 0) { 45 if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) {
47 sway_log(L_DEBUG, "window is fullscreen!"); 46 swayc_t *parent = container;
47 do {
48 parent = parent->parent;
49 } while(parent->type != C_OUTPUT);
50
51 sway_log(L_DEBUG, "res %d %d", parent->width, parent->height);
52 struct wlc_geometry geometry = {
53 .origin = {
54 .x = 0,
55 .y = 0
56 },
57 .size = {
58 .w = parent->width,
59 .h = parent->height
60 }
61 };
62
63 wlc_view_set_geometry(container->handle, &geometry);
64 return;
48 } 65 }
66
67 sway_log(L_DEBUG, "Setting view to %d x %d @ %d, %d", width, height, container->x, container->y);
49 struct wlc_geometry geometry = { 68 struct wlc_geometry geometry = {
50 .origin = { 69 .origin = {
51 .x = container->x, 70 .x = container->x,