[libwnck] core: Add Screen argument to _wnck_get_wm_state()
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck] core: Add Screen argument to _wnck_get_wm_state()
- Date: Thu, 20 Jan 2011 15:35:32 +0000 (UTC)
commit ad924f00adc626efffe82645fb6cbf79b6d3c3f5
Author: Vincent Untz <vuntz gnome org>
Date: Wed Jan 19 22:24:01 2011 +0100
core: Add Screen argument to _wnck_get_wm_state()
libwnck/window.c | 3 ++-
libwnck/xutils.c | 8 ++++++--
libwnck/xutils.h | 3 ++-
3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/libwnck/window.c b/libwnck/window.c
index 01c9e96..aa0bd3a 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -2599,7 +2599,8 @@ update_wm_state (WnckWindow *window)
window->priv->wm_state_iconic = FALSE;
- state = _wnck_get_wm_state (window->priv->xwindow);
+ state = _wnck_get_wm_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
+ window->priv->xwindow);
if (state == IconicState)
window->priv->wm_state_iconic = TRUE;
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 8696b7f..dcf49c1 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -76,8 +76,10 @@ _wnck_get_cardinal (Screen *screen,
}
int
-_wnck_get_wm_state (Window xwindow)
+_wnck_get_wm_state (Screen *screen,
+ Window xwindow)
{
+ Display *display;
Atom type;
int format;
gulong nitems;
@@ -87,12 +89,14 @@ _wnck_get_wm_state (Window xwindow)
Atom wm_state;
int retval;
+ display = DisplayOfScreen (screen);
+
wm_state = _wnck_atom_get ("WM_STATE");
retval = NormalState;
_wnck_error_trap_push ();
type = None;
- result = XGetWindowProperty (_wnck_get_default_display(),
+ result = XGetWindowProperty (display,
xwindow,
wm_state,
0, G_MAXLONG,
diff --git a/libwnck/xutils.h b/libwnck/xutils.h
index 8246d48..c32327a 100644
--- a/libwnck/xutils.h
+++ b/libwnck/xutils.h
@@ -42,7 +42,8 @@ gboolean _wnck_get_cardinal (Screen *screen,
Window xwindow,
Atom atom,
int *val);
-int _wnck_get_wm_state (Window xwindow);
+int _wnck_get_wm_state (Screen *screen,
+ Window xwindow);
gboolean _wnck_get_window (Window xwindow,
Atom atom,
Window *val);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]