diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2010-12-26 03:47:24 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2010-12-29 19:55:59 +0800 |
commit | 53a5a7f37188ffaf3e050c5ad2e0852095a85c4b (patch) | |
tree | 8175b9d2c04f27ffddcf5e0b18ba646480868278 /libempathy-gtk | |
parent | bfb7a859f932c540c4695ba5489ab135506e8494 (diff) | |
download | gsoc2013-empathy-53a5a7f37188ffaf3e050c5ad2e0852095a85c4b.tar gsoc2013-empathy-53a5a7f37188ffaf3e050c5ad2e0852095a85c4b.tar.gz gsoc2013-empathy-53a5a7f37188ffaf3e050c5ad2e0852095a85c4b.tar.bz2 gsoc2013-empathy-53a5a7f37188ffaf3e050c5ad2e0852095a85c4b.tar.lz gsoc2013-empathy-53a5a7f37188ffaf3e050c5ad2e0852095a85c4b.tar.xz gsoc2013-empathy-53a5a7f37188ffaf3e050c5ad2e0852095a85c4b.tar.zst gsoc2013-empathy-53a5a7f37188ffaf3e050c5ad2e0852095a85c4b.zip |
Simplify filter adding code by just using gdk_x11 functions instead of hoops
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-avatar-image.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-avatar-image.c b/libempathy-gtk/empathy-avatar-image.c index a11627d15..3fb79692c 100644 --- a/libempathy-gtk/empathy-avatar-image.c +++ b/libempathy-gtk/empathy-avatar-image.c @@ -148,24 +148,22 @@ avatar_image_filter_func (GdkXEvent *gdkxevent, static void avatar_image_add_filter (EmpathyAvatarImage *avatar_image) { + Display *display; Window window; - GdkWindow *gdkwindow; gint mask; + XWindowAttributes attrs; mask = PropertyChangeMask; - window = GDK_ROOT_WINDOW (); - gdkwindow = gdk_x11_window_lookup_for_display (gdk_display_get_default (), - window); + window = gdk_x11_get_default_root_xwindow (); + display = gdk_x11_get_default_xdisplay (); gdk_error_trap_push (); - if (gdkwindow) { - XWindowAttributes attrs; - XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window, &attrs); - mask |= attrs.your_event_mask; - } - XSelectInput (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window, mask); + XGetWindowAttributes (display, window, &attrs); + mask |= attrs.your_event_mask; + + XSelectInput (display, window, mask); gdk_error_trap_pop_ignored (); |