List Info

Thread: How to know if metacity is the window manager?




How to know if metacity is the window manager?
user name
2006-11-27 11:57:17
Quick question - is there some sort of definitive X property
or
environmentment variable that tells me what the window
manager is,
whether it's metacity or sawfish or compiz or whatever?

Context: I have a program that would like to respect
metacity's gconf
settings for e.g. focus-follows-mouse, *provided* that
metacity is
indeed the window manager.
_______________________________________________
metacity-devel-list mailing list
metacity-devel-listgnome.org
http://mail.gnome.org/mailman/listinfo/metacity-devel-
list
How to know if metacity is the window manager?
user name
2006-11-30 20:12:40
On 11/27/06, Nigel Tao <nigel.tao.gnomegmail.com> wrote:
> Quick question - is there some sort of definitive X
property or
> environmentment variable that tells me what the window
manager is,
> whether it's metacity or sawfish or compiz or whatever?

Yes:

1013 newrenamr:~$ xprop -root | grep CHECK
_NET_SUPPORTING_WM_CHECK(WINDOW): window id # 0x3000003
1014 newrenamr:~$ xprop -id 0x3000003
PRIMARY(STRING) =
_NET_SUPPORTING_WM_CHECK(WINDOW): window id # 0x3000003
_METACITY_VERSION(UTF8_STRING) = 0x32, 0x2e, 0x31, 0x37,
0x2e, 0x31
_NET_WM_NAME(UTF8_STRING) = 0x4d, 0x65, 0x74, 0x61, 0x63,
0x69, 0x74, 0x79

> Context: I have a program that would like to respect
metacity's gconf
> settings for e.g. focus-follows-mouse, *provided* that
metacity is
> indeed the window manager.

Why do you need to know the window manager's mouse focus
settings?
The only case I can think of for that is IDE for GUIs and
thus you
want to create the illusion of having "windows"
managed inside your
window.  Is there any other case?  (or are you, by chance
developing
such an IDE?)  Just curious...

Cheers,
Elijah
_______________________________________________
metacity-devel-list mailing list
metacity-devel-listgnome.org
http://mail.gnome.org/mailman/listinfo/metacity-devel-
list
How to know if metacity is the window manager?
user name
2006-12-01 00:04:11
> Why do you need to know the window manager's mouse
focus settings?
> The only case I can think of for that is IDE for GUIs
and thus you
> want to create the illusion of having
"windows" managed inside your
> window.  Is there any other case?  (or are you, by
chance developing
> such an IDE?)  Just curious...

I'm writing a (keyboard-activated) libwnck-based window
switcher [1]
that has an on-screen popup window (one that is
GTK_WIN_POS_CENTER_ALWAYS).  Now, under default settings,
things work
fine, but my WM is metacity with focus_mode sloppy and
auto_raise (or
something similar), and if the mouse is over window A, and I
switch
(via the keyboard) to window B, then this popup comes and
goes, the
mouse "re-enters" window A without ever having
moved, and window A
takes focus from window B.  Thus, my switcher can't actually
switch to
window B.

I have a work-around where I XWarpPointer the, uh, pointer
to be over
window B, so that when the popup goes away, the mouse
"enters" window
B, so it retains focus.  However, I only want to do this on
sloppy or
mouse focus_mode.  I'm reading the gconf values, but really
I should
also only inspect metacity's settings iff metacity is the
actual WM in
use.

That's my reasoning, better ideas welcomed.  Like if I can
somehow
suppress window A's raising some other way.

And while I'm here, AFAICT I can't raise or lower windows
Z-order (??)
through libwnck, since that's handled in metacity, right?


[1] http://code.g
oogle.com/p/superswitcher/
_______________________________________________
metacity-devel-list mailing list
metacity-devel-listgnome.org
http://mail.gnome.org/mailman/listinfo/metacity-devel-
list
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )