! 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 !
Prevent overlapping Z-buffer placement for newly created windows
Status:
RESOLVED: FIXED
Severity:
enhancement

Comments

Description Christopher Wojno 2007-05-03 22:28:06 CEST
User-Agent:       Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.3) Gecko/20070421 Firefox/2.0.0.3
Build Identifier: 

It would be more convenient and secure if, when launched, newly created windows (that are non-model and not related to the generating application) would appear behind windows with focus.

The password dialog is also misleading as a dialog could appear for any reason from another application to deceive the user into entering a password. I consider this a minor security problem (as you could easily install a keylogger to do the same), but a browser could, theoretically, visit a malicious page to produce that dialog. Users should beware, but extra protection is always welcome. This is mostly just an annoyance.

Reproducible: Always

Steps to Reproduce:
1. XFCE configured and running
2. Open Thunderbird (use a master password or have check e-mail on startup enabled)
3. Open Firefix (before thunderbird appears)

Actual Results:  
Thunderbird will appear momentarily, then Firefox will appear OVER Thunderbird, Thunderbird's password prompt will appear OVER Firefox.

Expected Results:  
Thunderbird should appear, Firefox should appear with a Z-buffer such that Firefox is under the Thunderbird window, Thunderbird's prompt should appear over Thunderbird window.

I'm relatively certain that the platform and operating system has no bearing on the results, but I have not verified.

