mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
removed FocusFollowMouse
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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}
|
||||
};
|
||||
|
||||
|
||||
11
src/event.c
11
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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user