mirror of https://github.com/0intro/wmii
changed wmiiwm.1 (added event processing section), attempt to fix the mouse issue reported by sander
This commit is contained in:
parent
04f162eeb0
commit
87b1782a04
|
@ -660,7 +660,7 @@ resize_all_clients()
|
|||
flush_events(EnterWindowMask);
|
||||
}
|
||||
|
||||
/* convenipacke function */
|
||||
/* convenience function */
|
||||
void
|
||||
focus(Client *c, Bool restack)
|
||||
{
|
||||
|
|
|
@ -56,11 +56,13 @@ check_x_event(IXPConn *c)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
unsigned int
|
||||
flush_events(long even_mask)
|
||||
{
|
||||
XEvent ev;
|
||||
while(XCheckMaskEvent(dpy, even_mask, &ev));
|
||||
unsigned int n = 0;
|
||||
while(XCheckMaskEvent(dpy, even_mask, &ev)) n++;
|
||||
return n;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -219,6 +219,10 @@ do_mouse_move(Client *c)
|
|||
pt.x = ex;
|
||||
pt.y = ey;
|
||||
XSync(dpy, False);
|
||||
|
||||
if(flush_events(ButtonReleaseMask))
|
||||
return;
|
||||
|
||||
XGrabServer(dpy);
|
||||
while(XGrabPointer(dpy, root, False, ButtonMotionMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None, cursor[CurMove],
|
||||
|
@ -458,6 +462,10 @@ do_mouse_resize(Client *c, BlitzAlign align)
|
|||
|
||||
XQueryPointer(dpy, c->framewin, &dummy, &dummy, &i, &i, &ox, &oy, &dmask);
|
||||
XSync(dpy, False);
|
||||
|
||||
if(flush_events(ButtonReleaseMask))
|
||||
return;
|
||||
|
||||
XGrabServer(dpy);
|
||||
while(XGrabPointer(dpy, c->framewin, False, ButtonMotionMask | ButtonReleaseMask,
|
||||
GrabModeAsync, GrabModeAsync, None, cursor[CurResize],
|
||||
|
|
|
@ -247,7 +247,7 @@ Area *new_right_column(View *v);
|
|||
/* event.c */
|
||||
void init_x_event_handler();
|
||||
void check_x_event(IXPConn *c);
|
||||
void flush_events(long even_mask);
|
||||
unsigned int flush_events(long even_mask);
|
||||
|
||||
/* frame.c */
|
||||
Frame *create_frame(Area *a, Client *c);
|
||||
|
|
|
@ -331,7 +331,7 @@ which selects the specific client from top to bottom.
|
|||
This file defines the column mode of this column, described in detail below.
|
||||
Note, floating layer directories do not contain this file.
|
||||
.RE
|
||||
.SS Syntax of files
|
||||
.SS Syntax
|
||||
All files of the filesystem described above can be read, most of them can be
|
||||
written as well. Most of the only can be written using valid syntax.
|
||||
.TP 2
|
||||
|
@ -454,6 +454,58 @@ then the last rule should be defined in the following form:
|
|||
.B /.*/
|
||||
\->
|
||||
.IR <default\-tag> .
|
||||
.SS Processing events
|
||||
Running
|
||||
.B wmiiwm
|
||||
in an useful way needs to control it through reading events
|
||||
from the
|
||||
.I /event
|
||||
file described above.
|
||||
.TP 2
|
||||
BarClick <label> <button>
|
||||
This event is reported whenever a label in the bar has been clicked.
|
||||
The
|
||||
.IR <label>
|
||||
argument contains the name of the label in the
|
||||
.I /bar
|
||||
namespace. The
|
||||
.IR <button>
|
||||
argument contains the mouse button index which has been pressed during the
|
||||
click, e.g.
|
||||
.IR 1,
|
||||
if it has been the left mouse button.
|
||||
.TP 2
|
||||
ClientClick <index> <button>
|
||||
This event is reported whenever a client frame has been clicked.
|
||||
The
|
||||
.IR <index>
|
||||
argument represents this client in the
|
||||
.I /client
|
||||
namespace. The
|
||||
.IR <button>
|
||||
argument contains the mouse button index which has been pressed during the
|
||||
click, e.g.
|
||||
.IR 1,
|
||||
if it has been the left mouse button.
|
||||
.TP 2
|
||||
ClientFocus <index>
|
||||
This event is reported whenever a client is focused. The
|
||||
.IR <index>
|
||||
argument represents this client in the
|
||||
.I /client
|
||||
namespace.
|
||||
.TP 2
|
||||
Key <shortcut>
|
||||
This event is reported whenever a shortcut has been pressed, which has been
|
||||
grabbed through writing
|
||||
.I /def/keys
|
||||
file.
|
||||
.TP 2
|
||||
User defined
|
||||
Any writes to the
|
||||
.I /event
|
||||
file will be reported to all readers. This allows to implement user defined
|
||||
events.
|
||||
.SH SEE ALSO
|
||||
.BR wmii (1),
|
||||
.BR wmiimenu (1),
|
||||
|
|
Loading…
Reference in New Issue