diff options
| author | Dana Jansens <danakj@orodu.net> | 2012-10-01 21:43:56 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2012-10-06 23:04:57 -0400 |
| commit | 10a833b2cba11349a57071a7538cae9a560b8cc9 (patch) | |
| tree | 661456c5b74cafa939eaa97287ff6b823ce205bf /data/rc.xsd | |
| parent | 5e282dae08be3b900e0337efa0fae8f3ffa92cd7 (diff) | |
Allow application rules to control window size (Fix bug 4661)
Use the following in your per-app rules:
<size>
<width>A</width>
<height>B</height>
</size>
A and B can be integer values to specify a size in pixels. They can also be
percentages or fractions to be relative to the size of the monitor the window
is placed on.
Diffstat (limited to 'data/rc.xsd')
| -rw-r--r-- | data/rc.xsd | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/data/rc.xsd b/data/rc.xsd index 79a3571f..425d53c9 100644 --- a/data/rc.xsd +++ b/data/rc.xsd @@ -233,11 +233,18 @@ </xsd:all> <xsd:attribute name="force" type="ob:bool"/> </xsd:complexType> + <xsd:complexType name="window_size"> + <xsd:all> + <xsd:element name="width" type="ob:size_value"/> + <xsd:element name="height" type="ob:size_value"/> + </xsd:all> + </xsd:complexType> <xsd:complexType name="application"> <xsd:all> <xsd:element minOccurs="0" name="decor" type="ob:bool"/> <xsd:element minOccurs="0" name="shade" type="ob:bool"/> <xsd:element minOccurs="0" name="position" type="ob:window_position"/> + <xsd:element minOccurs="0" name="size" type="ob:window_size"/> <xsd:element minOccurs="0" name="focus" type="xsd:string"/> <xsd:element minOccurs="0" name="desktop" type="xsd:integer"/> <xsd:element minOccurs="0" name="layer" type="ob:layer"/> @@ -418,7 +425,12 @@ <xsd:restriction base="xsd:string"> <!-- ob: atoi($_) unless $_ eq 'center'; --> <!-- I think the regexp DTRT WRT atoi. --> - <xsd:pattern value="center|-?(0|[1-9][0-9]*)"/> + <xsd:pattern value="default|center|-?(0|[1-9][0-9]*)(|%|/[1-9][0-9]*)"/> + </xsd:restriction> + </xsd:simpleType> + <xsd:simpleType name="size_value"> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="default|([1-9][0-9]*)(|%|/[1-9][0-9]*)"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="mouse_or_int"> |