gtk-1.2.10_17
gtk-xfce-engine-2.4.1
glib-1.2.10_12
Comment 1 Olivier Fourdan editbugs 2007-05-04 07:26:22 CEST
This is already the case with focus stealing prevention enabled.
Comment 2 Christopher Wojno 2007-05-04 09:01:55 CEST
(In reply to comment #1)
> This is already the case with focus stealing prevention enabled.
> 

This is incorrect. Perhaps my setup is misconfigured, but under XFCE Settings Manager->Window Manager Tweaks[Focus]: Activate Focus Stealing Prevention is enabled and yet the behavior persists.

This isn't a focus issue, it's a Z-index issue for newly created windows.
Comment 3 Olivier Fourdan editbugs 2007-05-04 09:51:55 CEST
Stacking order is necessarily related to focus management. If focus stealing prevention is active, a window that is not focused will be placed under the focused window.

But if the window is focused, then it must be placed above otherwise the user may not be able to see the focused window.

So I'm not sure I understand your request.

Comment 4 Christopher Wojno 2007-05-04 17:09:15 CEST
(In reply to comment #3)
> Stacking order is necessarily related to focus management. If focus stealing
> prevention is active, a window that is not focused will be placed under the
> focused window.

Yes, but in this case no. The windows do not steal focus, they just appear over the old windows. So here's a hypothetical: I'll have 2 terminals open, one with vim, editing a(n) important file(s). Then, I decide to look up a function because I'll need it. Now, Firefox takes about 20 seconds to load, in that time I can continue to work while it loads. However, when it finally does load, it will appear OVER my vim terminal. The terminal will still have focus, but now I can't see it. So one of the primary purposes of keeping focus is lost unless I can continue to see what I'm doing (the other big purpose being security).

> But if the window is focused, then it must be placed above otherwise the user
> may not be able to see the focused window.
> 
> So I'm not sure I understand your request.

You are not misunderstanding; that is the request. I'm not suggesting making this the default setting, I agree, non-power users might be confused. It is my opinion that the current stacking policy is flawed (and has been for a long time). I should have the ability to allow xfwm help me rather than hinder me while I work. I don't understand why it "must" be placed over the window with which I'm working. I'm surprised no one else has brought this up before. The XFCE team has done an excellent job deviating from the norms windowing. By that I mean, there are a number of great features that other systems just don't have, though I value them.

Not to sound condescending, but I think users should know that the application just launched is really underneath the window they're currently working in. This is obvious to me and the Task List bar will display an entry for the window as well. In addition, the window manager intelligently places windows such that they fill the screen without overlapping (as much as possible). The user will see the window appear in the empty spots, unless, of course, the entire area is used.

Thanks for helping address my suggestion. I appreciate your efforts and prefer XFCE4 to all other window managers I've used.
Comment 5 Matthew Caron 2009-06-07 23:42:06 CEST
It looks like this behavior was added to xfce 4.6 (at least, based on the Jaunty builds). As such, it has me rolling back to Intrepid (4.4.3) as it renders xfce completely unusable. I have filed this as a bug here:

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

Specifically, the following is what is completely broken:

(1) Run firefox or thunderbird or some large window which has focus.
(2) Fire up an app (xterm, but that is likely not relevant) via a hotkey combination.
(3) Wait for it to start forever, and then you notice that it is sitting in the taskbar, because it has started behind the window with focus.

If you set new windows to have focus, it works correctly, but I don't want them to have focus.

An option for "force newly created windows on top of any existing windows" would be nice.

I suspect the reason for this is because I have focus stealing prevention turned on, so it shoves the new window behind the existing one. However, I don't want focus to change - I want the window which has focus to keep it, but the new window to always be on top.

Thanks.
Comment 6 Porcelain Mouse 2009-07-22 07:00:44 CEST
The behavior change that *may* have resulted from this request has ruined a perfectly useful and very longstanding behavior of Xfce's window manager.

As the requester states, the annoyance in question is simply that a dialog box from one application appears above the window of another application that is already obscuring the first application's window.  This is effectively a race condition.  Though the request is to put the "secondary" application below the primary application's initial window, I think there is an alternative behavior that avoids this annoyance without forfeiting the normal, legacy behavior.

I suggest a better solution is raise all of the primary application's windows when the new window is placed, but just before.  The result is that the primary application's other windows will be at the layer(s) just below the top window, which is the newest window on the stack.  This preserves the 'new windows always on top' behavior that I think is critical.  Also, the secondary application, who's window was created and placed between the time the primary's first and second window where created, is now *below* the primary application, as requested.  *But,* it is not, as is the case in the 4.6 behavior, below the other window.  This assumes you know which application spawned the window, though.  I think that information is known, but I'm not sure.  xfwm seems to track modal windows together with their applications very tightly, so, at least in the described test case, this solution would be effective even if it only applied to modal windows.  Perahps this should be two options?

Does that make sense?  And, please, this should be an option, not just implemented as a unilateral behavior change.

Finally, I don't think Christopher is conceded.  It's fair to ask for what you want.  And, that's what I'm doing.  But, the Xfce team took away the behavior I need when they implemented this request.  So, that is not acceptable.

When I installed 4.6 and my windows didn't show up, I *knew* they where there, somewhere.  Also, I do not run a task-bar, and some people have auto hide task-bars, so if that's the only indication of a new window, that's is not a reasonable trade off.

Plus, I don't see why the extra steps suggested by the requester are considered an acceptable solution to the large community that likes the traditional behavior, when they apply equally well to the requester.  Did anyone ask?

But, in any case, why should new windows go below?  Again, I'm not arguing that this is wrong behavior, as the behavior I like is called.  I just do not understand it.  Is it not a design principle that all new windows are placed at the top of the normal/middle stack?  Regardless, however, if this was just a configurable option instead of a design change, this would have been a smooth transition for everyone.

In fact, the only statements I think are incorrect are the following: (1) that hiding windows underneith is an security enhancement and that (2) "stacking order is necessarily related to focus management.  While what behavior is "best" is a subjective claim, these two are objective claims and neither of them are substantied in this thread.
Comment 7 Matthew Caron 2011-04-04 00:19:35 CEST
This is fixed in Xubuntu 11.04 Beta 1. (Xfwm 4.8.1). The downstream bug:

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

references patches applied from upstream. If those are actually mainlined patches, then I think we can call this fixed.

Bug #3200

Reported by:
Christopher Wojno
Reported on: 2007-05-03
Last modified on: 2020-05-21

People

Assignee:
Olivier Fourdan
CC List:
3 users

Version

Attachments

Additional information