mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
removed FocusFollowMouse
This commit is contained in:
@@ -155,9 +155,12 @@ typedef enum {
|
|||||||
|
|
||||||
/* keyboard input focus mode */
|
/* keyboard input focus mode */
|
||||||
#define WKF_CLICK 0
|
#define WKF_CLICK 0
|
||||||
#define WKF_POINTER 1
|
|
||||||
#define WKF_SLOPPY 2
|
#define WKF_SLOPPY 2
|
||||||
|
|
||||||
|
/* colormap change mode */
|
||||||
|
#define WCM_CLICK 0
|
||||||
|
#define WCM_POINTER 1
|
||||||
|
|
||||||
/* window placement mode */
|
/* window placement mode */
|
||||||
#define WPM_MANUAL 0
|
#define WPM_MANUAL 0
|
||||||
#define WPM_CASCADE 1
|
#define WPM_CASCADE 1
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
|||||||
|
|
||||||
if (wwin->flags.mapped && !WFLAGP(wwin, no_focusable)) {
|
if (wwin->flags.mapped && !WFLAGP(wwin, no_focusable)) {
|
||||||
/* install colormap if colormap mode is lock mode */
|
/* install colormap if colormap mode is lock mode */
|
||||||
if (wPreferences.colormap_mode==WKF_CLICK)
|
if (wPreferences.colormap_mode==WCM_CLICK)
|
||||||
wColormapInstallForWindow(scr, wwin);
|
wColormapInstallForWindow(scr, wwin);
|
||||||
|
|
||||||
/* set input focus */
|
/* set input focus */
|
||||||
|
|||||||
@@ -225,14 +225,13 @@ static int setCursor();
|
|||||||
|
|
||||||
static WOptionEnumeration seFocusModes[] = {
|
static WOptionEnumeration seFocusModes[] = {
|
||||||
{"Manual", WKF_CLICK, 0}, {"ClickToFocus", WKF_CLICK, 1},
|
{"Manual", WKF_CLICK, 0}, {"ClickToFocus", WKF_CLICK, 1},
|
||||||
{"Auto", WKF_POINTER, 0}, {"FocusFollowMouse", WKF_POINTER, 1},
|
|
||||||
{"Sloppy", WKF_SLOPPY, 0}, {"SemiAuto", WKF_SLOPPY, 1},
|
{"Sloppy", WKF_SLOPPY, 0}, {"SemiAuto", WKF_SLOPPY, 1},
|
||||||
{NULL, 0, 0}
|
{NULL, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static WOptionEnumeration seColormapModes[] = {
|
static WOptionEnumeration seColormapModes[] = {
|
||||||
{"Manual", WKF_CLICK, 0}, {"ClickToFocus", WKF_CLICK, 1},
|
{"Manual", WCM_CLICK, 0}, {"ClickToFocus", WCM_CLICK, 1},
|
||||||
{"Auto", WKF_POINTER, 0}, {"FocusFollowMouse", WKF_POINTER, 1},
|
{"Auto", WCM_POINTER, 0}, {"FocusFollowMouse", WCM_POINTER, 1},
|
||||||
{NULL, 0, 0}
|
{NULL, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
11
src/event.c
11
src/event.c
@@ -1054,11 +1054,7 @@ handleEnterNotify(XEvent *event)
|
|||||||
/* enter to window */
|
/* enter to window */
|
||||||
wwin = wWindowFor(event->xcrossing.window);
|
wwin = wWindowFor(event->xcrossing.window);
|
||||||
if (!wwin) {
|
if (!wwin) {
|
||||||
if (wPreferences.focus_mode==WKF_POINTER
|
if (wPreferences.colormap_mode==WCM_POINTER) {
|
||||||
&& event->xcrossing.window==event->xcrossing.root) {
|
|
||||||
wSetFocusTo(scr, NULL);
|
|
||||||
}
|
|
||||||
if (wPreferences.colormap_mode==WKF_POINTER) {
|
|
||||||
wColormapInstallForWindow(scr, NULL);
|
wColormapInstallForWindow(scr, NULL);
|
||||||
}
|
}
|
||||||
if (scr->autoRaiseTimer
|
if (scr->autoRaiseTimer
|
||||||
@@ -1074,8 +1070,7 @@ handleEnterNotify(XEvent *event)
|
|||||||
*
|
*
|
||||||
* set focus if in focus-follows-mouse mode and the event
|
* set focus if in focus-follows-mouse mode and the event
|
||||||
* is for the frame window and window doesn't have focus yet */
|
* is for the frame window and window doesn't have focus yet */
|
||||||
if ((wPreferences.focus_mode==WKF_POINTER
|
if (wPreferences.focus_mode==WKF_SLOPPY
|
||||||
|| wPreferences.focus_mode==WKF_SLOPPY)
|
|
||||||
&& wwin->frame->core->window==event->xcrossing.window
|
&& wwin->frame->core->window==event->xcrossing.window
|
||||||
&& !scr->flags.doing_alt_tab) {
|
&& !scr->flags.doing_alt_tab) {
|
||||||
|
|
||||||
@@ -1095,7 +1090,7 @@ handleEnterNotify(XEvent *event)
|
|||||||
}
|
}
|
||||||
/* Install colormap for window, if the colormap installation mode
|
/* Install colormap for window, if the colormap installation mode
|
||||||
* is colormap_follows_mouse */
|
* is colormap_follows_mouse */
|
||||||
if (wPreferences.colormap_mode==WKF_POINTER) {
|
if (wPreferences.colormap_mode==WCM_POINTER) {
|
||||||
if (wwin->client_win==event->xcrossing.window)
|
if (wwin->client_win==event->xcrossing.window)
|
||||||
wColormapInstallForWindow(scr, wwin);
|
wColormapInstallForWindow(scr, wwin);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1587,8 +1587,7 @@ wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed)
|
|||||||
|
|
||||||
newFocusedWindow = tmp;
|
newFocusedWindow = tmp;
|
||||||
|
|
||||||
} else if (wPreferences.focus_mode==WKF_SLOPPY
|
} else if (wPreferences.focus_mode==WKF_SLOPPY) {
|
||||||
|| wPreferences.focus_mode==WKF_POINTER) {
|
|
||||||
unsigned int mask;
|
unsigned int mask;
|
||||||
int foo;
|
int foo;
|
||||||
Window bar, win;
|
Window bar, win;
|
||||||
|
|||||||
Reference in New Issue
Block a user