From c57208d1a820a9e11085844a00204e37a35a54cd Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 13 May 2017 12:02:40 +0200 Subject: [PATCH] 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 --- objects/client.c | 14 -------------- objects/screen.c | 14 -------------- objects/screen.h | 1 - 3 files changed, 29 deletions(-) diff --git a/objects/client.c b/objects/client.c index 1b4d9f6ab..0ec571f92 100644 --- a/objects/client.c +++ b/objects/client.c @@ -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. diff --git a/objects/screen.c b/objects/screen.c index 4e50199b1..533f578e3 100644 --- a/objects/screen.c +++ b/objects/screen.c @@ -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. diff --git a/objects/screen.h b/objects/screen.h index 45876062c..e7d828054 100644 --- a/objects/screen.h +++ b/objects/screen.h @@ -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 *);