opt: change unsigned int to uint32_t
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user