diff options
| author | bakkeby <[email protected]> | 2020-08-27 06:26:48 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-08-27 06:26:48 +0200 |
| commit | e952cc9a81c00997cfd8d7115a83724769af463d (patch) | |
| tree | 2c7129eade678e7340789ab6e8e62da3754306b9 /patch/fullscreen.c | |
| parent | f45acf87959d42808a198042efe2cc6185ce7fd1 (diff) | |
| download | dwm-flexipatch-e952cc9a81c00997cfd8d7115a83724769af463d.tar.gz dwm-flexipatch-e952cc9a81c00997cfd8d7115a83724769af463d.zip | |
Minor refactoring of warp and fullscreen patches, getting rid of MONOCLE_LAYOUT_POS setting
Diffstat (limited to 'patch/fullscreen.c')
| -rw-r--r-- | patch/fullscreen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/patch/fullscreen.c b/patch/fullscreen.c index ac50f37..f0f2726 100644 --- a/patch/fullscreen.c +++ b/patch/fullscreen.c @@ -3,9 +3,11 @@ Layout *last_layout; void fullscreen(const Arg *arg) { + int monocle_pos; if (selmon->showbar || last_layout == NULL) { + for (monocle_pos = 0, last_layout = (Layout *)layouts; !last_layout->arrange || last_layout->arrange != &monocle; monocle_pos++, last_layout++ ); for (last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++); - setlayout(&((Arg) { .v = &layouts[MONOCLE_LAYOUT_POS] })); + setlayout(&((Arg) { .v = &layouts[monocle_pos] })); } else { setlayout(&((Arg) { .v = last_layout })); } |
