mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-11-02 09:01:41 -05:00
view: unconditionally center views in output layout
Whatever type or dimensions of a view, position it at center of the output layout. Then, if it is a primary view or if it extends the output layout, send request to maximize it. The client may or may not change the view dimensions after that. If not, e.g. weston-flower, the view will be kept displayed at center instead of to left. If so, the view will expand from center to fill the whole output layout. In order to update the view position, XDG shell surface commit is now handled to check for dimension change.
This commit is contained in:
parent
e7d8780f46
commit
560e9ff3ef
4 changed files with 33 additions and 31 deletions
1
view.h
1
view.h
|
|
@ -29,6 +29,7 @@ struct cg_view {
|
|||
|
||||
/* The view has a position in layout coordinates. */
|
||||
int lx, ly;
|
||||
int width, height;
|
||||
|
||||
enum cg_view_type type;
|
||||
const struct cg_view_impl *impl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue