diff options
author | Vincent Untz <vuntz@gnome.org> | 2010-09-11 13:17:57 +0200 |
---|---|---|
committer | Vincent Untz <vuntz@gnome.org> | 2010-09-11 13:17:57 +0200 |
commit | bbe6f86bbb95e1a30b3919dd141b61650024313e (patch) | |
tree | 7a41a161aad73180d44e369045cb8abbd301209e /libwnck/window.c | |
parent | 9c021619e2e4625a20bbdee683e762ae1159d9d6 (diff) | |
download | libwnck-bbe6f86bbb95e1a30b3919dd141b61650024313e.tar.gz |
[core, wnckprop] Stop using gdk_display
The gdk_display variable is deprecated.
See https://bugzilla.gnome.org/show_bug.cgi?id=629344
Diffstat (limited to 'libwnck/window.c')
-rw-r--r-- | libwnck/window.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libwnck/window.c b/libwnck/window.c index 30f8eb0..58fd0a2 100644 --- a/libwnck/window.c +++ b/libwnck/window.c @@ -579,6 +579,12 @@ _wnck_window_destroy (WnckWindow *window) g_object_unref (G_OBJECT (window)); } +static Display * +_wnck_window_get_display (WnckWindow *window) +{ + return DisplayOfScreen (WNCK_SCREEN_XSCREEN (window->priv->screen)); +} + /** * wnck_window_has_name: * @window: a #WnckWindow. @@ -979,7 +985,7 @@ wnck_window_set_window_type (WnckWindow *window, WnckWindowType wintype) } _wnck_error_trap_push (); - XChangeProperty (gdk_display, + XChangeProperty (_wnck_window_get_display (window), window->priv->xwindow, _wnck_atom_get ("_NET_WM_WINDOW_TYPE"), XA_ATOM, 32, PropModeReplace, @@ -3057,7 +3063,7 @@ update_wmhints (WnckWindow *window) return; _wnck_error_trap_push (); - hints = XGetWMHints (gdk_display, window->priv->xwindow); + hints = XGetWMHints (_wnck_window_get_display (window), window->priv->xwindow); _wnck_error_trap_pop (); if (hints) |