added setfloating function

This commit is contained in:
2020-08-29 17:42:22 +02:00
parent a34914ccb4
commit b943c6cb48
2 changed files with 23 additions and 5 deletions

14
dwm.c
View File

@@ -204,6 +204,7 @@ static int sendevent(Client *c, Atom proto);
static void sendmon(Client *c, Monitor *m);
static void setclientstate(Client *c, long state);
static void setfocus(Client *c);
static void setfloating(const Arg *arg);
static void setfullscreen(Client *c, int fullscreen);
static void setlayout(const Arg *arg);
static void setmfact(const Arg *arg);
@@ -1826,6 +1827,19 @@ togglefloating(const Arg *arg)
arrange(selmon);
}
void
setfloating(const Arg *arg)
{
if (!selmon->sel)
return;
if (selmon->sel->isfullscreen) /* no support for fullscreen windows */
return;
selmon->sel->isfloating = True;
resize(selmon->sel, selmon->sel->x, selmon->sel->y,
selmon->sel->w, selmon->sel->h, 0);
arrange(selmon);
}
void
togglefullscr(const Arg *arg)
{