Event handling tweaks. Global action events must occur on root window.
SVN revision: 16679
This commit is contained in:
parent
1bc99c9731
commit
277c1bac72
2
src/E.h
2
src/E.h
|
@ -904,7 +904,7 @@ int ActionclassGetActionCount(ActionClass * ac);
|
|||
Action *ActionclassGetAction(ActionClass * ac, int ix);
|
||||
int ActionclassEvent(ActionClass * ac, XEvent * ev,
|
||||
EWin * ewin);
|
||||
int ActionclassesEvent(XEvent * ev, EWin * ewin);
|
||||
int ActionclassesGlobalEvent(XEvent * ev);
|
||||
|
||||
const char *ActionGetTooltipString(Action * aa);
|
||||
int ActionGetAnybutton(Action * aa);
|
||||
|
|
|
@ -492,6 +492,10 @@ ActionDecode(const char *line)
|
|||
event = EVENT_MOUSE_ENTER;
|
||||
else if (!strcmp(ev, "MouseOut"))
|
||||
event = EVENT_MOUSE_LEAVE;
|
||||
else if (!strcmp(ev, "FocusIn"))
|
||||
event = EVENT_FOCUS_IN;
|
||||
else if (!strcmp(ev, "FocusOut"))
|
||||
event = EVENT_FOCUS_OUT;
|
||||
|
||||
anymod = anybut = anykey = 0;
|
||||
button = 0;
|
||||
|
@ -980,7 +984,7 @@ ActionclassEvent(ActionClass * ac, XEvent * ev, EWin * ewin)
|
|||
}
|
||||
|
||||
int
|
||||
ActionclassesEvent(XEvent * ev, EWin * ewin)
|
||||
ActionclassesGlobalEvent(XEvent * ev)
|
||||
{
|
||||
ActionClass **lst;
|
||||
int i, num, match;
|
||||
|
@ -991,7 +995,7 @@ ActionclassesEvent(XEvent * ev, EWin * ewin)
|
|||
|
||||
match = 0;
|
||||
for (i = 0; i < num; i++)
|
||||
match |= ActionclassEvent(lst[i], ev, ewin);
|
||||
match |= ActionclassEvent(lst[i], ev, GetFocusEwin());
|
||||
|
||||
Efree(lst);
|
||||
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
*/
|
||||
#include "E.h"
|
||||
#include "emodule.h"
|
||||
#include "ewins.h" /* FIXME - Should not be here */
|
||||
#include "xwin.h"
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#if USE_XRANDR
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
|
@ -225,12 +223,9 @@ HandleEvent(XEvent * ev)
|
|||
Mode.events.time = ev->xproperty.time;
|
||||
break;
|
||||
|
||||
case ClientMessage:
|
||||
HintsProcessClientMessage(&(ev->xclient));
|
||||
break;
|
||||
|
||||
do_stuff:
|
||||
ActionclassesEvent(ev, GetFocusEwin());
|
||||
if (ev->xany.window == VRoot.win)
|
||||
ActionclassesGlobalEvent(ev);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -1883,6 +1883,10 @@ EwinHandleEventsRoot(XEvent * ev, void *prm __UNUSED__)
|
|||
EwinEventReparent(ewin);
|
||||
break;
|
||||
|
||||
case ClientMessage:
|
||||
HintsProcessClientMessage(&(ev->xclient));
|
||||
break;
|
||||
|
||||
default:
|
||||
#if 0
|
||||
Eprintf("EwinHandleEventsRoot: type=%2d win=%#lx\n",
|
||||
|
|
Loading…
Reference in New Issue