diff options
author | Shawn <sabetts@juicebox> | 2008-06-20 14:01:39 -0700 |
---|---|---|
committer | Shawn <sabetts@juicebox> | 2008-06-20 14:01:39 -0700 |
commit | 4e08030acf10a54af36e92b14624257fbf0835a4 (patch) | |
tree | 17d15c0cc37bfd889b92fcb5fbc65c6a23cbb9cc /src/manage.c | |
parent | ea17008472c85c2c931336774335261b8394a691 (diff) | |
download | ratpoison-4e08030acf10a54af36e92b14624257fbf0835a4.zip |
support the netwm dialog window type
Diffstat (limited to 'src/manage.c')
-rw-r--r-- | src/manage.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/manage.c b/src/manage.c index 1b12c58..8bad332 100644 --- a/src/manage.c +++ b/src/manage.c @@ -317,6 +317,32 @@ window_is_transient (rp_window *win) ; } +static Atom +get_net_wm_window_type (rp_window *win) +{ + Atom type, window_type = None; + int format; + unsigned long nitems; + unsigned long bytes_left; + unsigned char *data; + + if (win == NULL) + return None; + + if (XGetWindowProperty (dpy, win->w, _net_wm_window_type, 0, 1L, + False, XA_ATOM, &type, &format, + &nitems, &bytes_left, + &data) == Success && nitems > 0) + { + window_type = *(Atom *)data; + PRINT_DEBUG(("hey ya %ld %ld\n", window_type, _net_wm_window_type_dialog)); + } + XFree (data); + + return window_type; +} + + void update_window_information (rp_window *win) { @@ -339,6 +365,9 @@ update_window_information (rp_window *win) /* Transient status */ win->transient = XGetTransientForHint (dpy, win->w, &win->transient_for); + if (get_net_wm_window_type(win) == _net_wm_window_type_dialog) + win->transient = 1; + update_window_gravity (win); } |