Skip to content
Snippets Groups Projects
Commit edce06e5 authored by Olivier Fourdan's avatar Olivier Fourdan
Browse files

Do not pass focus to the desktop by default (Fix bug #1853). The problem is...

Do not pass focus to the desktop by default (Fix bug #1853). The problem is that xfdesktop sets its InputHint from WM Hints property to False to avoid focus, but GTK+ itself sets the WM_TAKE_FOCUS property, so it's impossible for the WM to tell whether or not the windows may or may not accept focus, which leads to unpredictable results when the last available focusable window vanishes (which is just what happens in bug #1853. From what I saw, metacity and kwin have the same problem. The workaround used here is to simply not use the desktop as a fallback focusable window. If the user wants to focus the desktop, (s)he just has to explicitely click on it.

(Old svn revision: 21917)
parent 0a389f9e
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ clientGetTopMostFocusable (ScreenInfo *screen_info, int layer, Client * exclude)
TRACE ("*** stack window \"%s\" (0x%lx), layer %i", c->name,
c->window, (int) c->win_layer);
if ((c->type & WINDOW_TYPE_DONT_FOCUS) || !clientAcceptFocus (c))
if (!clientAcceptFocus (c) || (c->type & (WINDOW_SPLASHSCREEN | WINDOW_DOCK | WINDOW_DESKTOP)))
{
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment