Window border focus indication misbehaves

Bug #879156 reported by Christian W. Moesgaard
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Unity
Confirmed
Undecided
Unassigned
unity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Since updating to/reinstalling (happens in both cases) Ubuntu 11.10 x86, the window borders behave strangely. I have an Intel Core 2 Duo @ 2.53GHz, an ATi Radeon 4650M GPU (FGLRX and RadeonHD shows the same behavior) and 4GB of RAM.

I am unsure of which package it pertains to, but it could be compiz:
  Installed: 1:0.9.6+bzr20110929-0ubuntu5
  Candidate: 1:0.9.6+bzr20110929-0ubuntu5
  Version table:
 *** 1:0.9.6+bzr20110929-0ubuntu5 0
        500 http://dk.archive.ubuntu.com/ubuntu/ oneiric-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1:0.9.6+bzr20110929-0ubuntu3 0
        500 http://dk.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages

Or Metacity:
  Installed: 1:2.34.1-1ubuntu4
  Candidate: 1:2.34.1-1ubuntu4
  Version table:
 *** 1:2.34.1-1ubuntu4 0
        500 http://dk.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
        100 /var/lib/dpkg/status

I expect that the title bar and general button theme of the close/min/max buttons change when I focus on another window to indicate which window is active.

Functionality wise, the desktop seems to work correctly, however sometimes the focused Window is not indicated as such, or unfocused windows are indicated as focused, which is different from expected behavior. For example, as I am writing this, the terminal from which I gathered the above data has a titlebar indicating that it is focused, but it is clear that Firefox is.
Firefox drops it's shadow correctly, indicating that it is "on top", but the titlebars indicate the Terminal, and Maple 15, and Firefox, and Nautilus are on top.

While not a huge problem, this is slightly distracting and could be indicative of a deeper problem. I'm willing to provide anything you need in terms of logs/specs etc.

Revision history for this message
Aldo Nogueira (aldo-nogueira) wrote :

The same bug happens here( Ubuntu 11.10 and ATI 4770 with fglrx).
It seems the window borders are not updated.
Example:
 - Open gedit
 - Notice its window title is "Untitled Document 1 - gedit"
 - Type anything and same the document as something.txt
 - The window title is not updated
It should show the name of the file have just saved.

And then:
 - Close gedit
 - Double click the file you created so gedit will open it
 - The title is "something.txt (~) - gedit"
 - Press New to create a new document
 - The title is not changed
It should show "New Document" again

Focus is just another example of the same bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
status: New → Confirmed
Revision history for this message
Marvin (marvin-nospam) wrote :

What I experience is the following. Sometimes (I cannot really reproduce it since it appears to occur randomly) the either the following happens:
- multiple windows have a window decoration indicating that they have focus.
- or the window that actually has focus is not decorated in as a focused window.

With the default Ubuntu 11.10 theme I recognise a focused window because it has a orange close-button and the window title text is white. I recognise a window that has no focus by a grey close-button and a grey window title text.

When I resize an incorrectly decorated window, then the window decoration becomes what it should be. So it looks like unity does not catch any focus events from the X-server. Maybe this bug is related to https://bugs.launchpad.net/unity/+bug/772777 where a the window title does not get updated.

Revision history for this message
Marvin (marvin-nospam) wrote :

Come on guys why is there no activity around this bug? We are talking about functionality that you even may expect from a window manager of 15 years ago (or even older).

Revision history for this message
Christian W. Moesgaard (christian-moesgaard) wrote :

Indeed. It's so bad I ended up giving up on Ubuntu. Using mint now.

Revision history for this message
Marvin (marvin-nospam) wrote :

I added a screenshot that illustrates the problem. Here the Firefox window has focus. However the two windows behind it have an orange (instead of grey) close button and a white window title (instead of grey).
The error looks pretty random to me. Sometimes the window decorator works correct and sometimes it doesn't.

Revision history for this message
Marvin (marvin-nospam) wrote :

Please assign this bug to someone who is responsible for the development of the window decorator, that is the point to start hunting for this bug. Even if the bug is not in the window decorator, the developer can find out what software component to look at next.

Revision history for this message
Omer Akram (om26er) wrote :

Marvin, please dont' subscribe developers to bug reports randomly people who should be notified automatically get notified.

Revision history for this message
Christian W. Moesgaard (christian-moesgaard) wrote :

This is not a duplicate of the marked bug. It doesn't need to be two windows of the same application, and it may also opt to focus no window at all.

You may, incidentally, have fixed it by fixing the other bug. I don't know, I haven't tried to committed, fix, but this bug was not addressed directly.

