diff options
author | Vincent Untz <vuntz@gnome.org> | 2011-01-19 22:47:49 +0100 |
---|---|---|
committer | Vincent Untz <vuntz@gnome.org> | 2011-01-20 14:48:36 +0100 |
commit | 5d08138ed40a4869c89133acab5d17e676405ccc (patch) | |
tree | 47621eead02d1cbeb7be32a6bc7a1643569c5629 /libwnck/xutils.c | |
parent | f8002a6afd6f527d9db7f039cccf3212deea648d (diff) | |
download | libwnck-5d08138ed40a4869c89133acab5d17e676405ccc.tar.gz |
core: Add Screen argument to _wnck_get_utf8_property()
Diffstat (limited to 'libwnck/xutils.c')
-rw-r--r-- | libwnck/xutils.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libwnck/xutils.c b/libwnck/xutils.c index 1a0450c..23f89d7 100644 --- a/libwnck/xutils.c +++ b/libwnck/xutils.c @@ -358,9 +358,11 @@ _wnck_get_string_property_latin1 (Screen *screen, } char* -_wnck_get_utf8_property (Window xwindow, +_wnck_get_utf8_property (Screen *screen, + Window xwindow, Atom atom) { + Display *display; Atom type; int format; gulong nitems; @@ -370,12 +372,14 @@ _wnck_get_utf8_property (Window xwindow, char *retval; Atom utf8_string; + display = DisplayOfScreen (screen); + utf8_string = _wnck_atom_get ("UTF8_STRING"); _wnck_error_trap_push (); type = None; val = NULL; - result = XGetWindowProperty (_wnck_get_default_display(), + result = XGetWindowProperty (display, xwindow, atom, 0, G_MAXLONG, @@ -1186,11 +1190,11 @@ _wnck_get_name (Screen *screen, { char *name; - name = _wnck_get_utf8_property (xwindow, + name = _wnck_get_utf8_property (screen, xwindow, _wnck_atom_get ("_NET_WM_VISIBLE_NAME")); if (name == NULL) - name = _wnck_get_utf8_property (xwindow, + name = _wnck_get_utf8_property (screen, xwindow, _wnck_atom_get ("_NET_WM_NAME")); if (name == NULL) @@ -1206,11 +1210,11 @@ _wnck_get_icon_name (Screen *screen, { char *name; - name = _wnck_get_utf8_property (xwindow, + name = _wnck_get_utf8_property (screen, xwindow, _wnck_atom_get ("_NET_WM_VISIBLE_ICON_NAME")); if (name == NULL) - name = _wnck_get_utf8_property (xwindow, + name = _wnck_get_utf8_property (screen, xwindow, _wnck_atom_get ("_NET_WM_ICON_NAME")); if (name == NULL) |