From 205b3f35b9b55a36bb2b92fcd6e1fb32a99ee1ac Mon Sep 17 00:00:00 2001 From: kojima Date: Mon, 14 May 2001 14:58:55 +0000 Subject: [PATCH] removed FocusFollowMouse --- src/WindowMaker.h | 5 ++++- src/actions.c | 2 +- src/defaults.c | 5 ++--- src/event.c | 11 +++-------- src/window.c | 3 +-- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 9bbb1d66..6092ef0f 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -155,9 +155,12 @@ typedef enum { /* keyboard input focus mode */ #define WKF_CLICK 0 -#define WKF_POINTER 1 #define WKF_SLOPPY 2 +/* colormap change mode */ +#define WCM_CLICK 0 +#define WCM_POINTER 1 + /* window placement mode */ #define WPM_MANUAL 0 #define WPM_CASCADE 1 diff --git a/src/actions.c b/src/actions.c index e784be59..11f09e53 100644 --- a/src/actions.c +++ b/src/actions.c @@ -185,7 +185,7 @@ wSetFocusTo(WScreen *scr, WWindow *wwin) if (wwin->flags.mapped && !WFLAGP(wwin, no_focusable)) { /* install colormap if colormap mode is lock mode */ - if (wPreferences.colormap_mode==WKF_CLICK) + if (wPreferences.colormap_mode==WCM_CLICK) wColormapInstallForWindow(scr, wwin); /* set input focus */ diff --git a/src/defaults.c b/src/defaults.c index 1e529aec..22435a85 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -225,14 +225,13 @@ static int setCursor(); static WOptionEnumeration seFocusModes[] = { {"Manual", WKF_CLICK, 0}, {"ClickToFocus", WKF_CLICK, 1}, - {"Auto", WKF_POINTER, 0}, {"FocusFollowMouse", WKF_POINTER, 1}, {"Sloppy", WKF_SLOPPY, 0}, {"SemiAuto", WKF_SLOPPY, 1}, {NULL, 0, 0} }; static WOptionEnumeration seColormapModes[] = { - {"Manual", WKF_CLICK, 0}, {"ClickToFocus", WKF_CLICK, 1}, - {"Auto", WKF_POINTER, 0}, {"FocusFollowMouse", WKF_POINTER, 1}, + {"Manual", WCM_CLICK, 0}, {"ClickToFocus", WCM_CLICK, 1}, + {"Auto", WCM_POINTER, 0}, {"FocusFollowMouse", WCM_POINTER, 1}, {NULL, 0, 0} }; diff --git a/src/event.c b/src/event.c index ea1a239b..40703141 100644 --- a/src/event.c +++ b/src/event.c @@ -1054,11 +1054,7 @@ handleEnterNotify(XEvent *event) /* enter to window */ wwin = wWindowFor(event->xcrossing.window); if (!wwin) { - if (wPreferences.focus_mode==WKF_POINTER - && event->xcrossing.window==event->xcrossing.root) { - wSetFocusTo(scr, NULL); - } - if (wPreferences.colormap_mode==WKF_POINTER) { + if (wPreferences.colormap_mode==WCM_POINTER) { wColormapInstallForWindow(scr, NULL); } if (scr->autoRaiseTimer @@ -1074,8 +1070,7 @@ handleEnterNotify(XEvent *event) * * set focus if in focus-follows-mouse mode and the event * is for the frame window and window doesn't have focus yet */ - if ((wPreferences.focus_mode==WKF_POINTER - || wPreferences.focus_mode==WKF_SLOPPY) + if (wPreferences.focus_mode==WKF_SLOPPY && wwin->frame->core->window==event->xcrossing.window && !scr->flags.doing_alt_tab) { @@ -1095,7 +1090,7 @@ handleEnterNotify(XEvent *event) } /* Install colormap for window, if the colormap installation mode * is colormap_follows_mouse */ - if (wPreferences.colormap_mode==WKF_POINTER) { + if (wPreferences.colormap_mode==WCM_POINTER) { if (wwin->client_win==event->xcrossing.window) wColormapInstallForWindow(scr, wwin); else diff --git a/src/window.c b/src/window.c index c56c5483..2d30da43 100644 --- a/src/window.c +++ b/src/window.c @@ -1587,8 +1587,7 @@ wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed) newFocusedWindow = tmp; - } else if (wPreferences.focus_mode==WKF_SLOPPY - || wPreferences.focus_mode==WKF_POINTER) { + } else if (wPreferences.focus_mode==WKF_SLOPPY) { unsigned int mask; int foo; Window bar, win; -- 2.11.4.GIT