I no longer use Ubuntu, so I cannot test. Someone please try to download and apply the fix committed to the other bug and see if it resolves this if they suffer from it. I doubt it has.

Revision history for this message
Marvin (marvin-nospam) wrote :

I agree with Christian: this is not a duplicate.

Revision history for this message
Marvin (marvin-nospam) wrote :

Okay I now also have a screenshot (screenshot0.png) of a situation that is much like the inverse of my previous screenshot: now all windows are decorated in such a way that I get the impression that none of the windows have focus (and I am sure the one on top has focus).

In screenshot1.png you can even see the situation where the window on top has focus but has an "unfocussed" window decoration, while the window under it has a "focussed" decoration.

Please have a look at all three screenshots and compare.

I hope the problem is now clear for everyone.

Revision history for this message
Marvin (marvin-nospam) wrote :

Okay so here is screenshot0.png

Revision history for this message
Marvin (marvin-nospam) wrote :

... and here is screenshot1.png

Revision history for this message
Marvin (marvin-nospam) wrote :

Again I think this is not a duplicate.

Revision history for this message
Niriel (daneel-libre) wrote :

I agree with Marvin, this bug is not a duplicate of bug #876573 since the current bug does not depend on the windows being of the same application or not.

I do experience similar problems with 11.10 using Unity and Compiz:

* all my title bars always have the same color, never showing whether they are focused or not. With one exception: Firefox is the only window that properly shows when it is unfocused.

* the title text is not updated when the application asks for it. Examples:
    - the "*" indicating that a document edited in Gimp or Gedit is modified does not appear unless the window is resized (forcing a redraw).
    - In the SDL applications I develop, I have to set the caption of the window before I open the window otherwise the title text never shows (until resized).
    - Exception: changing tabs in Firefox changes the title bar text of the Firefox window.

* the minimize/maximize/close buttons do not highlight when the mouse is over it, and aren't pressed when I click on them. The bug is only visual, because they do their job. Here again, Firefox is an exception.

All these points are about windows that are not maximized. The title text and the buttons in maximized windows work as expected, always.

I do not know why Firefox is so special for me. The fact that it starts maximized is not the reason: other applications that start maximized have the problems I describe when I un-maximize them.

Do you have the same problems with the title bar buttons, Marvin ?

Other possibly related bugs :
* 770283 but this is not a duplicate either since losing the focus does not redraw anything for me.
* 257391 which has been around since 2008.

Revision history for this message
Christian W. Moesgaard (christian-moesgaard) wrote :

We both notice that issue as well Niriel. This is simply the window border not updating.

I returned to Unity after hearing of the Compiz backport fixes, and while a TON has been fixed (it's no longer unstable, it no longer lags around etc. It works great!) this bug is still very present. It effects whichever version I am using right just as much as it affected the one for which this bug was filed.

NOT A DUPLICATE. You can stop ignoring it now, Ubuntu.

Revision history for this message
Christian W. Moesgaard (christian-moesgaard) wrote :

I forgot to mention that the version of Compiz I've added contains a fix for the problem that this is supposed to be a duplicate of this bug, so this cannot possibly be a duplicate and may not even be related.

Revision history for this message
Marco Biscaro (marcobiscaro2112) wrote :

Un-duplicating. I'm sorry for the inconvenience.

Revision history for this message
Marvin (marvin-nospam) wrote :

Like Niriel I also experience that the maximize/minimize/close buttons do not get highlighted on mouse over in wrongly decorated windows.

Like Niriel I also experience window titles not being updated. The bug report for this is:
https://bugs.launchpad.net/unity/+bug/770283

Like I mentioned before I think these bugs might be related. It might be the case that events received by the window manager from the X server, are not correctly forwarded to the code that is responsible for the window decorations.

Revision history for this message
Marvin (marvin-nospam) wrote :

Note that most people won't take the effort to report this bug or mark it as "affects me", because either they don't notice but most likely because they are still able to work with the system despite this bug. However I think this bug should get some priority, because correct window decorations is the least you might expect from a window manager from the last decade (this is no rocket science).

Revision history for this message
Eren Tantekin (eren-tantekin) wrote :

I had been using xmonad ever since i installed Ubuntu 11.10, so I never noticed this bug before. Now that I decided to try Unity, this is the first thing I noticed. This is actually intolerable. It simply is not possible to tell which window is focused unless you keep it in your memory all the time.

Revision history for this message
Eren Tantekin (eren-tantekin) wrote :

The problem appears to be (although I'm not sure yet) happen only with FGLRX. Switching back to open source ATI drivers seems to have resolved the issue for me.

Revision history for this message
Omer Akram (om26er) wrote :

duplicate bug 781384

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.