mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-20 01:40:18 -05:00
opt: change unsigned int to uint32_t
This commit is contained in:
parent
9196e2a50b
commit
b9952f03b5
20 changed files with 314 additions and 329 deletions
|
|
@ -526,16 +526,16 @@ static inline void client_set_size_bound(Client *c) {
|
|||
if (!size_hints)
|
||||
return;
|
||||
|
||||
if ((unsigned int)c->geom.width - 2 * c->bw < size_hints->min_width &&
|
||||
if ((uint32_t)c->geom.width - 2 * c->bw < size_hints->min_width &&
|
||||
size_hints->min_width > 0)
|
||||
c->geom.width = size_hints->min_width + 2 * c->bw;
|
||||
if ((unsigned int)c->geom.height - 2 * c->bw < size_hints->min_height &&
|
||||
if ((uint32_t)c->geom.height - 2 * c->bw < size_hints->min_height &&
|
||||
size_hints->min_height > 0)
|
||||
c->geom.height = size_hints->min_height + 2 * c->bw;
|
||||
if ((unsigned int)c->geom.width - 2 * c->bw > size_hints->max_width &&
|
||||
if ((uint32_t)c->geom.width - 2 * c->bw > size_hints->max_width &&
|
||||
size_hints->max_width > 0)
|
||||
c->geom.width = size_hints->max_width + 2 * c->bw;
|
||||
if ((unsigned int)c->geom.height - 2 * c->bw > size_hints->max_height &&
|
||||
if ((uint32_t)c->geom.height - 2 * c->bw > size_hints->max_height &&
|
||||
size_hints->max_height > 0)
|
||||
c->geom.height = size_hints->max_height + 2 * c->bw;
|
||||
return;
|
||||
|
|
@ -544,19 +544,19 @@ static inline void client_set_size_bound(Client *c) {
|
|||
|
||||
toplevel = c->surface.xdg->toplevel;
|
||||
state = toplevel->current;
|
||||
if ((unsigned int)c->geom.width - 2 * c->bw < state.min_width &&
|
||||
if ((uint32_t)c->geom.width - 2 * c->bw < state.min_width &&
|
||||
state.min_width > 0) {
|
||||
c->geom.width = state.min_width + 2 * c->bw;
|
||||
}
|
||||
if ((unsigned int)c->geom.height - 2 * c->bw < state.min_height &&
|
||||
if ((uint32_t)c->geom.height - 2 * c->bw < state.min_height &&
|
||||
state.min_height > 0) {
|
||||
c->geom.height = state.min_height + 2 * c->bw;
|
||||
}
|
||||
if ((unsigned int)c->geom.width - 2 * c->bw > state.max_width &&
|
||||
if ((uint32_t)c->geom.width - 2 * c->bw > state.max_width &&
|
||||
state.max_width > 0) {
|
||||
c->geom.width = state.max_width + 2 * c->bw;
|
||||
}
|
||||
if ((unsigned int)c->geom.height - 2 * c->bw > state.max_height &&
|
||||
if ((uint32_t)c->geom.height - 2 * c->bw > state.max_height &&
|
||||
state.max_height > 0) {
|
||||
c->geom.height = state.max_height + 2 * c->bw;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue