diff options
author | Vincent Untz <vuntz@gnome.org> | 2011-01-19 22:59:30 +0100 |
---|---|---|
committer | Vincent Untz <vuntz@gnome.org> | 2011-01-20 14:48:36 +0100 |
commit | f6c123a7e96a9993846966f2076c88df1e5dee69 (patch) | |
tree | 8173209e318ffc3702e09f6e8548943b76f9f561 /libwnck | |
parent | 7c9f9636a4dc864d7c8d1d099a49209f5736d56c (diff) | |
download | libwnck-f6c123a7e96a9993846966f2076c88df1e5dee69.tar.gz |
core: Add Screen argument to _wnck_get_cardinal_list(), ...
... _wnck_get_frame_extents().
Diffstat (limited to 'libwnck')
-rw-r--r-- | libwnck/screen.c | 9 | ||||
-rw-r--r-- | libwnck/window.c | 3 | ||||
-rw-r--r-- | libwnck/xutils.c | 13 | ||||
-rw-r--r-- | libwnck/xutils.h | 6 |
4 files changed, 21 insertions, 10 deletions
diff --git a/libwnck/screen.c b/libwnck/screen.c index 88ae9e2..4a92b9c 100644 --- a/libwnck/screen.c +++ b/libwnck/screen.c @@ -1865,7 +1865,8 @@ update_viewport_settings (WnckScreen *screen) p_coord = NULL; n_coord = 0; - if (_wnck_get_cardinal_list (screen->priv->xroot, + if (_wnck_get_cardinal_list (WNCK_SCREEN_XSCREEN (screen), + screen->priv->xroot, _wnck_atom_get ("_NET_DESKTOP_GEOMETRY"), &p_coord, &n_coord) && p_coord != NULL) @@ -1898,7 +1899,8 @@ update_viewport_settings (WnckScreen *screen) p_coord = NULL; n_coord = 0; - if (_wnck_get_cardinal_list (screen->priv->xroot, + if (_wnck_get_cardinal_list (WNCK_SCREEN_XSCREEN (screen), + screen->priv->xroot, _wnck_atom_get ("_NET_DESKTOP_VIEWPORT"), &p_coord, &n_coord) && p_coord != NULL) @@ -2024,7 +2026,8 @@ update_workspace_layout (WnckScreen *screen) list = NULL; n_items = 0; - if (_wnck_get_cardinal_list (screen->priv->xroot, + if (_wnck_get_cardinal_list (WNCK_SCREEN_XSCREEN (screen), + screen->priv->xroot, _wnck_atom_get ("_NET_DESKTOP_LAYOUT"), &list, &n_items)) diff --git a/libwnck/window.c b/libwnck/window.c index 376ddef..3bad7a5 100644 --- a/libwnck/window.c +++ b/libwnck/window.c @@ -3118,7 +3118,8 @@ update_frame_extents (WnckWindow *window) left = right = top = bottom = 0; - if (!_wnck_get_frame_extents (window->priv->xwindow, + if (!_wnck_get_frame_extents (WNCK_SCREEN_XSCREEN (window->priv->screen), + window->priv->xwindow, &left, &right, &top, &bottom)) return; diff --git a/libwnck/xutils.c b/libwnck/xutils.c index 620d1b5..71bd3c5 100644 --- a/libwnck/xutils.c +++ b/libwnck/xutils.c @@ -513,11 +513,13 @@ _wnck_get_atom_list (Screen *screen, } gboolean -_wnck_get_cardinal_list (Window xwindow, +_wnck_get_cardinal_list (Screen *screen, + Window xwindow, Atom atom, gulong **cardinals, int *len) { + Display *display; Atom type; int format; gulong nitems; @@ -525,12 +527,14 @@ _wnck_get_cardinal_list (Window xwindow, gulong *nums; int err, result; + display = DisplayOfScreen (screen); + *cardinals = NULL; *len = 0; _wnck_error_trap_push (); type = None; - result = XGetWindowProperty (_wnck_get_default_display(), + result = XGetWindowProperty (display, xwindow, atom, 0, G_MAXLONG, @@ -1304,7 +1308,8 @@ _wnck_get_wmclass (Window xwindow, } gboolean -_wnck_get_frame_extents (Window xwindow, +_wnck_get_frame_extents (Screen *screen, + Window xwindow, int *left_frame, int *right_frame, int *top_frame, @@ -1318,7 +1323,7 @@ _wnck_get_frame_extents (Window xwindow, p_size = NULL; n_size = 0; - _wnck_get_cardinal_list (xwindow, + _wnck_get_cardinal_list (screen, xwindow, _wnck_atom_get ("_NET_FRAME_EXTENTS"), &p_size, &n_size); diff --git a/libwnck/xutils.h b/libwnck/xutils.h index 0e86789..a100bb9 100644 --- a/libwnck/xutils.h +++ b/libwnck/xutils.h @@ -72,7 +72,8 @@ gboolean _wnck_get_atom_list (Screen *screen, Atom atom, Atom **atoms, int *len); -gboolean _wnck_get_cardinal_list (Window xwindow, +gboolean _wnck_get_cardinal_list (Screen *screen, + Window xwindow, Atom atom, gulong **cardinals, int *len); @@ -132,7 +133,8 @@ char* _wnck_get_res_class_utf8 (Window xwindow); void _wnck_get_wmclass (Window xwindow, char **res_class, char **res_name); -gboolean _wnck_get_frame_extents (Window xwindow, +gboolean _wnck_get_frame_extents (Screen *screen, + Window xwindow, int *left_frame, int *right_frame, int *top_frame, |