Skip to content

Commit

Permalink
fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
phillbush committed Aug 19, 2020
1 parent b023fd3 commit 2a6b09c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pmenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
Expand Down Expand Up @@ -399,7 +400,6 @@ initpie(void)
{
XGCValues values;
unsigned long valuemask;
unsigned x, y;

/* set pie geometry */
pie.border = config.border_pixels;
Expand All @@ -415,8 +415,6 @@ initpie(void)
pie.innercircley = pie.innercirclex = pie.radius - pie.radius * pie.separatorbeg;
pie.innercirclediameter = (pie.radius * pie.separatorbeg) * 2;

x = y = (pie.diameter + 1) / 2;

/* Create a simple bitmap mask (depth = 1) */
pie.clip = XCreatePixmap(dpy, rootwin, pie.diameter, pie.diameter, 1);
pie.bounding = XCreatePixmap(dpy, rootwin, pie.fulldiameter, pie.fulldiameter, 1);
Expand Down Expand Up @@ -1218,7 +1216,6 @@ run(struct Menu *currmenu)
struct Menu *rootmenu;
struct Menu *menu;
struct Slice *slice;
struct Slice *prevslice = NULL;
KeySym ksym;
XEvent ev;

Expand Down Expand Up @@ -1250,14 +1247,12 @@ run(struct Menu *currmenu)
currmenu = currmenu->parent;
mapmenu(currmenu);
}
prevslice = NULL;
currmenu->selected = NULL;
drawmenu(currmenu);
break;
case MotionNotify:
menu = getmenu(currmenu, ev.xbutton.window);
slice = getslice(menu, ev.xbutton.x, ev.xbutton.y);
prevslice = slice;
if (menu == NULL || slice == NULL)
menu->selected = NULL;
else
Expand Down

0 comments on commit 2a6b09c

Please sign in to comment.