Lots of X fixes.
This commit is contained in:
parent
4af386f434
commit
161060a463
14 changed files with 237 additions and 31 deletions
|
|
@ -48,6 +48,7 @@ void
|
|||
_ioproc(void *arg)
|
||||
{
|
||||
int one;
|
||||
ulong mask;
|
||||
Mouse m;
|
||||
Mousectl *mc;
|
||||
XEvent xevent;
|
||||
|
|
@ -57,9 +58,10 @@ _ioproc(void *arg)
|
|||
threadsetname("mouseproc");
|
||||
memset(&m, 0, sizeof m);
|
||||
mc->pid = getpid();
|
||||
mask = MouseMask|ExposureMask|StructureNotifyMask;
|
||||
XSelectInput(_x.mousecon, _x.drawable, mask);
|
||||
for(;;){
|
||||
XSelectInput(_x.mousecon, _x.drawable, MouseMask|ExposureMask|StructureNotifyMask);
|
||||
XWindowEvent(_x.mousecon, _x.drawable, MouseMask|ExposureMask|StructureNotifyMask, &xevent);
|
||||
XNextEvent(_x.mousecon, &xevent);
|
||||
switch(xevent.type){
|
||||
case Expose:
|
||||
xexpose(&xevent, _x.mousecon);
|
||||
|
|
@ -68,6 +70,9 @@ _ioproc(void *arg)
|
|||
if(xconfigure(&xevent, _x.mousecon))
|
||||
nbsend(mc->resizec, &one);
|
||||
continue;
|
||||
case SelectionRequest:
|
||||
xselect(&xevent, _x.mousecon);
|
||||
continue;
|
||||
case ButtonPress:
|
||||
case ButtonRelease:
|
||||
case MotionNotify:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue