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:
Uli Schlachter 2017-05-13 12:02:40 +02:00
parent c9bfd934e7
commit c57208d1a8
3 changed files with 0 additions and 29 deletions

View file

@ -1743,20 +1743,6 @@ client_resize_do(client_t *c, area_t geometry)
bool
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) {
/* We could get integer underflows in client_remove_titlebar_geometry()
* without these checks here.

View file

@ -859,20 +859,6 @@ void screen_update_workarea(screen_t *screen)
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.
* \param c The client to move.
* \param new_screen The destination screen.

View file

@ -52,7 +52,6 @@ screen_t *screen_getbycoord(int, int);
bool screen_coord_in_screen(screen_t *, int, int);
bool screen_area_in_screen(screen_t *, area_t);
int screen_get_index(screen_t *);
area_t display_area_get(void);
void screen_client_moveto(client_t *, screen_t *, bool);
void screen_update_primary(void);
void screen_update_workarea(screen_t *);