mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-13 20:35:54 +01:00
Fixed problems in menu scrolling caused by the patch sent by Swivel.
This commit is contained in:
20
src/event.c
20
src/event.c
@@ -979,26 +979,6 @@ handleEnterNotify(XEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* start my fix scrolled menus */
|
|
||||||
if (wPreferences.scrollable_menus) {
|
|
||||||
if (scr->flags.jump_back_pending ||
|
|
||||||
event->xcrossing.x_root <= 1 ||
|
|
||||||
event->xcrossing.x_root >= (scr->scr_width - 2) ||
|
|
||||||
event->xcrossing.y_root <= 1 ||
|
|
||||||
event->xcrossing.y_root >= (scr->scr_height - 2)) {
|
|
||||||
#ifdef DEBUG
|
|
||||||
L("pointer at screen edge in EnterNotify event, fear");
|
|
||||||
#endif
|
|
||||||
menu = wMenuUnderPointer(scr);
|
|
||||||
if (menu!=NULL) {
|
|
||||||
wMenuScroll(menu, event);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* end fix scrolled menus */
|
|
||||||
|
|
||||||
|
|
||||||
if (XFindContext(dpy, event->xcrossing.window, wWinContext,
|
if (XFindContext(dpy, event->xcrossing.window, wWinContext,
|
||||||
(XPointer *)&desc)!=XCNOENT) {
|
(XPointer *)&desc)!=XCNOENT) {
|
||||||
if(desc->handle_enternotify)
|
if(desc->handle_enternotify)
|
||||||
|
|||||||
@@ -1792,12 +1792,7 @@ wMenuScroll(WMenu *menu, XEvent *event)
|
|||||||
WMNextEvent(dpy, &ev);
|
WMNextEvent(dpy, &ev);
|
||||||
switch (ev.type) {
|
switch (ev.type) {
|
||||||
case EnterNotify:
|
case EnterNotify:
|
||||||
/*
|
|
||||||
this um causes a nasty crash ugly ugh i dont see *why* we do this,
|
|
||||||
everything seems fine without it. ( swivel )
|
|
||||||
WMHandleEvent(&ev);
|
WMHandleEvent(&ev);
|
||||||
*/
|
|
||||||
break;
|
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
x = (ev.type==MotionNotify) ? ev.xmotion.x_root : ev.xcrossing.x_root;
|
x = (ev.type==MotionNotify) ? ev.xmotion.x_root : ev.xcrossing.x_root;
|
||||||
y = (ev.type==MotionNotify) ? ev.xmotion.y_root : ev.xcrossing.y_root;
|
y = (ev.type==MotionNotify) ? ev.xmotion.y_root : ev.xcrossing.y_root;
|
||||||
|
|||||||
Reference in New Issue
Block a user