client_resize(): Stop trying to force on screen
The code here made sure that clients were not moved outside of the root window. However, that's not enough, because clients can still end up inside the root window, but outside of anything that is visible in some output. Thus, just remove this. Related-to: https://github.com/awesomeWM/awesome/issues/318 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
c9bfd934e7
commit
c57208d1a8
|
@ -1743,20 +1743,6 @@ client_resize_do(client_t *c, area_t geometry)
|
||||||
bool
|
bool
|
||||||
client_resize(client_t *c, area_t geometry, bool honor_hints)
|
client_resize(client_t *c, area_t geometry, bool honor_hints)
|
||||||
{
|
{
|
||||||
area_t area;
|
|
||||||
|
|
||||||
/* offscreen appearance fixes */
|
|
||||||
area = display_area_get();
|
|
||||||
|
|
||||||
if(geometry.x > area.width)
|
|
||||||
geometry.x = area.width - geometry.width;
|
|
||||||
if(geometry.y > area.height)
|
|
||||||
geometry.y = area.height - geometry.height;
|
|
||||||
if(geometry.x + geometry.width < 0)
|
|
||||||
geometry.x = 0;
|
|
||||||
if(geometry.y + geometry.height < 0)
|
|
||||||
geometry.y = 0;
|
|
||||||
|
|
||||||
if (honor_hints) {
|
if (honor_hints) {
|
||||||
/* We could get integer underflows in client_remove_titlebar_geometry()
|
/* We could get integer underflows in client_remove_titlebar_geometry()
|
||||||
* without these checks here.
|
* without these checks here.
|
||||||
|
|
|
@ -859,20 +859,6 @@ void screen_update_workarea(screen_t *screen)
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get display info.
|
|
||||||
* \return The display area.
|
|
||||||
*/
|
|
||||||
area_t
|
|
||||||
display_area_get(void)
|
|
||||||
{
|
|
||||||
xcb_screen_t *s = globalconf.screen;
|
|
||||||
area_t area = { .x = 0,
|
|
||||||
.y = 0,
|
|
||||||
.width = s->width_in_pixels,
|
|
||||||
.height = s->height_in_pixels };
|
|
||||||
return area;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Move a client to a virtual screen.
|
/** Move a client to a virtual screen.
|
||||||
* \param c The client to move.
|
* \param c The client to move.
|
||||||
* \param new_screen The destination screen.
|
* \param new_screen The destination screen.
|
||||||
|
|
|
@ -52,7 +52,6 @@ screen_t *screen_getbycoord(int, int);
|
||||||
bool screen_coord_in_screen(screen_t *, int, int);
|
bool screen_coord_in_screen(screen_t *, int, int);
|
||||||
bool screen_area_in_screen(screen_t *, area_t);
|
bool screen_area_in_screen(screen_t *, area_t);
|
||||||
int screen_get_index(screen_t *);
|
int screen_get_index(screen_t *);
|
||||||
area_t display_area_get(void);
|
|
||||||
void screen_client_moveto(client_t *, screen_t *, bool);
|
void screen_client_moveto(client_t *, screen_t *, bool);
|
||||||
void screen_update_primary(void);
|
void screen_update_primary(void);
|
||||||
void screen_update_workarea(screen_t *);
|
void screen_update_workarea(screen_t *);
|
||||||
|
|
Loading…
Reference in New Issue