mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-03 12:24:17 +01:00
fixed some bugs
made click on windows that are unfocused windows focus them on sloppy/evil focus mode
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -79,7 +79,7 @@ WShortKey wKeyBindings[WKBD_LAST];
|
||||
/* defaults domains */
|
||||
WDDomain *WDWindowMaker = NULL;
|
||||
WDDomain *WDWindowAttributes = NULL;
|
||||
|
||||
WDDomain *WDRootMenu = NULL;
|
||||
|
||||
/* XContexts */
|
||||
XContext wWinContext;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -388,7 +388,6 @@ makeMakeShortcutMenu(WScreen *scr, WMenu *menu)
|
||||
|
||||
for (i=0; i<MAX_WINDOW_SHORTCUTS; i++) {
|
||||
WMenuEntry *entry;
|
||||
|
||||
entry = wMenuAddCallback(menu, "", makeShortcutCommand, NULL);
|
||||
|
||||
entry->flags.indicator = 1;
|
||||
|
||||
Reference in New Issue
Block a user