[libwnck] core: Add Screen argument to _wnck_get_window_list()
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck] core: Add Screen argument to _wnck_get_window_list()
- Date: Thu, 20 Jan 2011 15:36:08 +0000 (UTC)
commit 693b348b339224646a59d87536a2c806b058d37a
Author: Vincent Untz <vuntz gnome org>
Date: Wed Jan 19 22:51:43 2011 +0100
core: Add Screen argument to _wnck_get_window_list()
libwnck/screen.c | 6 ++++--
libwnck/xutils.c | 8 ++++++--
libwnck/xutils.h | 3 ++-
3 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/libwnck/screen.c b/libwnck/screen.c
index f93d7ca..88ae9e2 100644
--- a/libwnck/screen.c
+++ b/libwnck/screen.c
@@ -1453,14 +1453,16 @@ update_client_list (WnckScreen *screen)
stack = NULL;
stack_length = 0;
- _wnck_get_window_list (screen->priv->xroot,
+ _wnck_get_window_list (WNCK_SCREEN_XSCREEN (screen),
+ screen->priv->xroot,
_wnck_atom_get ("_NET_CLIENT_LIST_STACKING"),
&stack,
&stack_length);
mapping = NULL;
mapping_length = 0;
- _wnck_get_window_list (screen->priv->xroot,
+ _wnck_get_window_list (WNCK_SCREEN_XSCREEN (screen),
+ screen->priv->xroot,
_wnck_atom_get ("_NET_CLIENT_LIST"),
&mapping,
&mapping_length);
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 23f89d7..d123b06 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -417,11 +417,13 @@ _wnck_get_utf8_property (Screen *screen,
}
gboolean
-_wnck_get_window_list (Window xwindow,
+_wnck_get_window_list (Screen *screen,
+ Window xwindow,
Atom atom,
Window **windows,
int *len)
{
+ Display *display;
Atom type;
int format;
gulong nitems;
@@ -429,12 +431,14 @@ _wnck_get_window_list (Window xwindow,
Window *data;
int err, result;
+ display = DisplayOfScreen (screen);
+
*windows = NULL;
*len = 0;
_wnck_error_trap_push ();
type = None;
- result = XGetWindowProperty (_wnck_get_default_display(),
+ result = XGetWindowProperty (display,
xwindow,
atom,
0, G_MAXLONG,
diff --git a/libwnck/xutils.h b/libwnck/xutils.h
index 81dd427..be52f32 100644
--- a/libwnck/xutils.h
+++ b/libwnck/xutils.h
@@ -62,7 +62,8 @@ char* _wnck_get_text_property (Screen *screen,
char* _wnck_get_utf8_property (Screen *screen,
Window xwindow,
Atom atom);
-gboolean _wnck_get_window_list (Window xwindow,
+gboolean _wnck_get_window_list (Screen *screen,
+ Window xwindow,
Atom atom,
Window **windows,
int *len);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]