Fixed some bugs trunk
author"Christoph Kappel <unexist@hilflos.org"
Thu Oct 11 00:35:28 2007 +0200 (5 years ago)
branchtrunk
changeset 365276788ad4058
parent 36402249efa963f
child 3662a9762ec2126
Fixed some bugs
subtle/src/view.c
       1 --- a/subtle/src/view.c	Thu Oct 11 00:25:25 2007 +0200
       2 +++ b/subtle/src/view.c	Thu Oct 11 00:35:28 2007 +0200
       3 @@ -101,7 +101,7 @@
       4  				{
       5  					XSetWindowBackground(d->dpy, v->button, (d->cv == v) ? d->colors.focus : d->colors.norm);
       6  					XClearWindow(d->dpy, v->button);
       7 -					XDrawString(d->dpy, v->button, d->gcs.font, 1, d->fy - 4, v->name, strlen(v->name));
       8 +					XDrawString(d->dpy, v->button, d->gcs.font, 1, d->fy - 1, v->name, strlen(v->name));
       9  				}
      10  			v = v->next;
      11  		}
      12 @@ -116,14 +116,14 @@
      13  {
      14  	if(root)
      15  		{
      16 -			int  width = 3;
      17 +			int  width = 0;
      18  			SubView *v = root;
      19  
      20  			while(v)
      21  				{
      22  					if(v->w)
      23  						{
      24 -							XMoveResizeWindow(d->dpy, v->button, width, 2, v->width, d->th - 6);
      25 +							XMoveResizeWindow(d->dpy, v->button, width, 0, v->width, d->th);
      26  							width += v->width + 6;
      27  						}
      28  					v = v->next;
      29 @@ -151,9 +151,13 @@
      30  
      31  					XUnmapWindow(d->dpy, v->button);
      32  					XDeleteContext(d->dpy, v->button, 1);
      33 -					XDeleteContext(d->dpy, v->w->frame, 1);
      34  					XDestroyWindow(d->dpy, v->button);
      35 -					XDestroyWindow(d->dpy, v->w->frame);
      36 +
      37 +					if(v->w)
      38 +						{
      39 +							XDeleteContext(d->dpy, v->w->frame, 1);
      40 +							XDestroyWindow(d->dpy, v->w->frame);
      41 +						}
      42  
      43  					free(v->name);
      44  					free(v);					
      45 @@ -186,7 +190,7 @@
      46  				{
      47  					v->w = subTileNew(SUB_WIN_TILE_HORZ);
      48  					v->w->flags |= SUB_WIN_TYPE_VIEW;
      49 -					v->button = XCreateSimpleWindow(d->dpy, d->bar.views, 0, 0, 1, d->th - 6, 1, d->colors.border, d->colors.norm);
      50 +					v->button = XCreateSimpleWindow(d->dpy, d->bar.views, 0, 0, 1, d->th, 0, d->colors.border, d->colors.norm);
      51  
      52  					XSaveContext(d->dpy, v->button, 1, (void *)v);
      53  				}