mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-07 04:06:51 -05:00
Merge 1d616d54ff into 8e898417a7
This commit is contained in:
commit
7ca08cba46
2 changed files with 10 additions and 6 deletions
|
|
@ -80,8 +80,8 @@ typedef struct {
|
|||
const char *monitor;
|
||||
int32_t offsetx;
|
||||
int32_t offsety;
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
float width;
|
||||
float height;
|
||||
int32_t nofocus;
|
||||
int32_t nofadein;
|
||||
int32_t nofadeout;
|
||||
|
|
@ -2058,9 +2058,9 @@ bool parse_option(Config *config, char *key, char *value) {
|
|||
} else if (strcmp(key, "no_force_center") == 0) {
|
||||
rule->no_force_center = atoi(val);
|
||||
} else if (strcmp(key, "width") == 0) {
|
||||
rule->width = atoi(val);
|
||||
rule->width = atof(val);
|
||||
} else if (strcmp(key, "height") == 0) {
|
||||
rule->height = atoi(val);
|
||||
rule->height = atof(val);
|
||||
} else if (strcmp(key, "isnoborder") == 0) {
|
||||
rule->isnoborder = atoi(val);
|
||||
} else if (strcmp(key, "isnoshadow") == 0) {
|
||||
|
|
|
|||
|
|
@ -1405,10 +1405,14 @@ void applyrules(Client *c) {
|
|||
|
||||
// set geometry of floating client
|
||||
|
||||
if (r->width > 0)
|
||||
if (r->width > 1)
|
||||
c->float_geom.width = r->width;
|
||||
if (r->height > 0)
|
||||
else
|
||||
c->float_geom.width = round(mon->m.width * r->width);
|
||||
if (r->height > 1)
|
||||
c->float_geom.height = r->height;
|
||||
else
|
||||
c->float_geom.height = round(mon->m.height * r->height);
|
||||
|
||||
if (r->width > 0 || r->height > 0) {
|
||||
c->iscustomsize = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue