mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
Basic workspace functionality
This commit is contained in:
parent
caee41b777
commit
8cc2c6fa7a
6 changed files with 128 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "list.h"
|
||||
#include "log.h"
|
||||
#include "layout.h"
|
||||
#include "workspace.h"
|
||||
|
||||
swayc_t root_container;
|
||||
|
||||
|
|
@ -314,11 +315,14 @@ void add_output(wlc_handle output) {
|
|||
|
||||
swayc_t *workspace = create_container(container, -1);
|
||||
workspace->type = C_WORKSPACE;
|
||||
workspace->name = workspace_next_name();
|
||||
workspace->width = size->w; // TODO: gaps
|
||||
workspace->height = size->h;
|
||||
workspace->layout = L_HORIZ; // TODO: Get default layout from config
|
||||
add_child(container, workspace);
|
||||
|
||||
workspace_switch(workspace);
|
||||
|
||||
if (root_container.focused == NULL) {
|
||||
unfocus_all(&root_container);
|
||||
focus_view(workspace);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue