aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/commands.c2
-rw-r--r--sway/container.c4
-rw-r--r--sway/handlers.c4
-rw-r--r--sway/main.c4
-rw-r--r--sway/sway.1.txt8
5 files changed, 13 insertions, 9 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 3a4079e4..4e5bc712 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1439,7 +1439,7 @@ static struct cmd_results *cmd_fullscreen(int argc, char **argv) {
wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current);
// Resize workspace if going from fullscreen -> notfullscreen
// otherwise just resize container
- if (current) {
+ if (!current) {
arrange_windows(workspace, -1, -1);
workspace->fullscreen = container;
} else {
diff --git a/sway/container.c b/sway/container.c
index dcf4dcc8..63374f9e 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -149,7 +149,7 @@ swayc_t *new_output(wlc_handle handle) {
ws->is_focused = true;
free(ws_name);
-
+
return output;
}
@@ -354,7 +354,7 @@ swayc_t *destroy_workspace(swayc_t *workspace) {
if (!ASSERT_NONNULL(workspace)) {
return NULL;
}
-
+
// Do not destroy this if it's the last workspace on this output
swayc_t *output = swayc_parent_by_type(workspace, C_OUTPUT);
if (output && output->children->length == 1) {
diff --git a/sway/handlers.c b/sway/handlers.c
index db3a0206..470f3c95 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -221,6 +221,10 @@ static bool handle_view_created(wlc_handle handle) {
// refocus in-between command lists
set_focused_container(newview);
}
+ swayc_t *workspace = swayc_parent_by_type(focused, C_WORKSPACE);
+ if (workspace && workspace->fullscreen) {
+ set_focused_container(workspace->fullscreen);
+ }
} else {
swayc_t *output = swayc_parent_by_type(focused, C_OUTPUT);
wlc_handle *h = malloc(sizeof(wlc_handle));
diff --git a/sway/main.c b/sway/main.c
index 37681f2d..e85f7269 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -188,13 +188,13 @@ int main(int argc, char **argv) {
sway_log(L_INFO, "Starting sway version %s (%s, branch \"%s\")\n", SWAY_GIT_VERSION, SWAY_VERSION_DATE, SWAY_GIT_BRANCH);
#endif
+ init_layout();
+
if (validate) {
bool valid = load_config(config_path);
return valid ? 0 : 1;
}
- init_layout();
-
if (!load_config(config_path)) {
sway_log(L_ERROR, "Error(s) loading config!");
}
diff --git a/sway/sway.1.txt b/sway/sway.1.txt
index 402b2d77..b073e552 100644
--- a/sway/sway.1.txt
+++ b/sway/sway.1.txt
@@ -68,10 +68,10 @@ Configuration
If _-c_ is not specified, sway will look in several locations for your config
file. The suggested location for your config file is ~/.config/sway/config.
~/.sway/config will also work, and the rest of the usual XDG config locations
-are supported. At last, sway looks for a config file in a fallback directory,
-which is /etc/sway/ by default. A standard configuration file is installed at
-this location. If no sway config is found, sway will attempt to load an i3
-config from all the config locations i3 supports. If still nothing is found,
+are supported. If no sway config is found, sway will attempt to load an i3
+config from all the config locations i3 supports. At last, sway looks for a
+config file in a fallback directory, which is /etc/sway/ by default. A standard
+configuration file is installed at this location. If still nothing is found,
you will receive an error.
For information on the config file format, see **sway**(5).