You are not logged in.

#1 2014-04-28 01:29:10

frank33
Member
Registered: 2014-04-28
Posts: 3

DWM Mouse Focus Issue (Multiple screens regain keyboard focus)

I am having an issue with DWM and multiple screen's.  When the mouse leaves and re-enters a particular screen, the keyboard does not focus where the mouse is pointing.   

So if the mouse is in Screen2, Window1 and then goes over to the Screen1 to the left, when comming back to Screen2, Window1 there is now no keyboard input, with either click or sloppy focus.  To regain keyboard input the mouse has to either go into Screen2, Window 2 (if there is one) or go to another desktop tab in that screen session.   The mouse does function properly, other than the focus for keyboard.  The keyboard actually remains focused in Screen1 although the mouse is now in Screen2, Window1 which is very confusing and problematic.

          Screen1                                    Screen2
**********************        **********************
*                                   *        * Window1 | Window2 *         
*                                   *        *                 |                 *     
*                                   *        *                 |                 *     
*                                   *        *                 |                 *     
*                                   *        *                 |                 *     
**********************        **********************

The issue is very similar to https://bbs.archlinux.org/viewtopic.php?id=158780 , in which the keyboard focus does not automatically go to the window in which the mouse is hovering after switching tabs with multiple windows.  The patch posted by Vain fixes that particular focus issue when swithcing tabs as expected.

The patch they used for the similar issue appends to the view() function:
(https://github.com/vain/dwm-vain/commit … b15a7ae03d)

XQueryPointer(dpy, root, &dummy, &win, &di, &di, &di, &di, &dui);
focus(wintoclient(win));
XFlush(dpy);

The issue here seems similar,  however with multiple screens.   It seems to me that when mouse focus leaves it is deactivated, and comes back in the same region it is not properly reactivated.  In the prior situation desktop tabs and same window regon and in this situation leaving the current screen area and comming back in the same region.

Last edited by frank33 (2014-05-03 18:14:56)

Offline

#2 2014-04-28 01:50:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: DWM Mouse Focus Issue (Multiple screens regain keyboard focus)

Vanilla or patched?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-04-28 01:53:06

frank33
Member
Registered: 2014-04-28
Posts: 3

Re: DWM Mouse Focus Issue (Multiple screens regain keyboard focus)

I am currently using a vanilla unpatched DWM.

Last edited by frank33 (2014-05-03 18:08:00)

Offline

#4 2014-05-24 01:27:30

frank33
Member
Registered: 2014-04-28
Posts: 3

Re: DWM Mouse Focus Issue (Multiple screens regain keyboard focus)

I should note that Screen1 and Screen2 are seperate screen sessions.

Last edited by frank33 (2014-05-24 01:34:49)

Offline

Board footer

Powered by FluxBB