This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In order to properly manage relative layouts in rootston, the 'wlr_output_layout' has been encapsulated in 'roots_layout'. This is primarily to deal with outputs not being available to reference. This lives in rootston since compositors might want to deal differently with missing outputs. The behavior of rootston in the case of missign outputs, is to mark rules whose relative output is not available as unconfigured. When an output is unconfigured it will be placed to the right of any other outputs. This way, no gaps will occur in the layout, unless the user specifically configures them with fixed output. This commit adds the possibility to switch layouts at runtime trough the commnd 'next_layout'.
- Loading branch information
1 parent
67a2d6e
commit f97aa49
Showing
14 changed files
with
482 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef ROOTSTON_LAYOUT_H | ||
#define ROOTSTON_LAYOUT_H | ||
|
||
#include <wlr/types/wlr_output_layout.h> | ||
#include "rootston/config.h" | ||
#include "rootston/output.h" | ||
|
||
struct roots_layout_rule { | ||
struct roots_layout_rule_config *config; | ||
struct roots_output *output; | ||
struct wl_list link; | ||
bool configured; | ||
}; | ||
|
||
struct roots_layout { | ||
struct wlr_output_layout *wlr_layout; | ||
struct roots_layout_config *current_config; | ||
struct wl_list rules; | ||
}; | ||
|
||
struct roots_layout* roots_layout_create(struct roots_layout_config *config); | ||
void roots_layout_destroy(struct roots_layout *layout); | ||
void roots_layout_add_output(struct roots_layout *layout, | ||
struct roots_output *output); | ||
void roots_layout_remove_output(struct roots_layout *layout, | ||
struct roots_output *output); | ||
void roots_layout_reflow(struct roots_layout *layout); | ||
void roots_layout_reconfigure(struct roots_layout *layout, | ||
struct roots_layout_config *config); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.