xiwm

simple window manager
git clone https://git.ce9e.org/xiwm.git

commit
4c62dab51a214abc50a4407e8885d9c3712526b5
parent
81dd1b9ec700ef2a02088d84de6d2c6f96cdbdb1
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-10-13 08:30
rm arrange()

Diffstat

M xiwm.c 31 ++++++++++++-------------------

1 files changed, 12 insertions, 19 deletions


diff --git a/xiwm.c b/xiwm.c

@@ -364,25 +364,18 @@ restack(void)
  364   364 }
  365   365 
  366   366 void
  367    -1 arrange(void)
  368    -1 {
  369    -1 	layout();
  370    -1 	restack();
  371    -1 }
  372    -1 
  373    -1 void
  374   367 setfullscreen(Client *c, Bool fullscreen)
  375   368 {
  376   369 	if (fullscreen && !c->isfullscreen) {
  377   370 		XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32,
  378   371 			PropModeReplace, (unsigned char*) &netatom[NetWMFullscreen], 1);
  379   372 		c->isfullscreen = True;
  380    -1 		arrange();
   -1   373 		layout();
  381   374 	} else if (!fullscreen && c->isfullscreen){
  382   375 		XChangeProperty(dpy, c->win, netatom[NetWMState], XA_ATOM, 32,
  383   376 			PropModeReplace, (unsigned char*) 0, 0);
  384   377 		c->isfullscreen = False;
  385    -1 		arrange();
   -1   378 		layout();
  386   379 	}
  387   380 }
  388   381 
@@ -533,13 +526,13 @@ manage(Window w, XWindowAttributes *wa)
  533   526 		PropModeAppend, (unsigned char *) &(c->win), 1);
  534   527 	XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
  535   528 	xsetclientstate(c, NormalState);
  536    -1 	arrange();
  537   529 	XMapWindow(dpy, c->win);
  538   530 	focus(NULL);
   -1   531 	layout();
  539   532 
  540   533 	if (c->isdock) {
  541   534 		bh = c->h;
  542    -1 		arrange();
   -1   535 		layout();
  543   536 	}
  544   537 }
  545   538 
@@ -550,12 +543,12 @@ unmanage(Client *c)
  550   543 
  551   544 	detach(c);
  552   545 	free(c);
  553    -1 	focus(NULL);
  554   546 	XDeleteProperty(dpy, root, netatom[NetClientList]);
  555   547 	for (i = clients; i; i = i->next)
  556   548 		XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32,
  557   549 			PropModeAppend, (unsigned char *) &(i->win), 1);
  558    -1 	arrange();
   -1   550 	focus(NULL);
   -1   551 	layout();
  559   552 }
  560   553 
  561   554 /* event handlers */
@@ -613,7 +606,7 @@ clientmessage(XEvent *e)
  613   606 				xsetdesktop();
  614   607 			}
  615   608 			focus(c);
  616    -1 			arrange();
   -1   609 			layout();
  617   610 		}
  618   611 	}
  619   612 }
@@ -677,7 +670,7 @@ tag(const Arg *arg)
  677   670 		xsetdesktop();
  678   671 	}
  679   672 	focus(NULL);
  680    -1 	arrange();
   -1   673 	layout();
  681   674 }
  682   675 
  683   676 void
@@ -695,9 +688,9 @@ view(const Arg *arg)
  695   688 	if (arg->ui >= desktops)
  696   689 		return;
  697   690 	desktop = arg->ui;
  698    -1 	focus(NULL);
  699    -1 	arrange();
  700   691 	xsetdesktop();
   -1   692 	focus(NULL);
   -1   693 	layout();
  701   694 }
  702   695 
  703   696 void
@@ -737,14 +730,14 @@ setposition(const Arg *arg)
  737   730 	if (!sel)
  738   731 		return;
  739   732 	sel->position = arg->i;
  740    -1 	arrange();
   -1   733 	layout();
  741   734 }
  742   735 
  743   736 void
  744   737 setmfact(const Arg *arg)
  745   738 {
  746   739 	mfact += arg->f;
  747    -1 	arrange();
   -1   740 	layout();
  748   741 }
  749   742 
  750   743 void