From 068c5a94b130b36eeea240215cb2039ffa7ec101 Mon Sep 17 00:00:00 2001 From: kojima Date: Fri, 5 Jan 2001 22:39:01 +0000 Subject: [PATCH] fixed some bugs made click on windows that are unfocused windows focus them on sloppy/evil focus mode --- ChangeLog | 4 +--- NEWS | 2 +- src/event.c | 5 +++-- src/main.c | 2 +- src/wconfig.h.in | 6 +----- src/window.c | 8 ++++---- src/winmenu.c | 1 - 7 files changed, 11 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9528ce1..fe75c6e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,9 +8,6 @@ Changes since version 0.62.1: (Alban Hertroys ) - improved and simplified fonts configuration for multibyte languages (Tomohiro KUBOTA ) -- rewrote menu reading code -- added KDE menu support in rootmenu -- added support for forced menu refresh in piped menus - cleaned ParseCommand() and renamed to TokenizeString() - rewrote menu editor in WPrefs - added definable workspace border (0..5 pixels). See NEWS. @@ -28,6 +25,7 @@ Changes since version 0.62.1: - fixed code that was dependant on the order of evaluation in wrlib. This fixed a number of problems, like greyscale jpegs that showed up in red and possibly the problems with pseudocolor displays. +- made clicks on unfocused windows be effective on focus follow mouse/sloppy Changes since version 0.62.0: diff --git a/NEWS b/NEWS index e6456965..66a9cb1f 100644 --- a/NEWS +++ b/NEWS @@ -2,7 +2,7 @@ NEWS for veteran Window Maker users ----------------------------------- ---- 0.62.1 +--- 0.63.0 Interwoven Gradient diff --git a/src/event.c b/src/event.c index b675b288..82432272 100644 --- a/src/event.c +++ b/src/event.c @@ -599,6 +599,7 @@ handleButtonPress(XEvent *event) { WObjDescriptor *desc; WScreen *scr; + #ifdef DEBUG L("got button press"); #endif @@ -668,12 +669,12 @@ handleButtonPress(XEvent *event) XAllowEvents(dpy, AsyncPointer, CurrentTime); } - if (wPreferences.focus_mode == WKF_CLICK) { +/* if (wPreferences.focus_mode == WKF_CLICK) {*/ if (wPreferences.ignore_focus_click) { XAllowEvents(dpy, AsyncPointer, CurrentTime); } XAllowEvents(dpy, ReplayPointer, CurrentTime); - } +/* }*/ XSync(dpy, 0); } else if (desc->parent_type == WCLASS_APPICON || desc->parent_type == WCLASS_MINIWINDOW diff --git a/src/main.c b/src/main.c index 363529a3..49b336df 100644 --- a/src/main.c +++ b/src/main.c @@ -79,7 +79,7 @@ WShortKey wKeyBindings[WKBD_LAST]; /* defaults domains */ WDDomain *WDWindowMaker = NULL; WDDomain *WDWindowAttributes = NULL; - +WDDomain *WDRootMenu = NULL; /* XContexts */ XContext wWinContext; diff --git a/src/wconfig.h.in b/src/wconfig.h.in index 1c9f46e1..945e83e6 100644 --- a/src/wconfig.h.in +++ b/src/wconfig.h.in @@ -525,11 +525,7 @@ /* number of window shortcuts */ -#ifdef EXTEND_WINDOWSHORTCUT -# define MAX_WINDOW_SHORTCUTS 10 -#else -# define MAX_WINDOW_SHORTCUTS 4 -#endif +#define MAX_WINDOW_SHORTCUTS 10 #define WM_PI 3.14159265358979323846 diff --git a/src/window.c b/src/window.c index 38e3855e..1c066da8 100644 --- a/src/window.c +++ b/src/window.c @@ -1452,7 +1452,7 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner, } if (wwin->flags.is_gnustep == 0) - wFrameWindowChangeState(wwin->frame, WS_UNFOCUSED); + wFrameWindowChangeState(wwin->frame, WS_UNFOCUSED); /* if (wPreferences.auto_focus)*/ wSetFocusTo(scr, wwin); @@ -2562,7 +2562,7 @@ wWindowResetMouseGrabs(WWindow *wwin) if (!wwin->flags.focused && !WFLAGP(wwin, no_focusable) && !wwin->flags.is_gnustep) { /* the passive grabs to focus the window */ - if (wPreferences.focus_mode == WKF_CLICK) +/* if (wPreferences.focus_mode == WKF_CLICK) */ XGrabButton(dpy, AnyButton, AnyModifier, wwin->client_win, True, ButtonPressMask, GrabModeSync, GrabModeAsync, None, None); @@ -2856,8 +2856,8 @@ frameMouseDown(WObjDescriptor *desc, XEvent *event) CloseWindowMenu(wwin->screen_ptr); - if (wPreferences.focus_mode==WKF_CLICK - && !(event->xbutton.state&ControlMask) + if (/*wPreferences.focus_mode==WKF_CLICK + &&*/ !(event->xbutton.state&ControlMask) && !WFLAGP(wwin, no_focusable)) { wSetFocusTo(wwin->screen_ptr, wwin); } diff --git a/src/winmenu.c b/src/winmenu.c index 35c0b469..0013b714 100644 --- a/src/winmenu.c +++ b/src/winmenu.c @@ -388,7 +388,6 @@ makeMakeShortcutMenu(WScreen *scr, WMenu *menu) for (i=0; iflags.indicator = 1;