! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Window focus does not always switch to new window even when this is the set...
Status:
RESOLVED: FIXED

Comments

Description MR ZenWiz 2015-02-17 01:48:37 CET
Since upgrading to Xubuntu 14.04 (from 12.04), many new windows that come up do not automatically get the focus. Most frequently I see this with password windows for encrypted document, but also for the Authorization window that comes up when I insert my flash drive (a separate bug).

I thought this was a LibreOffice problem at first, but it is now happening on other windows that come up outside LO.

I believe this is in the window manager, xfwm4, as that is where the setting to automatically change focus to new windows is.

$ lsb_release -rd
Description:	Ubuntu 14.04.1 LTS
Release:	14.04

$ apt-cache policy xfwm4
xfwm4:
  Installed: 4.11.1-2ubuntu2
  Candidate: 4.11.1-2ubuntu2
  Version table:
 *** 4.11.1-2ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

I expect the focus to switch to the newly opened window.

Instead, the focus stayed in the original window, which can allow passwords to be typed in when the original window still accepts input, like from a terminal.

I tried to get screenshots of this, but activating the screenshot app causes the focus to shift.
Comment 1 Olivier Fourdan editbugs 2015-02-17 09:39:26 CET
Please try disabling focus stealing prevention (in xfwm4-tweaks) as this would cause such behaviour.

Basically, with apps that take longer to start (such as OpenOffice.org), other user input events may occur in the current window (e.g. you typing in the terminal) which would keep the focus in the terminal (this is expected with focus stealing prevention).
Comment 2 Steve Dodier-Lazaro editbugs 2015-02-17 17:29:28 CET
Waiting to see if Olivier's recommendation works.
Comment 3 Thaddaeus Tintenfisch editbugs 2015-05-13 10:47:23 CEST
https://bugs.launchpad.net/ubuntu/+source/xfwm4/+bug/1377569

This reply was added here, but it somehow vanished:

