allow tiled window to be resize/moved, setting them to the floating state

This commit is contained in:
Julien Danjou 2007-09-16 15:55:37 +02:00
parent dd61895a03
commit b3848afd88
1 changed files with 16 additions and 5 deletions

21
event.c
View File

@ -184,16 +184,27 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
focus(c->display, c->screen, &dc[c->screen], c, ev->same_screen, &awesomeconf[c->screen]);
if(CLEANMASK(ev->state, c->screen) != awesomeconf[c->screen].modkey)
return;
if(ev->button == Button1 && (IS_ARRANGE(floating) || c->isfloating))
if(ev->button == Button1)
{
restack(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen]);
if(IS_ARRANGE(floating) || c->isfloating)
uicb_togglefloating(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen], NULL);
else
restack(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen]);
movemouse(c, &awesomeconf[c->screen]);
}
else if(ev->button == Button2)
uicb_zoom(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen], NULL);
else if(ev->button == Button3 && (IS_ARRANGE(floating) || c->isfloating) && !c->isfixed)
{
restack(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen]);
if(IS_ARRANGE(tile) && !c->isfixed && c->isfloating)
uicb_togglefloating(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen], NULL);
else
uicb_zoom(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen], NULL);
}
else if(ev->button == Button3)
{
if(IS_ARRANGE(floating) && !c->isfloating)
uicb_togglefloating(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen], NULL);
else
restack(e->xany.display, c->screen, &dc[c->screen], &awesomeconf[c->screen]);
resizemouse(c, &awesomeconf[c->screen]);
}
}