From c556b45a8d1a60264f6a6d7b96201bb691932c24 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Tue, 24 May 2011 23:14:29 +0200 Subject: [PATCH] Split/Client: Fix integration with 1 client & transfert on another screen --- src/split.c | 8 ++++++++ src/tag.c | 11 +++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/split.c b/src/split.c index 0860e2c..1daffa7 100644 --- a/src/split.c +++ b/src/split.c @@ -259,7 +259,15 @@ split_client_integrate(Client *c, Client *sc, int screen, int tag) /* No client on wanted tag to integrate */ if(!b) { + /* client_maximize check position of client + * to maximize it; so in case of transfert one client + * on a tag from another screen, we need it. + */ + c->geo.x = sgeo[screen].x; + c->geo.y = sgeo[screen].y; + client_maximize(c); + return; } } diff --git a/src/tag.c b/src/tag.c index 55184fa..c018b8f 100644 --- a/src/tag.c +++ b/src/tag.c @@ -135,15 +135,15 @@ tag_transfert(Client *c, int tag) { int s; - screen_get_sel(); - CHECK(c); + screen_get_sel(); + if(tag <= 0) tag = 1; if(tag > conf.ntag[selscreen] - || (c->screen == selscreen && c->tag == tag)) + || (c->tag == tag && c->screen == selscreen)) return; s = c->screen; @@ -159,13 +159,12 @@ tag_transfert(Client *c, int tag) c->tag = tag; c->screen = selscreen; - arrange(c->screen, True); - if(s != c->screen) arrange(s, True); - client_focus_next(c); + arrange(c->screen, True); + client_focus_next(c); client_update_attributes(c); tags[c->screen][tag].request_update = True;