diff --git a/release-notes/changes/7-fullscreen-maximized b/release-notes/changes/7-fullscreen-maximized new file mode 100644 index 00000000..d77b9906 --- /dev/null +++ b/release-notes/changes/7-fullscreen-maximized @@ -0,0 +1 @@ +mark fullscreen windows as maximized diff --git a/src/con.c b/src/con.c index abcc4fba..6daf6ce6 100644 --- a/src/con.c +++ b/src/con.c @@ -429,20 +429,20 @@ bool con_is_hidden(Con *con) { /* * Returns true if the container is maximized in the given orientation. * - * If the container is floating or fullscreen, it is not considered maximized. - * Otherwise, it is maximized if it doesn't share space with any other - * container in the given orientation. For example, if a workspace contains - * a single splitv container with three children, none of them are considered - * vertically maximized, but they are all considered horizontally maximized. + * If the container is floating, it is not considered maximized. Otherwise, it + * is maximized if it doesn't share space with any other container in the given + * orientation. For example, if a workspace contains a single splitv container + * with three children, none of them are considered vertically maximized, but + * they are all considered horizontally maximized. * * Passing "maximized" hints to the application can help it make the right * choices about how to draw its borders. See discussion in * https://github.com/i3/i3/pull/2380. */ bool con_is_maximized(Con *con, orientation_t orientation) { - /* Fullscreen containers are not considered maximized. */ + /* Fullscreen containers are considered maximized. */ if (con->fullscreen_mode != CF_NONE) { - return false; + return true; } /* Look up the container layout which corresponds to the given diff --git a/testcases/t/551-net-wm-state-maximized.t b/testcases/t/551-net-wm-state-maximized.t index 81ebcd92..fcd2a067 100644 --- a/testcases/t/551-net-wm-state-maximized.t +++ b/testcases/t/551-net-wm-state-maximized.t @@ -57,10 +57,10 @@ subtest 'two windows in default layout', sub { }; cmd 'fullscreen enable'; -ok(maximized_neither($winA), 'fullscreen windows are not maximized'); +ok(maximized_both($winA), 'fullscreen windows are maximized'); cmd 'fullscreen disable'; -ok(maximized_both($winA), 'disabling fullscreen sets maximized to true again'); +ok(maximized_both($winA), 'disabling fullscreen retains maximized'); cmd 'floating enable'; ok(maximized_neither($winA), 'floating windows are not maximized');