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 572759 - Contact list doesn't appear in windows list when respawned
Contact list doesn't appear in windows list when respawned
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.25.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
: 586292 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-02-22 17:15 UTC by Guillaume Desmottes
Modified: 2009-06-23 09:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
make_window_appear_in_tasklist.patch (530 bytes, patch)
2009-05-22 10:38 UTC, Nicolò Chieffo
committed Details | Review

Description Guillaume Desmottes 2009-02-22 17:15:27 UTC
To reproduce:
- Close the contact list (click on the WM close button)
- Try to start another instance of Empathy
- The existing contact list is displayed but doesn't appear in the windows list
Comment 1 Nicolò Chieffo 2009-05-22 09:58:19 UTC
This also happens with the following steps:
- open empathy (the windows list entry for empathy is shown)
- click on the tray icon (the window gets hidden)
- click again on the tray icon (no window list entry)

the function that does this is empathy_window_present() in libempathy-gtk/empathy-ui-utils.c line 1273.

I don't know the gtk function to hide and set an entry in the windows list. do you?

Comment 2 Xavier Claessens 2009-05-22 10:04:17 UTC
Probably a WM bug too.
Comment 3 Nicolò Chieffo 2009-05-22 10:16:24 UTC
The problem is here:

	if (!empathy_window_get_is_visible (window)) {
		/* Hide it so present brings it to the current workspace. */
		gtk_widget_hide (GTK_WIDGET (window));
	}

commenting it fixes the problem.
I tried to add gtk_widget_show (GTK_WIDGET (window)); after the gtk_window_present statement, but it does not work every time, only sometime the entry in the window list is shown.
I will try something else.

Xavier, do you have a suggestion?
Comment 4 Nicolò Chieffo 2009-05-22 10:38:07 UTC
Created attachment 135164 [details] [review]
make_window_appear_in_tasklist.patch

I managed to fix it. Here's the patch
Comment 5 Xavier Claessens 2009-05-22 10:59:35 UTC
It looks like a workaround that probably work by accident. If such a trivial change makes it works, it's definitely a WM bug.
Comment 6 Xavier Claessens 2009-05-22 10:59:58 UTC
I prefer to wait for metacity developper's advice.
Comment 7 Nicolò Chieffo 2009-05-22 11:02:14 UTC
Are you sure it's a workaround?

First of all you present the window, then you tell that it must have a taskbar icon. If the windows is still hidden, you won't have a taskbar icon.
Comment 8 Xavier Claessens 2009-05-22 11:18:44 UTC
It works for me 99% of the time, so surely metacity is capable of setting the skip taskbar hint when the window is not presented yet, and remember when it gets presented. If look suspicious to me if it does not do that 100% of times.
Comment 9 Nicolò Chieffo 2009-05-22 11:22:13 UTC
Yes, you are right, it's a workaround.

the fault is not metacity (I think), it's in compiz.
In fact using plain metacity this happens:
- first click = window hidden
- second click = window appears flashing in the taskbar, but is not presented
- third click = window is presented
- fourth click = first click
and so on.

I don't know if this is a wanted behaviour (the second click should immediately present the window, and not only make it appear flashing in the taskbar).

How can compiz change the taskbar?
Comment 10 Frederic Peters 2009-06-17 21:26:32 UTC
Xavier, the patch doesn't add any complexity to Empathy, and has no side effect (as far as I know), could it be applied (even though we know various window managers are at fault) ?
Comment 11 Xavier Claessens 2009-06-18 10:12:22 UTC
Bah, let's commit that patch and wait for bug report from another WM (or even another metacity version) that break because it is expecting functions to be called in the other way.
Comment 12 Pierre-Luc Beaudoin 2009-06-18 17:32:46 UTC
*** Bug 586292 has been marked as a duplicate of this bug. ***
Comment 13 Nicolò Chieffo 2009-06-18 17:42:01 UTC
Xavier, my metacity doesn't have problems
Comment 14 Nicolò Chieffo 2009-06-23 08:26:06 UTC
did you forget to commit this patch? I can't see it in git master
Comment 15 Guillaume Desmottes 2009-06-23 09:24:12 UTC
I just commited it. Is that enough to close this bug?
Comment 16 Nicolò Chieffo 2009-06-23 09:28:00 UTC
I think so, since my metacity does not have problems... it's only compiz
Comment 17 Guillaume Desmottes 2009-06-23 09:48:07 UTC
Ok, closing it for now then.