_NET_WM_STATE and gdk_property_change
- From: Leonardo Quijano Vincenzi <lquijano hotpop com>
- To: gtk-list gnome org
- Subject: _NET_WM_STATE and gdk_property_change
- Date: Tue, 22 Jun 2004 10:48:03 -0600
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello.
I'm using GTK 2.2, and I need to make an 'always on top' app. I checked
out the doc and I found out the gtk_window_set_keep_above() function,
but that's only for GTK 2.4 :(.
So, how do I do that on GTK 2.2? I checked out the source code for this
function, but it uses XSendEvent and other X things that I'd rather not
use unless is strictly necessary. I tried using gdk_property_change,
like this:
~ GdkAtom wm_state[3];
~ wm_state[0] = (GdkAtom) 1; /* _NET_WM_STATE_ADD */
~ wm_state[1] = gdk_atom_intern("_NET_WM_STATE_ABOVE", FALSE);
~ wm_state[2] = 0;
~ gtk_widget_realize(main_window.window);
~ gdk_property_change(
~ main_window.window->window,
gdk_atom_intern("_NET_WM_STATE", FALSE),
gdk_atom_intern("ATOM", FALSE),
32, GDK_PROP_MODE_REPLACE,
(guchar *) &wm_state, 1);
But this isn't working. I don't know if the problem is on the
gdk_property_change parameters, the wm_state array, or even if I can't
really use this function. I'd really like to keep using GDK instead of
directly Xlib. But any pointers would be appreciated.
Thanks!
- --
Ing. Leonardo Quijano Vincenzi <lquijano hotpop com>
Promovamos estándares abiertos, no utilicemos formatos secretos para la
información. Evitemos el uso de formatos .DOC, .XLS, etc.
http://www.fsf.org/philosophy/no-word-attachments.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFA2GLDGsrxG8/hm1ERApCqAJ41jxSIhffqgiFrpp8ZmTBOKmfv6QCfdF+L
FhLoIJyUBcTI2PwcFVyh/mE=
=cb4g
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]