diff --git a/tab.c b/tab.c index b7cc45b3..929ca105 100644 --- a/tab.c +++ b/tab.c @@ -62,7 +62,6 @@ uicb_tab(awesome_config *awesomeconf, awesomeconf[awesomeconf->screen].cursor[CurMove], CurrentTime) != GrabSuccess) return; - for(;;) { XMaskEvent(awesomeconf->display, ButtonPressMask, &ev); @@ -72,11 +71,13 @@ uicb_tab(awesome_config *awesomeconf, break; } } + XQueryPointer(awesomeconf->display, RootWindow(awesomeconf->display, awesomeconf->phys_screen), &dummy, &child, &x1, &y1, &di, &di, &dui); + if((c = get_client_bywin(awesomeconf->clients, child)) - && c != sel) + && c != sel && !c->isfloating) { /* take the last tabbed window */ for(tmp = sel; tmp->tab.next; tmp = tmp->tab.next); @@ -85,8 +86,8 @@ uicb_tab(awesome_config *awesomeconf, c->tab.isvisible = False; arrange(awesomeconf->display, awesomeconf); + focus(awesomeconf->display, sel, True, awesomeconf); } - focus(awesomeconf->display, sel, True, awesomeconf); } void diff --git a/tag.c b/tag.c index a08b5d7e..14604d44 100644 --- a/tag.c +++ b/tag.c @@ -24,6 +24,7 @@ #include "layout.h" #include "tag.h" +#include "tab.h" #include "util.h" /** This function returns the index of @@ -187,6 +188,7 @@ uicb_togglefloating(awesome_config * awesomeconf, (*awesomeconf->client_sel)->rw = (*awesomeconf->client_sel)->w; (*awesomeconf->client_sel)->rh = (*awesomeconf->client_sel)->h; } + client_untab(*awesomeconf->client_sel); saveprops(*awesomeconf->client_sel, awesomeconf->ntags); arrange(awesomeconf->display, awesomeconf); }