mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-02 01:40:16 -05:00
opt: change unsigned int to uint32_t
This commit is contained in:
parent
ca3ff578fa
commit
9bf87a9610
20 changed files with 313 additions and 328 deletions
|
|
@ -528,16 +528,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;
|
||||
|
|
@ -546,19 +546,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