"I already have that disabled."
Comment 4 Olivier Fourdan editbugs 2015-05-13 11:00:52 CEST
I'd need a detailed step-by-step reproducer
Comment 5 Olivier Fourdan editbugs 2015-05-13 11:07:26 CEST
And along with the step-by-step procedure to reproduce the issue, the ouput of "xfconf-query -c xfwm4 -vl" would be helpful as well.
Comment 6 Olivier Fourdan editbugs 2015-05-13 13:53:29 CEST
(In reply to MR ZenWiz from comment #0)
>   Installed: 4.11.1-2ubuntu2
>   Candidate: 4.11.1-2ubuntu2

Oh, and one more thing, please make sure tu try/use a stable version, not a git development snapshot which is 1.5 years old.
Comment 7 MR ZenWiz 2015-05-16 13:59:18 CEST
Regarding the version (git snapshot), I only use what comes in the
Xubuntu release/updates repositories.  If that's obsolete, they should
probably be notified and have it updated.

According to synaptic, that's the latest available.

Clearly that is not the case, so what it the best way for me to upgrade
to a version supported for Xubuntu 14.04, or does that matter?

Typically, this happens when I have a LO document open and want to open a
new one.  Either the open dialogue is not in focus, or when I select a
file that is encrypted, the password dialogue does not get the focus.
Sometimes it doesn't happen, and sometimes it happens in other
circumstances (which  I'll need to record when I see it again).

This seems to be more prevalent on my home desktop (AMD CPU), much rarer
on my work desktop (Intel CPU).

Sample step by step instructions:

Open any LibreOffice writer document (.odt)
>From a terminal window, run 'xdg-open <any encrypted LibreOffice document>'

The password entry panel will come up and not have the focus.
Comment 8 Olivier Fourdan editbugs 2015-05-16 16:44:18 CEST
(In reply to MR ZenWiz from comment #7)
> Regarding the version (git snapshot), I only use what comes in the
> Xubuntu release/updates repositories.  If that's obsolete, they should
> probably be notified and have it updated.
> 
> According to synaptic, that's the latest available.
> 
> Clearly that is not the case, so what it the best way for me to upgrade
> to a version supported for Xubuntu 14.04, or does that matter?

Ah, true.

> Sample step by step instructions:
> 
> Open any LibreOffice writer document (.odt)
> >From a terminal window, run 'xdg-open <any encrypted LibreOffice document>'
> 
> The password entry panel will come up and not have the focus.

That's possibly a dupe of bug 11822. This is the only case where a window would not be focused (without focus stealing prevention enabled, of course).
Comment 9 MR ZenWiz 2015-05-18 02:07:45 CEST
(In reply to Olivier Fourdan from comment #8)
> 
> Ah, true.

Perhaps, but how do I upgrade xfce independent of the (X)Ubuntu repositories?

> That's possibly a dupe of bug 11822. This is the only case where a window
> would not be focused (without focus stealing prevention enabled, of course).

This could well be - when will that fix be available?

Thanks.
Comment 10 Olivier Fourdan editbugs 2015-05-18 09:04:04 CEST
(In reply to MR ZenWiz from comment #9)
> (In reply to Olivier Fourdan from comment #8)
> > 
> > Ah, true.
> 
> Perhaps, but how do I upgrade xfce independent of the (X)Ubuntu repositories?

Build from sources or ask on a (X)Ubuntu forum, I guess. I don't have an answer for this, I am not involved in (X)Ubuntu.

> > That's possibly a dupe of bug 11822. This is the only case where a window
> > would not be focused (without focus stealing prevention enabled, of course).
> 
> This could well be - when will that fix be available?

It is now already available in xfwm4-4.12.3.
Comment 11 MR ZenWiz 2015-05-27 05:28:41 CEST
I went ahead and downloaded the source for xfwm4 4.12.3 on my work desktop and it built and ran fine, except for some minor issues I have:

1, I can't tell if the window focus problem was fixed because that machine never had the problem.

2. In 4.12.3, when I use ctl-alt-shift-# to move a window from one workspace to another, previously this would take the window and the focus to the designated workspace.  In 4.12.3, it moves the window but does not shift to the target workspace.  IIRC, that was the old behavior, but there's no control for altering this behavior, and that's not acceptable to me.

3. In 4.12.3, when I use alt-tab to shift fro one window to another, the whole window gets grayed out and I had to change a setting (I forget which one) to make it stop doing that.  It's annoying.

I plan to take the time to build and install the new version to test the bug fix, but I won't be keeping it (until/unless I have no choice) due to the other changes in behavior.
Comment 12 Olivier Fourdan editbugs 2015-05-27 08:58:03 CEST
(In reply to MR ZenWiz from comment #11)
> I went ahead and downloaded the source for xfwm4 4.12.3 on my work desktop
> and it built and ran fine, except for some minor issues I have:
> 
> 1, I can't tell if the window focus problem was fixed because that machine
> never had the problem.

Well, not sure that helps with this bug then.
 
> 2. In 4.12.3, when I use ctl-alt-shift-# to move a window from one workspace
> to another, previously this would take the window and the focus to the
> designated workspace.  In 4.12.3, it moves the window but does not shift to
> the target workspace.  IIRC, that was the old behavior, but there's no
> control for altering this behavior, and that's not acceptable to me.

We cannot just add an option for every possibility that people may want, that would make the code clumsy, bloated, unreadable and un-maitainable in the long term and that would be not acceptable to me :p

> 3. In 4.12.3, when I use alt-tab to shift fro one window to another, the
> whole window gets grayed out and I had to change a setting (I forget which
> one) to make it stop doing that.  It's annoying.

Grayed out is the selection, the color depends on the gtk theme you've chosen. It looks better in colors, admittedly, but there is nothing I can do about it (there is already an option).

> I plan to take the time to build and install the new version to test the bug
> fix, but I won't be keeping it (until/unless I have no choice) due to the
> other changes in behavior.

Software evolves, gets improved, some changes happen just like anything in life. Older versions are not maintained, but the choice is yours, always, of course...

Please note that bugzilla is neither a mailing list nor a forum, even less a support tool, it's intended to track bugs and not to discuss what you like or don't like in a particular version, so I'd rather keep focused on what's described in comment #0.

Bug #11545

Reported by:
MR ZenWiz
Reported on: 2015-02-17
Last modified on: 2020-05-26

People

Assignee:
Olivier Fourdan
CC List:
3 users

Version

Version:
4.10.0

Attachments

Additional information