mirror of
https://github.com/i3/i3.git
synced 2025-12-01 12:06:20 +00:00
1
release-notes/changes/7-fullscreen-maximized
Normal file
1
release-notes/changes/7-fullscreen-maximized
Normal file
@ -0,0 +1 @@
|
|||||||
|
mark fullscreen windows as maximized
|
||||||
14
src/con.c
14
src/con.c
@ -429,20 +429,20 @@ bool con_is_hidden(Con *con) {
|
|||||||
/*
|
/*
|
||||||
* Returns true if the container is maximized in the given orientation.
|
* Returns true if the container is maximized in the given orientation.
|
||||||
*
|
*
|
||||||
* If the container is floating or fullscreen, it is not considered maximized.
|
* If the container is floating, it is not considered maximized. Otherwise, it
|
||||||
* Otherwise, it is maximized if it doesn't share space with any other
|
* is maximized if it doesn't share space with any other container in the given
|
||||||
* container in the given orientation. For example, if a workspace contains
|
* orientation. For example, if a workspace contains a single splitv container
|
||||||
* a single splitv container with three children, none of them are considered
|
* with three children, none of them are considered vertically maximized, but
|
||||||
* vertically maximized, but they are all considered horizontally maximized.
|
* they are all considered horizontally maximized.
|
||||||
*
|
*
|
||||||
* Passing "maximized" hints to the application can help it make the right
|
* Passing "maximized" hints to the application can help it make the right
|
||||||
* choices about how to draw its borders. See discussion in
|
* choices about how to draw its borders. See discussion in
|
||||||
* https://github.com/i3/i3/pull/2380.
|
* https://github.com/i3/i3/pull/2380.
|
||||||
*/
|
*/
|
||||||
bool con_is_maximized(Con *con, orientation_t orientation) {
|
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) {
|
if (con->fullscreen_mode != CF_NONE) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Look up the container layout which corresponds to the given
|
/* Look up the container layout which corresponds to the given
|
||||||
|
|||||||
@ -57,10 +57,10 @@ subtest 'two windows in default layout', sub {
|
|||||||
};
|
};
|
||||||
|
|
||||||
cmd 'fullscreen enable';
|
cmd 'fullscreen enable';
|
||||||
ok(maximized_neither($winA), 'fullscreen windows are not maximized');
|
ok(maximized_both($winA), 'fullscreen windows are maximized');
|
||||||
|
|
||||||
cmd 'fullscreen disable';
|
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';
|
cmd 'floating enable';
|
||||||
ok(maximized_neither($winA), 'floating windows are not maximized');
|
ok(maximized_neither($winA), 'floating windows are not maximized');
|
||||||
|
|||||||
Reference in New Issue
Block a user