From 9fd4cc15e7cbc6d813f7ce59de6a0a727897e0d2 Mon Sep 17 00:00:00 2001 From: sebastid Date: Fri, 20 May 2005 18:46:32 +0000 Subject: [PATCH] Sloppy focus. SVN revision: 14875 --- netwm.txt | 2 +- src/bin/e_border.h | 5 +++-- src/bin/e_focus.c | 3 ++- src/bin/e_remote_main.c | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/netwm.txt b/netwm.txt index 8bf118cf5..24f2c979d 100644 --- a/netwm.txt +++ b/netwm.txt @@ -8,7 +8,7 @@ _NET_CLIENT_LIST [X] _NET_CLIENT_LIST_STACKING [X] _NET_CLOSE_WINDOW [ ] _NET_CURRENT_DESKTOP [ ] -_NET_DESKTOP_GEOMETRY [ ] +_NET_DESKTOP_GEOMETRY [?] /* Listen to _NET_DESKTOP_GEOMETRY requests */ _NET_DESKTOP_LAYOUT [ ] _NET_DESKTOP_LAYOUT_S [ ] _NET_DESKTOP_NAMES [ ] diff --git a/src/bin/e_border.h b/src/bin/e_border.h index 6bcdc5ff0..0586760ec 100644 --- a/src/bin/e_border.h +++ b/src/bin/e_border.h @@ -28,8 +28,9 @@ typedef enum _E_Stacking typedef enum _E_Focus_Policy { - E_FOCUS_CLICK = 0, - E_FOCUS_MOUSE = 1 + E_FOCUS_CLICK, + E_FOCUS_MOUSE, + E_FOCUS_SLOPPY } E_Focus_Policy; diff --git a/src/bin/e_focus.c b/src/bin/e_focus.c index 1f277c0bd..5db45cb6d 100644 --- a/src/bin/e_focus.c +++ b/src/bin/e_focus.c @@ -30,7 +30,8 @@ e_focus_idler_before(void) void e_focus_event_mouse_in(E_Border* bd) { - if (e_config->focus_policy == E_FOCUS_MOUSE) + if ((e_config->focus_policy == E_FOCUS_MOUSE) + || (e_config->focus_policy == E_FOCUS_SLOPPY)) e_border_focus_set(bd, 1, 1); bd->raise_timer = NULL; diff --git a/src/bin/e_remote_main.c b/src/bin/e_remote_main.c index 3c2a279d6..dacae9578 100644 --- a/src/bin/e_remote_main.c +++ b/src/bin/e_remote_main.c @@ -250,9 +250,10 @@ _e_opt_focus_policy_set(char **params) value = 0; if (!strcmp(params[0], "MOUSE")) value = E_FOCUS_MOUSE; else if (!strcmp(params[0], "CLICK")) value = E_FOCUS_CLICK; + else if (!strcmp(params[0], "SLOPPY")) value = E_FOCUS_SLOPPY; else { - printf("focus must be MOUSE or CLICK\n"); + printf("focus must be MOUSE, CLICK or SLOPPY\n"); exit(-1); } data = e_ipc_codec_int_enc(value, &bytes);