aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kbfunc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kbfunc.c b/kbfunc.c
index f9b7456..f3c9112 100644
--- a/kbfunc.c
+++ b/kbfunc.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: kbfunc.c,v 1.142 2016/12/06 21:54:10 okan Exp $
+ * $OpenBSD: kbfunc.c,v 1.143 2017/01/05 21:18:20 okan Exp $
*/
#include <sys/types.h>
@@ -156,6 +156,10 @@ kbfunc_client_resize(void *ctx, union arg *arg, enum xev xev)
cc->geom.w = cc->hint.minw;
if ((cc->geom.h += my * cc->hint.inch) < cc->hint.minh)
cc->geom.h = cc->hint.minh;
+ if (cc->geom.x + cc->geom.w < 0)
+ cc->geom.x = -cc->geom.w;
+ if (cc->geom.y + cc->geom.h < 0)
+ cc->geom.y = -cc->geom.h;
client_resize(cc, 1);
/* Make sure the pointer stays within the window. */