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 97737 - not setting _NET_WM_STATE_SKIP_{TASKBAR,PAGER} props
not setting _NET_WM_STATE_SKIP_{TASKBAR,PAGER} props
Status: RESOLVED NOTGNOME
Product: metacity
Classification: Other
Component: general
unspecified
Other other
: High normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2002-11-05 15:15 UTC by Diego.SantaCruz
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
xprop output with gkrellm's do not include taskbar, pager options set (1.19 KB, text/plain)
2002-11-05 15:18 UTC, Diego.SantaCruz
Details
xprop output of gkrellm window before it is mapped (i.e just before gtk_widget_show()). (916 bytes, text/plain)
2002-12-03 17:59 UTC, Diego.SantaCruz
Details
metacity debug log concerning gkrellm window (id 0x800002) (12.65 KB, text/plain)
2002-12-03 18:01 UTC, Diego.SantaCruz
Details

Description Diego.SantaCruz 2002-11-05 15:15:20 UTC
Apparently metacity is not setting the _NET_WM_STATE_SKIP_TASKBAR and
_NET_WM_STATE_SKIP_PAGER properties on the client window when the
corresponding _NET_WM_STATE message is received.

Using gkrellm-2.1.0 with metacity-2.4.0.92-5 (Red Hat 8.0) and toggling the
"Do not include on a taskbar" or "Do not include on a pager" preferences
(General prefs, Properties tab) does not work. As far as I can tell,
gkrellm sends the _NET_WM_STATE message, but xprop shows that nothing is
set in the _NET_WM_STATE property.
Comment 1 Diego.SantaCruz 2002-11-05 15:18:11 UTC
Created attachment 12059 [details]
xprop output with gkrellm's do not include taskbar, pager options set
Comment 2 Havoc Pennington 2002-11-05 15:31:07 UTC
In principle fixed here:

2002-08-05  Ross Burton <ross@burtonini.com>

        * src/window.c: (meta_window_client_message): Set
        ->wm_state_skip_pager (ditto for _taskbar) instead of ->skip_pager
        so that these hints actually work. Fixes #89850.
Comment 3 Diego.SantaCruz 2002-11-05 15:46:18 UTC
Yes, I saw that bug report. However, that bug fix appears a day before
2.4.0 release in the changelog, so I guess the fix is present in Red
Hat's metacity-2.4.0.92-5... but it does not work :-(

Any ideas?
Comment 4 Havoc Pennington 2002-11-05 16:26:32 UTC
which version of gkrellm tries to set these props? can I get a copy of it?
Comment 5 Diego.SantaCruz 2002-11-05 16:42:02 UTC
gkrellm 2.1.0, from http://web.wt.net/~billw/gkrellm/gkrellm.html

You can get a Red Hat 8.0 RPM from http://ltswww.epfl.ch/~dsanta/tmp/,
but of course that does not allow for much debugging.
Comment 6 Heath Harrelson 2002-11-06 14:14:31 UTC
I'm going to mark this high, since it's possible that the patch in bug
89850 didn't work or something has broken this since that fix.
Comment 7 Havoc Pennington 2002-11-20 04:40:36 UTC
Turns out that 89850 fix was slightly wrong, but the main problem here 
is a gkrellm bug. Namely, gdk_atom_intern() doesn't return an 
Atom, it returns a GdkAtom. These were the same in GTK 1.2 but are not
in GTK 2.0. So now with 2.0 it's necessary to use
gdk_x11_get_xatom_by_name(). This needs to be fixed for both 
gdk_atom_intern() in winops-x11.c:net_wm_state() in gkrellm.

Also, on startup gkrellm needs to set the _NET_WM_STATE property 
prior to mapping (gtk_window_show()) its window. Sending the client 
message won't work until the window manager is done managing the
window, which means some undefined time after calling gtk_window_show().
Comment 8 Havoc Pennington 2002-11-20 04:42:22 UTC
I mailed the gkrellm author a pointer to this bug.
Comment 9 Diego.SantaCruz 2002-12-03 17:58:00 UTC
Sorry to keep bashing on this, but after the author modified the
gkrellm source as explained above I cannot get it to work correctly.
Specifically, toggling the skip {taskbar,pager} properties after
startup does work now so the client messages are correctly sent.

However, it seems that metacity ignores the _NET_WM_STATE property
that it is set before the window is mapped and clobbers it with an
empty value.

I have placed an XSync(display,False);sleep(10); in gkrellm's source
just before gtk_widget_show() of the top-level window so that I can
read the properties before the metacity touches them. I attach next
the result, but you can see that the _NET_WM_STATE property is set:

_NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER

However, once the window is mapped it is 

_NET_WM_STATE(ATOM) =

The metacity log also says "Setting _NET_WM_STATE with 0 atoms" but it
never mentions that it reads the initial value.

So it looks like metacity is ignoring the initial _NET_WM_STATE value
of the window, or am I wrong? Or am I missing something about the use
of _NET_WM_STATE?


Running metacity-2.4.0.92-5 from RedHat 8.0.
Comment 10 Diego.SantaCruz 2002-12-03 17:59:49 UTC
Created attachment 12721 [details]
xprop output of gkrellm window before it is mapped (i.e just before gtk_widget_show()).
Comment 11 Diego.SantaCruz 2002-12-03 18:01:06 UTC
Created attachment 12722 [details]
metacity debug log concerning gkrellm window (id 0x800002)
Comment 12 Havoc Pennington 2002-12-03 18:51:59 UTC
Should be fixed in newer metacity. Ross fixed it August 5 and I fixed
it more a while after that.
Comment 13 Diego.SantaCruz 2002-12-05 15:04:38 UTC
AFAIK, the version I'm running (metacity-2.4.0.92-5) includes the fix
from Aug. 5, but not the later fix to the fix.

I will probably test a more recent version when the 2nd fix appears in
RedHat's rawhide (right now it's at 2.4.3-1).