After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735135 - Switching to a virtual desktop loses active window focus
Switching to a virtual desktop loses active window focus
Status: RESOLVED NOTGNOME
Product: gnome-shell
Classification: Core
Component: general
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-21 04:15 UTC by Adam Batkin
Modified: 2014-09-12 03:23 UTC
See Also:
GNOME target: ---
GNOME version: 3.11/3.12



Description Adam Batkin 2014-08-21 04:15:46 UTC
When switching to a virtual desktop, not only has the previously focused window lost its focus, but no window has focus.

In other words, 100% of the time, when I switch to a virtual desktop, no window has focus.
Comment 1 Florian Müllner 2014-09-09 13:09:44 UTC
(In reply to comment #0)
> When switching to a virtual desktop, not only has the previously focused window
> lost its focus ...

That part is expected (unless you also move the previously focused window to the new workspace) 


> ... but no window has focus.

That part is not - are you using any "odd" programs that could interfere with window focus? I haven't seen this myself, and as there haven't been any other reports of this, I doubt this is a very common problem.
Comment 2 Adam Batkin 2014-09-10 00:39:11 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > When switching to a virtual desktop, not only has the previously focused window
> > lost its focus ...
> 
> That part is expected (unless you also move the previously focused window to
> the new workspace) 

I'm talking about the window that was originally focused when you left that desktop.

> > ... but no window has focus.
> 
> That part is not - are you using any "odd" programs that could interfere with
> window focus? I haven't seen this myself, and as there haven't been any other
> reports of this, I doubt this is a very common problem.

I don't think so. I had some extensions, but they are pretty standard (Alternatetab, Frippery, etc...) but I've disabled everything and logged back out and in again.

Relevant settings:
Focus Mode: Click
Workspace Creation: Static
Number of Workspaces: 4
Workspaces only on primary display: Off

I have two monitors, side by side.

I can reproduce this by simply opening a Terminal on my first and second virtual desktops (err, "Workspaces") then using Ctrl+Alt+Up/Down to move between the workspaces. Even though a terminal may have been focused when I "left", it's not focused when I come back.
Comment 3 Michael Catanzaro 2014-09-11 04:31:41 UTC
(In reply to comment #2)
> I have two monitors, side by side.

It works for me with those settings, but I only have one monitor, so this might be why.
Comment 4 Florian Müllner 2014-09-11 09:33:06 UTC
(In reply to comment #3)
> It works for me with those settings, but I only have one monitor, so this might
> be why.

I do have two monitors, and it works for me as well (using the above settings).


(In reply to comment #2)
> > That part is expected (unless you also move the previously focused window to
> > the new workspace) 
> 
> I'm talking about the window that was originally focused when you left that
> desktop.

Works here - on workspace switches, the most-recently used window on that workspace is focused.
Comment 5 Jasper St. Pierre (not reading bugmail) 2014-09-11 15:43:29 UTC
Try opening the looking glass and typing Meta.add_verbose_topic(Meta.DebugTopic.FOCUS); and looking at the output of gnome-shell. That might help us figure out what's going wrong on your system.
Comment 6 Adam Batkin 2014-09-12 03:23:21 UTC
(In reply to comment #5)
> Try opening the looking glass and typing
> Meta.add_verbose_topic(Meta.DebugTopic.FOCUS); and looking at the output of
> gnome-shell. That might help us figure out what's going wrong on your system.

Thanks for the tip.

Apparently gkrellm is doing Very Bad Things with its window management, so I'll just stop using that for now. The log is what tipped me off (but it does some other weird things too, like appearing on my window list - but only sometimes) so that was very helpful.

For any other future passers-by: Retrieving the contents of the log is completely undocumented (at least on Fedora 21 which apparently uses the journal instead of real files) and can be viewed using "journalctl --user -f".