Window focus does not always switch to new window even when this is the setting

Bug #1377569 reported by MR Zenwiz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Xfwm4
Incomplete
Medium
xfwm4 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

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 firs,t 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.

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.

Revision history for this message
Seth Arnold (seth-arnold) wrote : Bug is not a security issue

Thanks for taking the time to report this bug and helping to make Ubuntu better. We appreciate the difficulties you are facing, but this appears to be a "regular" (non-security) bug. I have unmarked it as a security issue since this bug does not show evidence of allowing attackers to cross privilege boundaries nor directly cause loss of data/privacy. Please feel free to report any other bugs you may find.

information type: Private Security → Public
Revision history for this message
MR Zenwiz (mrzenwiz) wrote :

Thank you for the clarification.

I do hope this won't fall into the cracks - it is problematic in almost all cases.

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

Please forward this bug to the Xfce bug tracker. Thanks in advance.

https://bugzilla.xfce.org/

Revision history for this message
In , MR Zenwiz (mrzenwiz) wrote :

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.

Revision history for this message
In , Olivier Fourdan (fourdan) wrote :

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).

Changed in xfwm4:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
In , MR Zenwiz (mrzenwiz) wrote :

I already have that disabled.

Revision history for this message
In , Steve Dodier-Lazaro (sidi) wrote :

Waiting to see if Olivier's recommendation works.

Changed in xfwm4:
status: Confirmed → Incomplete
Revision history for this message
MR Zenwiz (mrzenwiz) wrote :

Please see comment #6 - I already have the focus stealing prevention disabled.

That does not help.

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

MR Zenwiz, comment #6 does not appear in the Xfce bug report. Please add it again to continue the discussion.

Revision history for this message
MR Zenwiz (mrzenwiz) wrote :

Again:

In xfce bugzilla #11545, comment #5, Olivier said: "Please try disabling focus stealing prevention (in xfwm4-tweaks) as this would cause such behaviour."

In xfce bugzilla #11545, comments #6, I said "I already have that disabled."

(I see both of these here in bug watcher.)

In this bug watcher, comment #8, I repeated and amplified: "I already have the focus stealing prevention disabled. That does not help."

How can I make it clearer that disabling focus stealing prevention does not make a difference (it is already disabled)?

Revision history for this message
In , Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

https://bugs.launchpad.net/ubuntu/+source/xfwm4/+bug/1377569

This reply was added here, but it somehow vanished:

"I already have that disabled."

Revision history for this message
In , Olivier Fourdan (fourdan) wrote :

I'd need a detailed step-by-step reproducer

Revision history for this message
In , Olivier Fourdan (fourdan) wrote :

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.

Changed in xfwm4:
importance: High → Medium
Revision history for this message
In , Olivier Fourdan (fourdan) wrote :

(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.

Revision history for this message
MR Zenwiz (mrzenwiz) wrote :

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?

I'll see what I can do about the rest when I'm at home. Part of the problem with the step-by-step procedure is that it doesn't seem to be 100% consistent. I'll post what I see.

Typically, it 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 ahppen 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).

Thanks.

Thanks.

Revision history for this message
MR Zenwiz (mrzenwiz) wrote :

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.

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

It may be a bit confusing, but please copy & paste the last two comments over to your upstream report:

https://bugzilla.xfce.org/show_bug.cgi?id=11545

The xfwm4 developer does not follow the status of this launchpad report.

Revision history for this message
In , MR Zenwiz (mrzenwiz) wrote :

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.

Revision history for this message
MR Zenwiz (mrzenwiz) wrote : Re: [Bug 1377569] Re: Window focus does not always switch to new window even when this is the setting

Thanks. Done.

On Sat, May 16, 2015 at 1:48 AM, Thaddaeus Tintenfisch
<email address hidden> wrote:
> It may be a bit confusing, but please copy & paste the last two comments
> over to your upstream report:
>
> https://bugzilla.xfce.org/show_bug.cgi?id=11545
>
> The xfwm4 developer does not follow the status of this launchpad report.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1377569
>
> Title:
> Window focus does not always switch to new window even when this is
> the setting
>
> Status in Xfce4 window manager:
> Incomplete
> Status in xfwm4 package in Ubuntu:
> New
>
> Bug description:
> 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 firs,t 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.
>
> 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.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/xfwm4/+bug/1377569/+subscriptions

Revision history for this message
In , Olivier Fourdan (fourdan) wrote :

(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).

Revision history for this message
In , MR Zenwiz (mrzenwiz) wrote :

(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.

Revision history for this message
MR Zenwiz (mrzenwiz) wrote :

This may be a duplicat eof that, but it the same bug I filed in xfce bugzilla 11545, so I'm dropping this issue here.

Thanks, everyone.

Revision history for this message
In , Olivier Fourdan (fourdan) wrote :

(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.

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

xfwm4 4.12.3 will be available in Xubuntu 15.04 soon. Please test and report back.

Changed in xfwm4 (Ubuntu):
status: New → Incomplete
Revision history for this message
MR Zenwiz (mrzenwiz) wrote :

As nice as that must be for folks on 15.04, I like to stick with LTS releases, so I won't be upgrading at least until 16.04 LTS comes out.

Are there any options for us LTS fans, other than downloading and building the source ourselves?

Thanks.

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

You can use the Xfce 4.12 PPA [1] which is managed by the Xubuntu Developers.
However, not all packages are updated to the latest version yet.

I would suggest that you simply download Xubuntu 15.10 (current development release) and boot into the live session to test the new xfwm4 version.

[1] https://launchpad.net/~xubuntu-dev/+archive/ubuntu/xfce-4.12

Revision history for this message
In , MR Zenwiz (mrzenwiz) wrote :

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.

Revision history for this message
In , Olivier Fourdan (fourdan) wrote :

(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.

Revision history for this message
Theo Linkspfeifer (lastonestanding) wrote :

Closing this report.

Changed in xfwm4 (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.