workspaces
This commit is contained in:
+2
-2
@@ -8,10 +8,10 @@ OBJ_FILES = $(SRC_FILES:src/%.c=build/%.o)
|
||||
all: proto $(TARGET)
|
||||
|
||||
xdg-shell-protocol.h:
|
||||
$(WAYLAND_SCANNER) server-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
|
||||
$(WAYLAND_SCANNER) server-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
|
||||
|
||||
wlr-layer-shell-unstable-v1-protocol.h:
|
||||
$(WAYLAND_SCANNER) server-header ./protocols/wlr-layer-shell-unstable-v1.xml wlr-layer-shell-unstable-v1-protocol.h
|
||||
$(WAYLAND_SCANNER) server-header ./protocols/wlr-layer-shell-unstable-v1.xml $@
|
||||
|
||||
proto: xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ OBJ_FILES = $(SRC_FILES:src/%.c=build/%.o)
|
||||
all: proto $(TARGET)
|
||||
|
||||
xdg-shell-protocol.h:
|
||||
$(WAYLAND_SCANNER) server-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.h
|
||||
$(WAYLAND_SCANNER) server-header $(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml ${.TARGET}
|
||||
|
||||
wlr-layer-shell-unstable-v1-protocol.h:
|
||||
$(WAYLAND_SCANNER) server-header ./protocols/wlr-layer-shell-unstable-v1.xml wlr-layer-shell-unstable-v1-protocol.h
|
||||
$(WAYLAND_SCANNER) server-header ./protocols/wlr-layer-shell-unstable-v1.xml ${.TARGET}
|
||||
|
||||
proto: xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h
|
||||
|
||||
|
||||
+1
-1
@@ -16,8 +16,8 @@ static const float focused_bc[4] = { 0.0, 0.0, 1.0, 1.0 };
|
||||
static const float urgent_bc[4] = { 1.0, 0.0, 0.0, 1.0 };
|
||||
static const float unfocused_bc[4] = { 0.28, 0.28, 0.28, 1.0 };
|
||||
|
||||
#define STACK_SIZE 0.5
|
||||
#define STACK_COUNT 1
|
||||
#define STACK_SIZE 0.5
|
||||
|
||||
#define OUTPUT_GAP 10
|
||||
#define LAYOUT_GAP 5
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ setup(absn_server *server)
|
||||
LISTEN(server->new_xdg_popup, new_xdg_popup,
|
||||
server->xdg_shell->events.new_popup);
|
||||
|
||||
/* cursor setup */
|
||||
/* cursor */
|
||||
server->cursor = wlr_cursor_create();
|
||||
wlr_cursor_attach_output_layout(server->cursor, server->output_layout);
|
||||
|
||||
|
||||
+8
-2
@@ -1,3 +1,5 @@
|
||||
#include <wlr/util/log.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "toplevel.h"
|
||||
#include "types.h"
|
||||
@@ -50,12 +52,16 @@ layout_arrange(struct absn_output *output)
|
||||
int32_t total_lg;
|
||||
|
||||
int mcount = output->workspace->count;
|
||||
int msize = output->workspace->size;
|
||||
float msize = output->workspace->size;
|
||||
|
||||
int32_t main_stack_width = (toplevels_count <= mcount) ?
|
||||
output->geom.width - 2 * og :
|
||||
msize * (output->geom.width - 2 * og);
|
||||
|
||||
int32_t w = output->geom.width - main_stack_width - 2 * og - lg;
|
||||
|
||||
wlr_log(WLR_ERROR, "%d, %d", main_stack_width, w);
|
||||
|
||||
int32_t pure_h;
|
||||
int32_t h;
|
||||
int32_t cur_h;
|
||||
@@ -130,7 +136,7 @@ layout_arrange(struct absn_output *output)
|
||||
og;
|
||||
new_geom.y = output->geom.y + dy;
|
||||
new_geom.width = w;
|
||||
new_geom.height = h;
|
||||
new_geom.height = cur_h;
|
||||
|
||||
toplevel_set_geom(toplevel, &new_geom);
|
||||
|
||||
|
||||
@@ -50,8 +50,6 @@ new_output(struct wl_listener *listener, void *data)
|
||||
if (!server->workspaces[i].output) {
|
||||
server->workspaces[i].output = output;
|
||||
output->workspace = &server->workspaces[i];
|
||||
output->workspace->count = STACK_COUNT;
|
||||
output->workspace->count = STACK_SIZE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user