client: resize returns void
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
6a67910854
commit
8a24f5c840
11
client.c
11
client.c
|
@ -509,15 +509,14 @@ client_geometry_hints(client_t *c, area_t geometry)
|
||||||
* \param c Client to resize.
|
* \param c Client to resize.
|
||||||
* \param geometry New window geometry.
|
* \param geometry New window geometry.
|
||||||
* \param hints Use size hints.
|
* \param hints Use size hints.
|
||||||
* \return True if the client has been resized.
|
|
||||||
*/
|
*/
|
||||||
bool
|
void
|
||||||
client_resize(client_t *c, area_t geometry, bool hints)
|
client_resize(client_t *c, area_t geometry, bool hints)
|
||||||
{
|
{
|
||||||
int new_screen;
|
int new_screen;
|
||||||
area_t area;
|
area_t area;
|
||||||
layout_t *layout = layout_get_current(c->screen);
|
layout_t *layout = layout_get_current(c->screen);
|
||||||
bool resized = false, fixed;
|
bool fixed;
|
||||||
/* Values to configure a window is an array where values are
|
/* Values to configure a window is an array where values are
|
||||||
* stored according to 'value_mask' */
|
* stored according to 'value_mask' */
|
||||||
uint32_t values[5];
|
uint32_t values[5];
|
||||||
|
@ -529,7 +528,7 @@ client_resize(client_t *c, area_t geometry, bool hints)
|
||||||
geometry = client_geometry_hints(c, geometry);
|
geometry = client_geometry_hints(c, geometry);
|
||||||
|
|
||||||
if(geometry.width <= 0 || geometry.height <= 0)
|
if(geometry.width <= 0 || geometry.height <= 0)
|
||||||
return false;
|
return;
|
||||||
|
|
||||||
/* offscreen appearance fixes */
|
/* offscreen appearance fixes */
|
||||||
area = display_area_get(c->phys_screen, NULL,
|
area = display_area_get(c->phys_screen, NULL,
|
||||||
|
@ -580,16 +579,12 @@ client_resize(client_t *c, area_t geometry, bool hints)
|
||||||
|
|
||||||
if(c->screen != new_screen)
|
if(c->screen != new_screen)
|
||||||
screen_client_moveto(c, new_screen, true, false);
|
screen_client_moveto(c, new_screen, true, false);
|
||||||
|
|
||||||
resized = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* call it again like it was floating,
|
/* call it again like it was floating,
|
||||||
* we want it to be sticked to the window */
|
* we want it to be sticked to the window */
|
||||||
if(!c->ismoving && !client_isfloating(c) && layout != layout_floating)
|
if(!c->ismoving && !client_isfloating(c) && layout != layout_floating)
|
||||||
titlebar_update_geometry_floating(c);
|
titlebar_update_geometry_floating(c);
|
||||||
|
|
||||||
return resized;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set a clinet floating.
|
/** Set a clinet floating.
|
||||||
|
|
2
client.h
2
client.h
|
@ -41,7 +41,7 @@ void client_ban(client_t *);
|
||||||
void client_unban(client_t *);
|
void client_unban(client_t *);
|
||||||
void client_manage(xcb_window_t, xcb_get_geometry_reply_t *, int, int);
|
void client_manage(xcb_window_t, xcb_get_geometry_reply_t *, int, int);
|
||||||
area_t client_geometry_hints(client_t *, area_t);
|
area_t client_geometry_hints(client_t *, area_t);
|
||||||
bool client_resize(client_t *, area_t, bool);
|
void client_resize(client_t *, area_t, bool);
|
||||||
void client_unmanage(client_t *);
|
void client_unmanage(client_t *);
|
||||||
void client_saveprops_tags(client_t *);
|
void client_saveprops_tags(client_t *);
|
||||||
void client_kill(client_t *);
|
void client_kill(client_t *);
|
||||||
|
|
Loading…
Reference in New Issue