parent
45d8f98fd5
commit
d05eed3c01
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.
|
||||
*
|
||||
* 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
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user