[Xfce4-commits] [apps/xfdashboard] 02/08: Remove window tracker and window content with new interface classes to support multiple backends like X11, GDK and later maybe wayland. At the moment only X11 is supported as before.

noreply at xfce.org noreply at xfce.org
Tue Apr 4 18:41:53 CEST 2017


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit 54b1d7a5320f2a5268b8f52acd358b8a0e7fa9ff
Author: Stephan Haller <nomad at froevel.de>
Date:   Tue Apr 4 17:31:08 2017 +0200

    Remove window tracker and window content with new interface classes to support multiple backends like X11, GDK and later maybe wayland. At the moment only X11 is supported as before.
---
 libxfdashboard/window-content.c           | 2656 +----------------------------
 libxfdashboard/window-content.h           |   39 -
 libxfdashboard/window-tracker-monitor.c   |  469 ++---
 libxfdashboard/window-tracker-monitor.h   |   36 +-
 libxfdashboard/window-tracker-window.c    | 1301 +++++++-------
 libxfdashboard/window-tracker-window.h    |  225 ++-
 libxfdashboard/window-tracker-workspace.c |  219 ++-
 libxfdashboard/window-tracker-workspace.h |   51 +-
 libxfdashboard/window-tracker.c           | 1907 ++++++---------------
 libxfdashboard/window-tracker.h           |   72 +-
 10 files changed, 1643 insertions(+), 5332 deletions(-)

diff --git a/libxfdashboard/window-content.c b/libxfdashboard/window-content.c
index d5b7ff1..fea43eb 100644
--- a/libxfdashboard/window-content.c
+++ b/libxfdashboard/window-content.c
@@ -25,2198 +25,27 @@
 #include "config.h"
 #endif
 
-#define COGL_ENABLE_EXPERIMENTAL_API
-#define CLUTTER_ENABLE_EXPERIMENTAL_API
-
-#include <libxfdashboard/window-content.h>
-
-#include <glib/gi18n-lib.h>
-#include <clutter/x11/clutter-x11.h>
-#include <cogl/cogl-texture-pixmap-x11.h>
-#ifdef HAVE_XCOMPOSITE
-#include <X11/extensions/Xcomposite.h>
-#endif
-#ifdef HAVE_XDAMAGE
-#include <X11/extensions/Xdamage.h>
-#endif
-#include <gdk/gdkx.h>
-
-#include <libxfdashboard/application.h>
-#include <libxfdashboard/marshal.h>
-#include <libxfdashboard/stylable.h>
-#include <libxfdashboard/window-tracker.h>
-#include <libxfdashboard/enums.h>
-#include <libxfdashboard/compat.h>
-#include <libxfdashboard/debug.h>
-
-
-/* Definitions */
-typedef enum /*< skip,prefix=XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE >*/
-{
-	XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_NONE=0,
-	XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_UNMINIMIZING,
-	XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_REMINIMIZING,
-	XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_DONE
-} XfdashboardWindowContentWorkaroundMode;
-
-/* Define this class in GObject system */
-static void _xdashboard_window_content_clutter_content_iface_init(ClutterContentIface *iface);
-static void _xfdashboard_window_content_stylable_iface_init(XfdashboardStylableInterface *iface);
-
-G_DEFINE_TYPE_WITH_CODE(XfdashboardWindowContent,
-						xfdashboard_window_content,
-						G_TYPE_OBJECT,
-						G_IMPLEMENT_INTERFACE(CLUTTER_TYPE_CONTENT, _xdashboard_window_content_clutter_content_iface_init)
-						G_IMPLEMENT_INTERFACE(XFDASHBOARD_TYPE_STYLABLE, _xfdashboard_window_content_stylable_iface_init))
-
-/* Private structure - access only by public API if needed */
-#define XFDASHBOARD_WINDOW_CONTENT_GET_PRIVATE(obj) \
-	(G_TYPE_INSTANCE_GET_PRIVATE((obj), XFDASHBOARD_TYPE_WINDOW_CONTENT, XfdashboardWindowContentPrivate))
-
-struct _XfdashboardWindowContentPrivate
-{
-	/* Properties related */
-	XfdashboardWindowTrackerWindow			*window;
-	ClutterColor							*outlineColor;
-	gfloat									outlineWidth;
-	gboolean								isSuspended;
-	gboolean								includeWindowFrame;
-
-	gboolean								unmappedWindowIconXFill;
-	gboolean								unmappedWindowIconYFill;
-	gfloat									unmappedWindowIconXAlign;
-	gfloat									unmappedWindowIconYAlign;
-	gfloat									unmappedWindowIconXScale;
-	gfloat									unmappedWindowIconYScale;
-	XfdashboardAnchorPoint					unmappedWindowIconAnchorPoint;
-
-	gchar									*styleClasses;
-	gchar									*stylePseudoClasses;
-
-	/* Instance related */
-	gboolean								isFallback;
-	CoglTexture								*texture;
-	Window									xWindowID;
-	Pixmap									pixmap;
-#ifdef HAVE_XDAMAGE
-	Damage									damage;
-#endif
-
-	guint									suspendSignalID;
-	gboolean								isMapped;
-	gboolean								isAppSuspended;
-
-	XfdashboardWindowTracker				*windowTracker;
-	XfdashboardWindowContentWorkaroundMode	workaroundMode;
-	guint									workaroundStateSignalID;
-
-	gboolean								suspendAfterResumeOnIdle;
-};
-
-/* Properties */
-enum
-{
-	PROP_0,
-
-	PROP_WINDOW_CONTENT,
-
-	PROP_SUSPENDED,
-
-	PROP_OUTLINE_COLOR,
-	PROP_OUTLINE_WIDTH,
-
-	PROP_INCLUDE_WINDOW_FRAME,
-
-	PROP_UNMAPPED_WINDOW_ICON_X_FILL,
-	PROP_UNMAPPED_WINDOW_ICON_Y_FILL,
-	PROP_UNMAPPED_WINDOW_ICON_X_ALIGN,
-	PROP_UNMAPPED_WINDOW_ICON_Y_ALIGN,
-	PROP_UNMAPPED_WINDOW_ICON_X_SCALE,
-	PROP_UNMAPPED_WINDOW_ICON_Y_SCALE,
-	PROP_UNMAPPED_WINDOW_ICON_ANCHOR_POINT,
-
-	/* From interface: XfdashboardStylable */
-	PROP_STYLE_CLASSES,
-	PROP_STYLE_PSEUDO_CLASSES,
-
-	PROP_LAST
-};
-
-static GParamSpec* XfdashboardWindowContentProperties[PROP_LAST]={ 0, };
-
-/* IMPLEMENTATION: Private variables and methods */
-#define COMPOSITE_VERSION_MIN_MAJOR		0
-#define COMPOSITE_VERSION_MIN_MINOR		2
-
-#define WORKAROUND_UNMAPPED_WINDOW_XFCONF_PROP			"/enable-unmapped-window-workaround"
-#define DEFAULT_WORKAROUND_UNMAPPED_WINDOW				FALSE
-
-#define WINDOW_CONTENT_CREATION_PRIORITY_XFCONF_PROP	"/window-content-creation-priority"
-#define DEFAULT_WINDOW_CONTENT_CREATION_PRIORITY		"immediate"
-
-struct _XfdashboardWindowContentPriorityMap
-{
-	const gchar		*name;
-	gint			priority;
-};
-typedef struct _XfdashboardWindowContentPriorityMap		XfdashboardWindowContentPriorityMap;
-
-static gboolean								_xfdashboard_window_content_have_checked_extensions=FALSE;
-static gboolean								_xfdashboard_window_content_have_composite_extension=FALSE;
-static gboolean								_xfdashboard_window_content_have_damage_extension=FALSE;
-static int									_xfdashboard_window_content_damage_event_base=0;
-
-static GHashTable*							_xfdashboard_window_content_cache=NULL;
-static guint								_xfdashboard_window_content_cache_shutdown_signal_id=0;
-
-static GList*								_xfdashboard_window_content_resume_idle_queue=NULL;
-static guint								_xfdashboard_window_content_resume_idle_id=0;
-static guint								_xfdashboard_window_content_resume_shutdown_signal_id=0;
-
-static guint								_xfdashboard_window_content_xfconf_priority_notify_id=0;
-static gint									_xfdashboard_window_content_window_creation_priority=-1;
-static XfdashboardWindowContentPriorityMap	_xfdashboard_window_content_window_creation_priority_map[]=
-												{
-													{ "immediate", -1 }, /* First entry is default value */
-													{ "high", G_PRIORITY_HIGH_IDLE },
-													{ "normal", G_PRIORITY_DEFAULT_IDLE },
-													{ "low", G_PRIORITY_LOW },
-													{ NULL, 0 },
-												};
-static guint								_xfdashboard_window_content_window_creation_shutdown_signal_id=0;
-
-/* Forward declarations */
-static void _xfdashboard_window_content_suspend(XfdashboardWindowContent *self);
-static void _xfdashboard_window_content_resume(XfdashboardWindowContent *self);
-static gboolean _xfdashboard_window_content_resume_on_idle(gpointer inUserData);
-
-/* Remove all entries from resume queue and release all allocated resources */
-static void _xfdashboard_window_content_destroy_resume_queue(void)
-{
-	XfdashboardApplication					*application;
-	gint									queueSize;
-
-	/* Disconnect application "shutdown" signal handler */
-	if(_xfdashboard_window_content_resume_shutdown_signal_id)
-	{
-		XFDASHBOARD_DEBUG(NULL, WINDOWS,
-							"Disconnecting shutdown signal handler %u because of resume queue destruction",
-							_xfdashboard_window_content_resume_shutdown_signal_id);
-
-		application=xfdashboard_application_get_default();
-		g_signal_handler_disconnect(application, _xfdashboard_window_content_resume_shutdown_signal_id);
-		_xfdashboard_window_content_resume_shutdown_signal_id=0;
-	}
-
-	/* Remove idle source if available */
-	if(_xfdashboard_window_content_resume_idle_id)
-	{
-		XFDASHBOARD_DEBUG(NULL, WINDOWS,
-							"Removing resume window content idle source with ID %u",
-							_xfdashboard_window_content_resume_idle_id);
-
-		g_source_remove(_xfdashboard_window_content_resume_idle_id);
-		_xfdashboard_window_content_resume_idle_id=0;
-	}
-
-	/* Destroy resume-on-idle queue if available*/
-	if(_xfdashboard_window_content_resume_idle_queue)
-	{
-		queueSize=g_list_length(_xfdashboard_window_content_resume_idle_queue);
-		if(queueSize>0) g_warning(_("Destroying window content resume queue containing %d windows."), queueSize);
-#ifdef DEBUG
-		if(queueSize>0)
-		{
-			GList							*iter;
-			XfdashboardWindowContent		*content;
-			XfdashboardWindowTrackerWindow	*window;
-
-			for(iter=_xfdashboard_window_content_resume_idle_queue; iter; iter=g_list_next(iter))
-			{
-				content=XFDASHBOARD_WINDOW_CONTENT(iter->data);
-				window=xfdashboard_window_content_get_window(content);
-				g_print("Window content in resume queue: Item %s@%p for window '%s'\n",
-							G_OBJECT_TYPE_NAME(content), content,
-							xfdashboard_window_tracker_window_get_title(window));
-			}
-		}
-#endif
-
-		XFDASHBOARD_DEBUG(NULL, WINDOWS, "Destroying window content resume queue");
-		g_list_free(_xfdashboard_window_content_resume_idle_queue);
-		_xfdashboard_window_content_resume_idle_queue=NULL;
-	}
-}
-
-/* Remove window content from resume on idle queue */
-static void _xfdashboard_window_content_resume_on_idle_remove(XfdashboardWindowContent *self)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-
-	priv=self->priv;
-
-	/* Remove window content from queue */
-	if(_xfdashboard_window_content_resume_idle_queue)
-	{
-		GList							*queueEntry;
-
-		/* Lookup window content in queue and remove it from queue. If queue is empty
-		 * after removal, remove idle source also.
-		 */
-		queueEntry=g_list_find(_xfdashboard_window_content_resume_idle_queue, self);
-		if(queueEntry)
-		{
-			/* Remove window content from queue */
-			_xfdashboard_window_content_resume_idle_queue=g_list_delete_link(_xfdashboard_window_content_resume_idle_queue, queueEntry);
-			XFDASHBOARD_DEBUG(self, WINDOWS,
-								"Removed queue entry %p for window '%s' because of releasing resources",
-								queueEntry,
-								xfdashboard_window_tracker_window_get_title(priv->window));
-		}
-	}
-
-	/* If queue is empty remove idle source as well */
-	if(!_xfdashboard_window_content_resume_idle_queue &&
-		_xfdashboard_window_content_resume_idle_id)
-	{
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Removing idle source with ID %u because queue is empty",
-							_xfdashboard_window_content_resume_idle_id);
-
-		g_source_remove(_xfdashboard_window_content_resume_idle_id);
-		_xfdashboard_window_content_resume_idle_id=0;
-	}
-}
-
-/* Add window content to resume on idle queue */
-static void _xfdashboard_window_content_resume_on_idle_add(XfdashboardWindowContent *self)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-
-	priv=self->priv;
-
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Using resume on idle for window '%s'",
-						xfdashboard_window_tracker_window_get_title(priv->window));
-
-	/* Only add callback to resume window content if no one was added */
-	if(!g_list_find(_xfdashboard_window_content_resume_idle_queue, self))
-	{
-		/* Queue window content for resume */
-		_xfdashboard_window_content_resume_idle_queue=g_list_append(_xfdashboard_window_content_resume_idle_queue, self);
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Queued window resume of '%s'@%p",
-							xfdashboard_window_tracker_window_get_title(priv->window),
-							self);
-	}
-
-	/* Create idle source for resuming queued window contents but with
-	 * high priority to get window content created as soon as possible.
-	 */
-	if(_xfdashboard_window_content_resume_idle_queue &&
-		!_xfdashboard_window_content_resume_idle_id)
-	{
-		_xfdashboard_window_content_resume_idle_id=clutter_threads_add_idle_full(_xfdashboard_window_content_window_creation_priority,
-																				_xfdashboard_window_content_resume_on_idle,
-																				NULL,
-																				NULL);
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Created idle source with ID %u with priority of %d because of new resume queue created for window resume of '%s'@%p",
-							_xfdashboard_window_content_resume_idle_id,
-							_xfdashboard_window_content_window_creation_priority,
-							xfdashboard_window_tracker_window_get_title(priv->window),
-							self);
-	}
-
-	/* Connect to "shutdown" signal of application to clean up resume queue */
-	if(!_xfdashboard_window_content_resume_shutdown_signal_id)
-	{
-		XfdashboardApplication			*application;
-
-		application=xfdashboard_application_get_default();
-		_xfdashboard_window_content_resume_shutdown_signal_id=g_signal_connect(application,
-																				"shutdown-final",
-																				G_CALLBACK(_xfdashboard_window_content_destroy_resume_queue),
-																				NULL);
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Connected to shutdown signal with handler ID %u for resume queue destruction",
-							_xfdashboard_window_content_resume_shutdown_signal_id);
-	}
-}
-
-/* Value for window creation priority in xfconf has changed */
-static void _xfdashboard_window_content_on_window_creation_priority_value_changed(XfconfChannel *inChannel,
-																					const gchar *inProperty,
-																					const GValue *inValue,
-																					gpointer inUserData)
-{
-	const gchar								*priorityValue;
-	XfdashboardWindowContentPriorityMap		*found;
-
-	g_return_if_fail(g_strcmp0(inProperty, WINDOW_CONTENT_CREATION_PRIORITY_XFCONF_PROP)==0);
-	g_return_if_fail(inValue && G_VALUE_HOLDS_STRING(inValue));
-
-	/* Determine priority from new value */
-	priorityValue=g_value_get_string(inValue);
-	found=_xfdashboard_window_content_window_creation_priority_map;
-	while(found->name && g_strcmp0(priorityValue, found->name)!=0) found++;
-
-	/* Set default value if no match was found in priority map was found */
-	if(!found || !found->name)
-	{
-		/* Default value is the first one in mapping */
-		found=_xfdashboard_window_content_window_creation_priority_map;
-
-		g_warning(_("Unknown value '%s' for property '%s' - defaulting to '%s' with priority of %d"),
-					priorityValue,
-					inProperty,
-					found->name,
-					found->priority);
-	}
-
-	/* Set priority */
-	if(found)
-	{
-		_xfdashboard_window_content_window_creation_priority=found->priority;
-		XFDASHBOARD_DEBUG(NULL, WINDOWS,
-							"Setting window creation priority to '%s' with priority of %d",
-							found->name,
-							found->priority);
-	}
-}
-
-/* Disconnect signal handler for xfconf value change notification on window priority */
-static void _xfdashboard_window_content_on_window_creation_priority_shutdown(void)
-{
-	XfdashboardApplication					*application;
-
-	/* Disconnect application "shutdown" signal handler */
-	if(_xfdashboard_window_content_window_creation_shutdown_signal_id)
-	{
-		XFDASHBOARD_DEBUG(NULL, WINDOWS,
-							"Disconnecting shutdown signal handler %u for window creation priority value change notifications",
-							_xfdashboard_window_content_window_creation_shutdown_signal_id);
-
-		application=xfdashboard_application_get_default();
-		g_signal_handler_disconnect(application, _xfdashboard_window_content_window_creation_shutdown_signal_id);
-		_xfdashboard_window_content_window_creation_shutdown_signal_id=0;
-	}
-
-	/* Disconnect property changed signal handler */
-	if(_xfdashboard_window_content_xfconf_priority_notify_id)
-	{
-		XfconfChannel					*xfconfChannel;
-
-		XFDASHBOARD_DEBUG(NULL, WINDOWS,
-							"Disconnecting property changed signal handler %u for window creation priority value change notifications",
-							_xfdashboard_window_content_xfconf_priority_notify_id);
-
-		xfconfChannel=xfdashboard_application_get_xfconf_channel(NULL);
-		g_signal_handler_disconnect(xfconfChannel, _xfdashboard_window_content_xfconf_priority_notify_id);
-		_xfdashboard_window_content_xfconf_priority_notify_id=0;
-	}
-}
-
-/* Check if we should workaround unmapped window for requested window and set up workaround */
-static void _xfdashboard_window_content_on_workaround_state_changed(XfdashboardWindowContent *self,
-																	gpointer inUserData)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inUserData));
-
-	priv=self->priv;
-
-	/* Handle state change of window */
-	switch(priv->workaroundMode)
-	{
-		case XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_UNMINIMIZING:
-			/* Check if window is unminized now, then update content texture and
-			 * minimize window again.
-			 */
-			if(!xfdashboard_window_tracker_window_is_minimized(priv->window))
-			{
-				if(priv->texture &&
-					priv->workaroundMode!=XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_NONE &&
-					priv->isMapped==TRUE)
-				{
-					/* Copy current texture as it might get inaccessible. If we copy it now
-					 * when can draw the last image known. If we can copy it successfully
-					 * replace current texture with the copied one.
-					 */
-					CoglPixelFormat			textureFormat;
-					guint					textureWidth;
-					guint					textureHeight;
-					gint					textureSize;
-					guint8					*textureData;
-
-					textureFormat=cogl_texture_get_format(priv->texture);
-					textureSize=cogl_texture_get_data(priv->texture, textureFormat, 0, NULL);
-					textureWidth=cogl_texture_get_width(priv->texture);
-					textureHeight=cogl_texture_get_height(priv->texture);
-					textureData=g_malloc(textureSize);
-					if(textureData)
-					{
-						CoglTexture			*copyTexture;
-						gint				copyTextureSize;
-#if COGL_VERSION_CHECK(1, 18, 0)
-						ClutterBackend		*backend;
-						CoglContext			*context;
-						CoglError			*error;
-#endif
-
-						/* Get texture data to copy */
-						copyTextureSize=cogl_texture_get_data(priv->texture, textureFormat, 0, textureData);
-						if(copyTextureSize)
-						{
-#if COGL_VERSION_CHECK(1, 18, 0)
-							error=NULL;
-
-							backend=clutter_get_default_backend();
-							context=clutter_backend_get_cogl_context(backend);
-							copyTexture=cogl_texture_2d_new_from_data(context,
-																		textureWidth,
-																		textureHeight,
-																		textureFormat,
-																		0,
-																		textureData,
-																		&error);
-
-							if(!copyTexture || error)
-							{
-								/* Show warning */
-								g_warning(_("Could not create copy of texture of mininized window '%s': %s"),
-											xfdashboard_window_tracker_window_get_title(priv->window),
-											(error && error->message) ? error->message : _("Unknown error"));
-
-								/* Release allocated resources */
-								if(copyTexture)
-								{
-									cogl_object_unref(copyTexture);
-									copyTexture=NULL;
-								}
-
-								if(error)
-								{
-									cogl_error_free(error);
-									error=NULL;
-								}
-							}
-#else
-							copyTexture=cogl_texture_new_from_data(textureWidth,
-																	textureHeight,
-																	COGL_TEXTURE_NONE,
-																	textureFormat,
-																	textureFormat,
-																	0,
-																	textureData);
-							if(!copyTexture)
-							{
-								/* Show warning */
-								g_warning(_("Could not create copy of texture of mininized window '%s'"),
-											xfdashboard_window_tracker_window_get_title(priv->window));
-							}
-#endif
-
-							if(copyTexture)
-							{
-								cogl_object_unref(priv->texture);
-								priv->texture=copyTexture;
-							}
-						}
-							else g_warning(_("Could not determine size of texture of minimized window '%s'"),
-											xfdashboard_window_tracker_window_get_title(priv->window));
-					}
-						else
-						{
-							g_warning(_("Could not allocate memory for copy of texture of mininized window '%s'"),
-										xfdashboard_window_tracker_window_get_title(priv->window));
-						}
-				}
-
-				xfdashboard_window_tracker_window_hide(priv->window);
-				priv->workaroundMode=XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_REMINIMIZING;
-			}
-			break;
-
-		case XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_REMINIMIZING:
-			/* Check if window is now minized again, so stop workaround and
-			 * disconnecting signals.
-			 */
-			if(xfdashboard_window_tracker_window_is_minimized(priv->window))
-			{
-				priv->workaroundMode=XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_DONE;
-				if(priv->workaroundStateSignalID)
-				{
-					g_signal_handler_disconnect(priv->windowTracker, priv->workaroundStateSignalID);
-					priv->workaroundStateSignalID=0;
-				}
-			}
-			break;
-
-		default:
-			/* We should never get here but if we do it is more or less
-			 * a critical error. Ensure that window is minimized (again)
-			 * and stop xfdashboard.
-			 */
-			xfdashboard_window_tracker_window_hide(priv->window);
-			g_assert_not_reached();
-			break;
-	}
-}
-
-static void _xfdashboard_window_content_setup_workaround(XfdashboardWindowContent *self, XfdashboardWindowTrackerWindow *inWindow)
-{
-	XfdashboardWindowContentPrivate		*priv;
-	gboolean							doWorkaround;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(inWindow!=NULL && XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inWindow));
-
-	priv=self->priv;
-
-	/* Check if should workaround unmapped windows at all */
-	doWorkaround=xfconf_channel_get_bool(xfdashboard_application_get_xfconf_channel(NULL),
-											WORKAROUND_UNMAPPED_WINDOW_XFCONF_PROP,
-											DEFAULT_WORKAROUND_UNMAPPED_WINDOW);
-	if(!doWorkaround) return;
-
-	/* Only workaround unmapped windows */
-	if(!xfdashboard_window_tracker_window_is_minimized(inWindow)) return;
-
-	/* Check if workaround is already set up */
-	if(priv->workaroundMode!=XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_NONE) return;
-
-	/* Set flag that workaround is (going to be) set up */
-	priv->workaroundMode=XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_UNMINIMIZING;
-
-	/* The workaround is as follows:
-	 *
-	 * 1.) Set up signal handlers to get notified about changes of window
-	 * 2.) Unminimize window
-	 * 3.) If window is visible it will be activated by design, so reactivate
-	 *     last active window
-	 * 4.) Minimize window again
-	 * 5.) Stop watching for changes of window by disconnecting signal handlers
-	 */
-	priv->workaroundStateSignalID=g_signal_connect_swapped(priv->windowTracker,
-															"window-state-changed",
-															G_CALLBACK(_xfdashboard_window_content_on_workaround_state_changed),
-															self);
-	xfdashboard_window_tracker_window_show(inWindow);
-}
-
-/* Check extension and set up basics */
-static void _xfdashboard_window_content_check_extension(void)
-{
-	Display		*display G_GNUC_UNUSED;
-#ifdef HAVE_XDAMAGE
-	int			damageError=0;
-#endif
-#ifdef HAVE_XCOMPOSITE
-	int			compositeMajor, compositeMinor;
-#endif
-
-	/* Check if we have already checked extensions */
-	if(_xfdashboard_window_content_have_checked_extensions!=FALSE) return;
-
-	/* Mark that we have check for extensions regardless of any error*/
-	_xfdashboard_window_content_have_checked_extensions=TRUE;
-
-	/* Get display */
-	display=clutter_x11_get_default_display();
-
-	/* Check for composite extenstion */
-	_xfdashboard_window_content_have_composite_extension=FALSE;
-#ifdef HAVE_XCOMPOSITE
-	if(clutter_x11_has_composite_extension())
-	{
-		compositeMajor=compositeMinor=0;
-		if(XCompositeQueryVersion(display, &compositeMajor, &compositeMinor))
-		{
-			if(compositeMajor>=COMPOSITE_VERSION_MIN_MAJOR && compositeMinor>=COMPOSITE_VERSION_MIN_MINOR)
-			{
-				_xfdashboard_window_content_have_composite_extension=TRUE;
-			}
-				else
-				{
-					g_warning(_("Need at least version %d.%d of composite extension but found %d.%d - using only fallback images"),
-								COMPOSITE_VERSION_MIN_MAJOR, COMPOSITE_VERSION_MIN_MINOR, compositeMajor, compositeMinor);
-				}
-		}
-			else g_warning(_("Query for X composite extension failed - using only fallback imagess"));
-	}
-		else g_warning(_("X does not support composite extension - using only fallback images"));
-#endif
-
-	/* Get base of damage event in X */
-	_xfdashboard_window_content_have_damage_extension=FALSE;
-	_xfdashboard_window_content_damage_event_base=0;
-
-#ifdef HAVE_XDAMAGE
-	if(!XDamageQueryExtension(display, &_xfdashboard_window_content_damage_event_base, &damageError))
-	{
-		g_warning(_("Query for X damage extension resulted in error code %d - using only still images of windows"), damageError);
-	}
-		else _xfdashboard_window_content_have_damage_extension=TRUE;
-#endif
-}
-
-/* Suspension state of application changed */
-static void _xfdashboard_window_content_on_application_suspended_changed(XfdashboardWindowContent *self,
-																			GParamSpec *inSpec,
-																			gpointer inUserData)
-{
-	XfdashboardWindowContentPrivate		*priv;
-	XfdashboardApplication				*app;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(XFDASHBOARD_IS_APPLICATION(inUserData));
-
-	priv=self->priv;
-	app=XFDASHBOARD_APPLICATION(inUserData);
-
-	/* Get application suspend state */
-	priv->isAppSuspended=xfdashboard_application_is_suspended(app);
-
-	/* If application is suspended then suspend this window too ... */
-	if(priv->isAppSuspended)
-	{
-		_xfdashboard_window_content_suspend(self);
-	}
-		/* ... otherwise resume window if it is mapped */
-		else
-		{
-			if(priv->isMapped) _xfdashboard_window_content_resume(self);
-		}
-}
-
-/* Filter X events for damages */
-static ClutterX11FilterReturn _xfdashboard_window_content_on_x_event(XEvent *inXEvent, ClutterEvent *inEvent, gpointer inUserData)
-{
-	XfdashboardWindowContent			*self;
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(inUserData), CLUTTER_X11_FILTER_CONTINUE);
-
-	self=XFDASHBOARD_WINDOW_CONTENT(inUserData);
-	priv=self->priv;
-
-	/* Check for mapped, unmapped related X events as pixmap, damage, texture etc.
-	 * needs to get resumed (acquired) or suspended (released)
-	 */
-	if(inXEvent->xany.window==priv->xWindowID)
-	{
-		switch(inXEvent->type)
-		{
-			case MapNotify:
-			case ConfigureNotify:
-				priv->isMapped=TRUE;
-				if(!priv->isAppSuspended) _xfdashboard_window_content_resume(self);
-				break;
-
-			case UnmapNotify:
-			case DestroyNotify:
-				priv->isMapped=FALSE;
-				_xfdashboard_window_content_suspend(self);
-				break;
-
-			default:
-				/* We do not handle this type of X event, drop through ... */
-				break;
-		}
-	}
-
-	/* Check for damage event */
-#ifdef HAVE_XDAMAGE
-	if(_xfdashboard_window_content_have_damage_extension &&
-		_xfdashboard_window_content_damage_event_base &&
-		inXEvent->type==(_xfdashboard_window_content_damage_event_base + XDamageNotify) &&
-		((XDamageNotifyEvent*)inXEvent)->damage==priv->damage &&
-		priv->workaroundMode==XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_NONE)
-	{
-		/* Update texture for live window content */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-	}
-#endif
-
-	return(CLUTTER_X11_FILTER_CONTINUE);
-}
-
-/* Release all resources used by this instance */
-static void _xfdashboard_window_content_release_resources(XfdashboardWindowContent *self)
-{
-	XfdashboardWindowContentPrivate		*priv;
-	Display								*display;
-	gint								trapError;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-
-	priv=self->priv;
-
-	/* This live update will be suspended so remove it from queue */
-	_xfdashboard_window_content_resume_on_idle_remove(self);
-
-	/* Get display as it used more than once ;) */
-	display=clutter_x11_get_default_display();
-
-	/* Release resources. It might be important to release them
-	 * in reverse order as they were created.
-	 */
-	clutter_x11_remove_filter(_xfdashboard_window_content_on_x_event, (gpointer)self);
-
-	clutter_x11_trap_x_errors();
-	{
-		if(priv->texture)
-		{
-			cogl_object_unref(priv->texture);
-			priv->texture=NULL;
-		}
-
-#ifdef HAVE_XDAMAGE
-		if(priv->damage!=None)
-		{
-			XDamageDestroy(display, priv->damage);
-			XSync(display, False);
-			priv->damage=None;
-		}
-#endif
-		if(priv->pixmap!=None)
-		{
-			XFreePixmap(display, priv->pixmap);
-			priv->pixmap=None;
-		}
-
-		if(priv->xWindowID!=None)
-		{
-#ifdef HAVE_XCOMPOSITE
-			if(_xfdashboard_window_content_have_composite_extension)
-			{
-				XCompositeUnredirectWindow(display, priv->xWindowID, CompositeRedirectAutomatic);
-				XSync(display, False);
-			}
-#endif
-			priv->xWindowID=None;
-		}
-
-		/* Window is suspended now */
-		if(priv->isSuspended!=TRUE)
-		{
-			priv->isSuspended=TRUE;
-
-			/* Notify about property change */
-			g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_SUSPENDED]);
-		}
-	}
-
-	/* Check if everything went well */
-	trapError=clutter_x11_untrap_x_errors();
-	if(trapError!=0)
-	{
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"X error %d occured while releasing resources for window '%s",
-							trapError,
-							xfdashboard_window_tracker_window_get_title(priv->window));
-		return;
-	}
-
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Released resources for window '%s' to handle live texture updates",
-						xfdashboard_window_tracker_window_get_title(priv->window));
-}
-
-/* Suspend from handling live updates */
-static void _xfdashboard_window_content_suspend(XfdashboardWindowContent *self)
-{
-	XfdashboardWindowContentPrivate		*priv;
-	Display								*display;
-	gint								trapError;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-
-	priv=self->priv;
-
-	/* This live update will be suspended so remove it from queue */
-	_xfdashboard_window_content_resume_on_idle_remove(self);
-
-	/* Get display as it used more than once ;) */
-	display=clutter_x11_get_default_display();
-
-	/* Release resources */
-	clutter_x11_trap_x_errors();
-	{
-		/* Suspend live updates from texture */
-		if(priv->texture && !priv->isFallback)
-		{
-#ifdef HAVE_XDAMAGE
-			cogl_texture_pixmap_x11_set_damage_object(COGL_TEXTURE_PIXMAP_X11(priv->texture), 0, 0);
-#endif
-		}
-
-		/* Release damage */
-#ifdef HAVE_XDAMAGE
-		if(priv->damage!=None)
-		{
-			XDamageDestroy(display, priv->damage);
-			XSync(display, False);
-			priv->damage=None;
-		}
-#endif
-
-		/* Release pixmap */
-		if(priv->pixmap!=None)
-		{
-			XFreePixmap(display, priv->pixmap);
-			priv->pixmap=None;
-		}
-
-		/* Window is suspended now */
-		if(priv->isSuspended!=TRUE)
-		{
-			priv->isSuspended=TRUE;
-
-			/* Notify about property change */
-			g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_SUSPENDED]);
-		}
-	}
-
-	/* Check if everything went well */
-	trapError=clutter_x11_untrap_x_errors();
-	if(trapError!=0)
-	{
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"X error %d occured while suspending '%s",
-							trapError,
-							xfdashboard_window_tracker_window_get_title(priv->window));
-		return;
-	}
-
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Successfully suspended live texture updates for window '%s'",
-						xfdashboard_window_tracker_window_get_title(priv->window));
-}
-
-/* Resume to handle live window updates */
-static gboolean _xfdashboard_window_content_resume_on_idle(gpointer inUserData)
-{
-	XfdashboardWindowContent			*self;
-	XfdashboardWindowContentPrivate		*priv;
-	GList								*queueEntry;
-	Display								*display;
-	CoglContext							*context;
-	GError								*error;
-	gint								trapError;
-	CoglTexture							*windowTexture;
-	gboolean							doContinueSource;
-
-	error=NULL;
-	windowTexture=NULL;
-
-	/* Get window content object from first entry in queue and remove it from queue */
-	queueEntry=g_list_first(_xfdashboard_window_content_resume_idle_queue);
-	if(!queueEntry)
-	{
-		g_warning(_("Resume handler called for empty queue."));
-
-		/* Queue must be empty but ensure it will */
-		if(_xfdashboard_window_content_resume_idle_queue)
-		{
-			XFDASHBOARD_DEBUG(NULL, WINDOWS, "Ensuring that window content resume queue is empty");
-			g_list_free(_xfdashboard_window_content_resume_idle_queue);
-			_xfdashboard_window_content_resume_idle_queue=NULL;
-		}
-
-		/* Queue must be empty so remove idle source */
-		_xfdashboard_window_content_resume_idle_id=0;
-		return(G_SOURCE_REMOVE);
-	}
-
-	self=XFDASHBOARD_WINDOW_CONTENT(queueEntry->data);
-	priv=self->priv;
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Entering idle source with ID %u for window resume of '%s'@%p",
-						_xfdashboard_window_content_resume_idle_id,
-						xfdashboard_window_tracker_window_get_title(priv->window),
-						self);
-
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Removing queued entry %p for window resume of '%s'@%p",
-						queueEntry,
-						xfdashboard_window_tracker_window_get_title(priv->window),
-						self);
-	_xfdashboard_window_content_resume_idle_queue=g_list_delete_link(_xfdashboard_window_content_resume_idle_queue, queueEntry);
-	if(_xfdashboard_window_content_resume_idle_queue)
-	{
-		doContinueSource=G_SOURCE_CONTINUE;
-	}
-		else
-		{
-			XFDASHBOARD_DEBUG(self, WINDOWS,
-								"Resume idle source with ID %u will be remove because queue is empty",
-								_xfdashboard_window_content_resume_idle_id);
-
-			doContinueSource=G_SOURCE_REMOVE;
-			_xfdashboard_window_content_resume_idle_id=0;
-		}
-
-
-	/* We need at least the X composite extension to display images of windows
-	 * if still images or live updated ones
-	 */
-	if(!_xfdashboard_window_content_have_composite_extension)
-	{
-		return(doContinueSource);
-	}
-
-	/* Get display as it used more than once ;) */
-	display=clutter_x11_get_default_display();
-
-	/* Set up resources */
-	clutter_x11_trap_x_errors();
-	while(1)
-	{
-#ifdef HAVE_XCOMPOSITE
-		/* Get pixmap to render texture for */
-		priv->pixmap=XCompositeNameWindowPixmap(display, priv->xWindowID);
-		XSync(display, False);
-		if(priv->pixmap==None)
-		{
-			g_warning(_("Could not get pixmap for window '%s"), xfdashboard_window_tracker_window_get_title(priv->window));
-
-			/* Set flag to suspend window content after resuming because of error */
-			priv->suspendAfterResumeOnIdle=TRUE;
-			break;
-		}
-#else
-		/* We should never get here as existance of composite extension was checked before */
-		g_critical(_("Cannot resume window '%s' as composite extension is not available"),
-					xfdashboard_window_tracker_window_get_title(priv->window));
-		break;
-#endif
-
-		/* Create cogl X11 texture for live updates */
-		context=clutter_backend_get_cogl_context(clutter_get_default_backend());
-		windowTexture=COGL_TEXTURE(cogl_texture_pixmap_x11_new(context, priv->pixmap, FALSE, &error));
-		if(!windowTexture || error)
-		{
-			/* Creating texture may fail if window is _NOT_ on active workspace
-			 * so display error message just as debug message (this time)
-			 */
-			XFDASHBOARD_DEBUG(self, WINDOWS,
-								"Could not create texture for window '%s': %s",
-								xfdashboard_window_tracker_window_get_title(priv->window),
-								error ? error->message : _("Unknown error"));
-			if(error)
-			{
-				g_error_free(error);
-				error=NULL;
-			}
-
-			if(windowTexture)
-			{
-				cogl_object_unref(windowTexture);
-				windowTexture=NULL;
-			}
-
-			/* Set flag to suspend window content after resuming because of error */
-			priv->suspendAfterResumeOnIdle=TRUE;
-
-			break;
-		}
-
-		/* Set up damage to get notified about changed in pixmap */
-#ifdef HAVE_XDAMAGE
-		if(_xfdashboard_window_content_have_damage_extension)
-		{
-			priv->damage=XDamageCreate(display, priv->pixmap, XDamageReportBoundingBox);
-			XSync(display, False);
-			if(priv->damage==None)
-			{
-				g_warning(_("Could not create damage for window '%s' - using still image of window"), xfdashboard_window_tracker_window_get_title(priv->window));
-			}
-		}
-#endif
-
-		/* Release old texture (should be the fallback texture) and set new texture */
-		if(priv->texture)
-		{
-			cogl_object_unref(priv->texture);
-			priv->texture=windowTexture;
-		}
-
-		/* Set damage to new window texture */
-#ifdef HAVE_XDAMAGE
-		if(_xfdashboard_window_content_have_damage_extension &&
-			priv->damage!=None)
-		{
-			cogl_texture_pixmap_x11_set_damage_object(COGL_TEXTURE_PIXMAP_X11(priv->texture), priv->damage, COGL_TEXTURE_PIXMAP_X11_DAMAGE_BOUNDING_BOX);
-		}
-#endif
-
-		/* Now we use the window as texture and not the fallback texture anymore */
-		priv->isFallback=FALSE;
-
-		/* Window is not suspended anymore */
-		if(priv->isSuspended!=FALSE)
-		{
-			priv->isSuspended=FALSE;
-
-			/* Notify about property change */
-			g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_SUSPENDED]);
-		}
-
-		/* Invalidate content to get it redrawn as soon as possible */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* We were able to set up window content so this window is definitely mapped */
-		priv->isMapped=TRUE;
-
-		/* End reached so break to get out of while loop */
-		break;
-	}
-
-	/* Check if window content should be suspended again after resume was done,
-	 * e.g. initial window content creation in suspended daemon mode.
-	 */
-	if(priv->suspendAfterResumeOnIdle)
-	{
-		_xfdashboard_window_content_suspend(self);
-		priv->suspendAfterResumeOnIdle=FALSE;
-	}
-
-	/* Check if everything went well */
-	trapError=clutter_x11_untrap_x_errors();
-	if(trapError!=0)
-	{
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"X error %d occured while resuming window '%s",
-							trapError,
-							xfdashboard_window_tracker_window_get_title(priv->window));
-		return(doContinueSource);
-	}
-
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Resuming live texture updates for window '%s'",
-						xfdashboard_window_tracker_window_get_title(priv->window));
-	return(doContinueSource);
-}
-
-static void _xfdashboard_window_content_resume(XfdashboardWindowContent *self)
-{
-	XfdashboardWindowContentPrivate		*priv;
-	Display								*display;
-	CoglContext							*context;
-	GError								*error;
-	gint								trapError;
-	CoglTexture							*windowTexture;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(self->priv->window);
-
-	priv=self->priv;
-	error=NULL;
-	windowTexture=NULL;
-
-	/* Check if to use new experimental code to resume window content
-	 * in an idle source.
-	 */
-	if(_xfdashboard_window_content_window_creation_priority>0)
-	{
-		_xfdashboard_window_content_resume_on_idle_add(self);
-		return;
-	}
-
-	/* We need at least the X composite extension to display images of windows
-	 * if still images or live updated ones
-	 */
-	if(!_xfdashboard_window_content_have_composite_extension) return;
-
-	/* Get display as it used more than once ;) */
-	display=clutter_x11_get_default_display();
-
-	/* Set up resources */
-	clutter_x11_trap_x_errors();
-	while(1)
-	{
-#ifdef HAVE_XCOMPOSITE
-		/* Get pixmap to render texture for */
-		priv->pixmap=XCompositeNameWindowPixmap(display, priv->xWindowID);
-		XSync(display, False);
-		if(priv->pixmap==None)
-		{
-			g_warning(_("Could not get pixmap for window '%s"), xfdashboard_window_tracker_window_get_title(priv->window));
-			_xfdashboard_window_content_suspend(self);
-			break;
-		}
-#else
-		/* We should never get here as existance of composite extension was checked before */
-		g_critical(_("Cannot resume window '%s' as composite extension is not available"),
-					xfdashboard_window_tracker_window_get_title(priv->window));
-		break;
-#endif
-
-		/* Create cogl X11 texture for live updates */
-		context=clutter_backend_get_cogl_context(clutter_get_default_backend());
-		windowTexture=COGL_TEXTURE(cogl_texture_pixmap_x11_new(context, priv->pixmap, FALSE, &error));
-		if(!windowTexture || error)
-		{
-			/* Creating texture may fail if window is _NOT_ on active workspace
-			 * so display error message just as debug message (this time)
-			 */
-			XFDASHBOARD_DEBUG(self, WINDOWS,
-								"Could not create texture for window '%s': %s",
-								xfdashboard_window_tracker_window_get_title(priv->window),
-								error ? error->message : _("Unknown error"));
-			if(error)
-			{
-				g_error_free(error);
-				error=NULL;
-			}
-
-			if(windowTexture)
-			{
-				cogl_object_unref(windowTexture);
-				windowTexture=NULL;
-			}
-
-			_xfdashboard_window_content_suspend(self);
-
-			break;
-		}
-
-		/* Set up damage to get notified about changed in pixmap */
-#ifdef HAVE_XDAMAGE
-		if(_xfdashboard_window_content_have_damage_extension)
-		{
-			priv->damage=XDamageCreate(display, priv->pixmap, XDamageReportBoundingBox);
-			XSync(display, False);
-			if(priv->damage==None)
-			{
-				g_warning(_("Could not create damage for window '%s' - using still image of window"), xfdashboard_window_tracker_window_get_title(priv->window));
-			}
-		}
-#endif
-
-		/* Release old texture (should be the fallback texture) and set new texture */
-		if(priv->texture)
-		{
-			cogl_object_unref(priv->texture);
-			priv->texture=windowTexture;
-		}
-
-		/* Set damage to new window texture */
-#ifdef HAVE_XDAMAGE
-		if(_xfdashboard_window_content_have_damage_extension &&
-			priv->damage!=None)
-		{
-			cogl_texture_pixmap_x11_set_damage_object(COGL_TEXTURE_PIXMAP_X11(priv->texture), priv->damage, COGL_TEXTURE_PIXMAP_X11_DAMAGE_BOUNDING_BOX);
-		}
-#endif
-
-		/* Now we use the window as texture and not the fallback texture anymore */
-		priv->isFallback=FALSE;
-
-		/* Window is not suspended anymore */
-		if(priv->isSuspended!=FALSE)
-		{
-			priv->isSuspended=FALSE;
-
-			/* Notify about property change */
-			g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_SUSPENDED]);
-		}
-
-		/* Invalidate content to get it redrawn as soon as possible */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* We were able to set up window content so this window is definitely mapped */
-		priv->isMapped=TRUE;
-
-		/* End reached so break to get out of while loop */
-		break;
-	}
-
-	/* Check if everything went well */
-	trapError=clutter_x11_untrap_x_errors();
-	if(trapError!=0)
-	{
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"X error %d occured while resuming window '%s",
-							trapError,
-							xfdashboard_window_tracker_window_get_title(priv->window));
-		return;
-	}
-
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Resuming live texture updates for window '%s'",
-						xfdashboard_window_tracker_window_get_title(priv->window));
-}
-
-/* Find X window for window frame of given X window content */
-static Window _xfdashboard_window_content_get_window_frame_xid(Display *inDisplay, XfdashboardWindowTrackerWindow *inWindow)
-{
-	Window				xWindowID;
-	Window				iterXWindowID;
-	Window				rootXWindowID;
-	Window				foundXWindowID;
-	GdkDisplay			*gdkDisplay;
-	GdkWindow			*gdkWindow;
-	GdkWMDecoration		gdkWindowDecoration;
-
-	g_return_val_if_fail(inDisplay, 0);
-	g_return_val_if_fail(inWindow, 0);
-
-	/* Get X window */
-	xWindowID=xfdashboard_window_tracker_window_get_xid(inWindow);
-	g_return_val_if_fail(xWindowID!=0, 0);
-
-	/* Check if window is client side decorated and if it has no decorations
-	 * so skip finding window frame and behave like we did not found it.
-	 */
-	gdkDisplay=gdk_display_get_default();
-	gdkWindow=gdk_x11_window_foreign_new_for_display(gdkDisplay, xWindowID);
-	if(gdkWindow)
-	{
-		if(gdk_window_get_decorations(gdkWindow, &gdkWindowDecoration) &&
-			gdkWindowDecoration==0)
-		{
-			XFDASHBOARD_DEBUG(inWindow, WINDOWS,
-								"Window '%s' has CSD enabled and no decorations so skip finding window frame.",
-								xfdashboard_window_tracker_window_get_title(inWindow));
-
-			/* Release allocated resources */
-			g_object_unref(gdkWindow);
-
-			/* Skip finding window frame but return "not-found" result */
-			return(0);
-		}
-		g_object_unref(gdkWindow);
-	}
-		else
-		{
-			XFDASHBOARD_DEBUG(inWindow, WINDOWS,
-								"Could not get window decoration fro window '%s'",
-								xfdashboard_window_tracker_window_get_title(inWindow));
-		}
-
-	/* Iterate through X window tree list upwards until root window reached.
-	 * The last X window before root window is the one we are looking for.
-	 */
-	rootXWindowID=0;
-	foundXWindowID=0;
-	for(iterXWindowID=xWindowID; iterXWindowID && iterXWindowID!=rootXWindowID; )
-	{
-		Window	*children;
-		guint	numberChildren;
-
-		children=NULL;
-		numberChildren=0;
-		foundXWindowID=iterXWindowID;
-		if(!XQueryTree(inDisplay, iterXWindowID, &rootXWindowID, &iterXWindowID, &children, &numberChildren))
-		{
-			iterXWindowID=0;
-		}
-		if(children) XFree(children);
-	}
-
-	/* Return found X window ID */
-	return(foundXWindowID);
-}
-
-/* Set window to handle and to display */
-static void _xfdashboard_window_content_set_window(XfdashboardWindowContent *self, XfdashboardWindowTrackerWindow *inWindow)
-{
-	XfdashboardWindowContentPrivate		*priv;
-	XfdashboardApplication				*application;
-	Display								*display;
-	GdkPixbuf							*windowIcon;
-	XWindowAttributes					windowAttrs;
-#if COGL_VERSION_CHECK(1, 18, 0)
-	ClutterBackend						*backend;
-	CoglContext							*context;
-	CoglError							*error;
-#endif
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(inWindow!=NULL && XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inWindow));
-	g_return_if_fail(self->priv->window==NULL);
-	g_return_if_fail(self->priv->xWindowID==0);
-
-	priv=self->priv;
-
-	/* Freeze notifications and collect them */
-	g_object_freeze_notify(G_OBJECT(self));
-
-	/* Get display as it used more than once ;) */
-	display=clutter_x11_get_default_display();
-
-	/* Set new value */
-	priv->window=inWindow;
-
-	/* Create fallback texture first in case we cannot create
-	 * a live updated texture for window in the next steps
-	 */
-	windowIcon=xfdashboard_window_tracker_window_get_icon(priv->window);
-#if COGL_VERSION_CHECK(1, 18, 0)
-	error=NULL;
-
-	backend=clutter_get_default_backend();
-	context=clutter_backend_get_cogl_context(backend);
-	priv->texture=cogl_texture_2d_new_from_data(context,
-												gdk_pixbuf_get_width(windowIcon),
-												gdk_pixbuf_get_height(windowIcon),
-												gdk_pixbuf_get_has_alpha(windowIcon) ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
-												gdk_pixbuf_get_rowstride(windowIcon),
-												gdk_pixbuf_get_pixels(windowIcon),
-												&error);
-
-	if(!priv->texture || error)
-	{
-		/* Show warning */
-		g_warning(_("Could not create fallback texture for window '%s': %s"),
-					xfdashboard_window_tracker_window_get_title(priv->window),
-					(error && error->message) ? error->message : _("Unknown error"));
-
-		/* Release allocated resources */
-		if(priv->texture)
-		{
-			cogl_object_unref(priv->texture);
-			priv->texture=NULL;
-		}
-
-		if(error)
-		{
-			cogl_error_free(error);
-			error=NULL;
-		}
-	}
-#else
-	priv->texture=cogl_texture_new_from_data(gdk_pixbuf_get_width(windowIcon),
-												gdk_pixbuf_get_height(windowIcon),
-												COGL_TEXTURE_NONE,
-												gdk_pixbuf_get_has_alpha(windowIcon) ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
-												COGL_PIXEL_FORMAT_ANY,
-												gdk_pixbuf_get_rowstride(windowIcon),
-												gdk_pixbuf_get_pixels(windowIcon));
-#endif
-
-	priv->isFallback=TRUE;
-
-	/* Get X window and its attributes */
-	if(priv->includeWindowFrame)
-	{
-		priv->xWindowID=_xfdashboard_window_content_get_window_frame_xid(display, priv->window);
-	}
-
-	if(!priv->xWindowID)
-	{
-		priv->xWindowID=xfdashboard_window_tracker_window_get_xid(priv->window);
-	}
-
-	if(!XGetWindowAttributes(display, priv->xWindowID, &windowAttrs))
-	{
-		g_warning(_("Could not get attributes of window '%s'"), xfdashboard_window_tracker_window_get_title(priv->window));
-		XSync(display, False);
-	}
-
-	/* We need at least the X composite extension to display images of windows
-	 * if still images or live updated ones by redirecting window
-	 */
-#ifdef HAVE_XCOMPOSITE
-	if(_xfdashboard_window_content_have_composite_extension)
-	{
-		/* Redirect window */
-		XCompositeRedirectWindow(display, priv->xWindowID, CompositeRedirectAutomatic);
-		XSync(display, False);
-	}
-#endif
-
-	/* We are interested in receiving mapping events of windows */
-	XSelectInput(display, priv->xWindowID, windowAttrs.your_event_mask | StructureNotifyMask);
-
-	/* Acquire new window and handle live updates */
-	_xfdashboard_window_content_resume(self);
-	priv->isMapped=!priv->isSuspended;
-
-	/* But suspend window immediately again if application is suspended
-	 * (xfdashboard runs in daemon mode and is not active currently)
-	 */
-	application=xfdashboard_application_get_default();
-	if(xfdashboard_application_is_suspended(application))
-	{
-		if(_xfdashboard_window_content_window_creation_priority>0)
-		{
-			priv->suspendAfterResumeOnIdle=TRUE;
-		}
-			else
-			{
-				_xfdashboard_window_content_suspend(self);
-			}
-	}
-
-	/* Notify about property change */
-	g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_WINDOW_CONTENT]);
-
-	/* Thaw notifications and send them now */
-	g_object_thaw_notify(G_OBJECT(self));
-
-	/* Set up workaround mechanism for unmapped windows if wanted and needed */
-	_xfdashboard_window_content_setup_workaround(self, inWindow);
-}
-
-/* Destroy cache hashtable */
-static void _xfdashboard_window_content_destroy_cache(void)
-{
-	XfdashboardApplication					*application;
-	gint									cacheSize;
-
-	/* Only an existing cache can be destroyed */
-	if(!_xfdashboard_window_content_cache) return;
-
-	/* Disconnect application "shutdown" signal handler */
-	application=xfdashboard_application_get_default();
-	g_signal_handler_disconnect(application, _xfdashboard_window_content_cache_shutdown_signal_id);
-	_xfdashboard_window_content_cache_shutdown_signal_id=0;
-
-	/* Destroy cache hashtable */
-	cacheSize=g_hash_table_size(_xfdashboard_window_content_cache);
-	if(cacheSize>0) g_warning(_("Destroying window content cache still containing %d windows."), cacheSize);
-#ifdef DEBUG
-	if(cacheSize>0)
-	{
-		GHashTableIter						iter;
-		gpointer							key, value;
-		XfdashboardWindowContent			*content;
-		XfdashboardWindowTrackerWindow		*window;
-
-		g_hash_table_iter_init(&iter, _xfdashboard_window_content_cache);
-		while(g_hash_table_iter_next (&iter, &key, &value))
-		{
-			content=XFDASHBOARD_WINDOW_CONTENT(value);
-			window=xfdashboard_window_content_get_window(content);
-			g_print("Window content in cache: Item %s@%p for window '%s'\n",
-						G_OBJECT_TYPE_NAME(content), content,
-						xfdashboard_window_tracker_window_get_title(window));
-		}
-	}
-#endif
-
-	XFDASHBOARD_DEBUG(NULL, WINDOWS, "Destroying window content cache hashtable");
-	g_hash_table_destroy(_xfdashboard_window_content_cache);
-	_xfdashboard_window_content_cache=NULL;
-}
-
-/* Create cache hashtable if not already set up */
-static void _xfdashboard_window_content_create_cache(void)
-{
-	XfdashboardApplication		*application;
-
-	/* Cache was already set up */
-	if(_xfdashboard_window_content_cache) return;
-
-	/* Create create hashtable */
-	_xfdashboard_window_content_cache=g_hash_table_new(g_direct_hash, g_direct_equal);
-	XFDASHBOARD_DEBUG(NULL, WINDOWS, "Created window content cache hashtable");
-
-	/* Connect to "shutdown" signal of application to clean up hashtable */
-	application=xfdashboard_application_get_default();
-	_xfdashboard_window_content_cache_shutdown_signal_id=g_signal_connect(application,
-																		"shutdown-final",
-																		G_CALLBACK(_xfdashboard_window_content_destroy_cache),
-																		NULL);
-}
-
-/* IMPLEMENTATION: ClutterContent */
-
-/* Paint texture */
-static void _xdashboard_window_content_clutter_content_iface_paint_content(ClutterContent *inContent,
-																			ClutterActor *inActor,
-																			ClutterPaintNode *inRootNode)
-{
-	XfdashboardWindowContent			*self=XFDASHBOARD_WINDOW_CONTENT(inContent);
-	XfdashboardWindowContentPrivate		*priv=self->priv;
-	ClutterScalingFilter				minFilter, magFilter;
-	ClutterPaintNode					*node;
-	ClutterActorBox						textureAllocationBox;
-	ClutterActorBox						textureCoordBox;
-	ClutterActorBox						outlineBox;
-	ClutterColor						color;
-	guint8								opacity;
-	ClutterColor						outlineColor;
-	ClutterActorBox						outlinePath;
-
-	/* Check if we have a texture to paint */
-	if(priv->texture==NULL) return;
-
-	/* Get needed data for painting */
-	clutter_actor_box_init(&textureCoordBox, 0.0f, 0.0f, 1.0f, 1.0f);
-	clutter_actor_get_content_box(inActor, &textureAllocationBox);
-	clutter_actor_get_content_box(inActor, &outlineBox);
-	clutter_actor_get_content_scaling_filters(inActor, &minFilter, &magFilter);
-	opacity=clutter_actor_get_paint_opacity(inActor);
-
-	color.red=opacity;
-	color.green=opacity;
-	color.blue=opacity;
-	color.alpha=opacity;
-
-	/* Draw background if texture is a fallback */
-	if(priv->isFallback)
-	{
-		ClutterColor					backgroundColor;
-
-		/* Set up background color */
-		backgroundColor.red=0;
-		backgroundColor.green=0;
-		backgroundColor.blue=0;
-		backgroundColor.alpha=opacity;
-
-		/* Draw background */
-		node=clutter_color_node_new(&backgroundColor);
-		clutter_paint_node_set_name(node, "fallback-background");
-		clutter_paint_node_add_rectangle(node, &outlineBox);
-		clutter_paint_node_add_child(inRootNode, node);
-		clutter_paint_node_unref(node);
-	}
-
-	/* Determine actor box allocation to draw texture into when unmapped window
-	 * icon (fallback) will be drawn. We can skip calculation if unmapped window
-	 * icon should be expanded in both (x and y) direction.
-	 */
-	if(priv->isFallback &&
-		(!priv->unmappedWindowIconXFill || !priv->unmappedWindowIconYFill))
-	{
-		gfloat							allocationWidth;
-		gfloat							allocationHeight;
-
-		/* Get width and height of allocation */
-		allocationWidth=(outlineBox.x2-outlineBox.x1);
-		allocationHeight=(outlineBox.y2-outlineBox.y1);
-
-		/* Determine left and right boundary of unmapped window icon
-		 * if unmapped window icon should not expand in X axis.
-		 */
-		if(!priv->unmappedWindowIconXFill)
-		{
-			gfloat						offset;
-			gfloat						textureWidth;
-			gfloat						oversize;
-
-			/* Get scaled width of unmapped window icon */
-			textureWidth=cogl_texture_get_width(priv->texture);
-			textureWidth*=priv->unmappedWindowIconXScale;
-
-			/* Get boundary in X axis depending on gravity and scaled width */
-			offset=(priv->unmappedWindowIconXAlign*allocationWidth);
-			switch(priv->unmappedWindowIconAnchorPoint)
-			{
-				/* Align to left boundary.
-				 * This is also the default if gravity is none or undefined.
-				 */
-				default:
-				case XFDASHBOARD_ANCHOR_POINT_NONE:
-				case XFDASHBOARD_ANCHOR_POINT_WEST:
-				case XFDASHBOARD_ANCHOR_POINT_NORTH_WEST:
-				case XFDASHBOARD_ANCHOR_POINT_SOUTH_WEST:
-					break;
-
-				/* Align to center of X axis */
-				case XFDASHBOARD_ANCHOR_POINT_CENTER:
-				case XFDASHBOARD_ANCHOR_POINT_NORTH:
-				case XFDASHBOARD_ANCHOR_POINT_SOUTH:
-					offset-=(textureWidth/2.0f);
-					break;
-
-				/* Align to right boundary */
-				case XFDASHBOARD_ANCHOR_POINT_EAST:
-				case XFDASHBOARD_ANCHOR_POINT_NORTH_EAST:
-				case XFDASHBOARD_ANCHOR_POINT_SOUTH_EAST:
-					offset-=textureWidth;
-					break;
-			}
-
-			/* Set boundary in X axis */
-			textureAllocationBox.x1=outlineBox.x1+offset;
-			textureAllocationBox.x2=textureAllocationBox.x1+textureWidth;
-
-			/* Clip texture in X axis if it does not fit into allocation */
-			if(textureAllocationBox.x1<outlineBox.x1)
-			{
-				oversize=outlineBox.x1-textureAllocationBox.x1;
-				textureCoordBox.x1=oversize/textureWidth;
-				textureAllocationBox.x1=outlineBox.x1;
-			}
-
-			if(textureAllocationBox.x2>outlineBox.x2)
-			{
-				oversize=textureAllocationBox.x2-outlineBox.x2;
-				textureCoordBox.x2=1.0f-(oversize/textureWidth);
-				textureAllocationBox.x2=outlineBox.x2;
-			}
-		}
-
-		/* Determine left and right boundary of unmapped window icon
-		 * if unmapped window icon should not expand in X axis.
-		 */
-		if(!priv->unmappedWindowIconYFill)
-		{
-			gfloat						offset;
-			gfloat						textureHeight;
-			gfloat						oversize;
-
-			/* Get scaled width of unmapped window icon */
-			textureHeight=cogl_texture_get_height(priv->texture);
-			textureHeight*=priv->unmappedWindowIconYScale;
-
-			/* Get boundary in Y axis depending on gravity and scaled width */
-			offset=(priv->unmappedWindowIconYAlign*allocationHeight);
-			switch(priv->unmappedWindowIconAnchorPoint)
-			{
-				/* Align to upper boundary.
-				 * This is also the default if gravity is none or undefined.
-				 */
-				default:
-				case XFDASHBOARD_ANCHOR_POINT_NONE:
-				case XFDASHBOARD_ANCHOR_POINT_NORTH:
-				case XFDASHBOARD_ANCHOR_POINT_NORTH_WEST:
-				case XFDASHBOARD_ANCHOR_POINT_NORTH_EAST:
-					break;
-
-				/* Align to center of Y axis */
-				case XFDASHBOARD_ANCHOR_POINT_CENTER:
-				case XFDASHBOARD_ANCHOR_POINT_WEST:
-				case XFDASHBOARD_ANCHOR_POINT_EAST:
-					offset-=(textureHeight/2.0f);
-					break;
-
-				/* Align to lower boundary */
-				case XFDASHBOARD_ANCHOR_POINT_SOUTH:
-				case XFDASHBOARD_ANCHOR_POINT_SOUTH_WEST:
-				case XFDASHBOARD_ANCHOR_POINT_SOUTH_EAST:
-					offset-=textureHeight;
-					break;
-			}
-
-			/* Set boundary in Y axis */
-			textureAllocationBox.y1=outlineBox.y1+offset;
-			textureAllocationBox.y2=textureAllocationBox.y1+textureHeight;
-
-			/* Clip texture in Y axis if it does not fit into allocation */
-			if(textureAllocationBox.y1<outlineBox.y1)
-			{
-				oversize=outlineBox.y1-textureAllocationBox.y1;
-				textureCoordBox.y1=oversize/textureHeight;
-				textureAllocationBox.y1=outlineBox.y1;
-			}
-
-			if(textureAllocationBox.y2>outlineBox.y2)
-			{
-				oversize=textureAllocationBox.y2-outlineBox.y2;
-				textureCoordBox.y2=1.0f-(oversize/textureHeight);
-				textureAllocationBox.y2=outlineBox.y2;
-			}
-		}
-	}
-
-	/* Set up paint nodes for texture */
-	node=clutter_texture_node_new(priv->texture, &color, minFilter, magFilter);
-	clutter_paint_node_set_name(node, G_OBJECT_TYPE_NAME(self));
-	clutter_paint_node_add_texture_rectangle(node,
-												&textureAllocationBox,
-												textureCoordBox.x1,
-												textureCoordBox.y1,
-												textureCoordBox.x2,
-												textureCoordBox.y2);
-	clutter_paint_node_add_child(inRootNode, node);
-	clutter_paint_node_unref(node);
-
-	/* Draw outline (color is depending is texture is fallback or not.
-	 * That should be done last to get outline always visible
-	 */
-	if(priv->isFallback || priv->outlineColor==NULL)
-	{
-		outlineColor.red=0xff;
-		outlineColor.green=0xff;
-		outlineColor.blue=0xff;
-		outlineColor.alpha=opacity;
-	}
-		else
-		{
-			outlineColor.red=priv->outlineColor->red;
-			outlineColor.green=priv->outlineColor->green;
-			outlineColor.blue=priv->outlineColor->blue;
-			outlineColor.alpha=opacity;
-		}
-
-	node=clutter_color_node_new(&outlineColor);
-	clutter_paint_node_set_name(node, "outline-top");
-	clutter_actor_box_init_rect(&outlinePath, outlineBox.x1, 0.0f, outlineBox.x2-outlineBox.x1, priv->outlineWidth);
-	clutter_paint_node_add_rectangle(node, &outlinePath);
-	clutter_paint_node_add_child(inRootNode, node);
-	clutter_paint_node_unref(node);
-
-	node=clutter_color_node_new(&outlineColor);
-	clutter_paint_node_set_name(node, "outline-bottom");
-	clutter_actor_box_init_rect(&outlinePath, outlineBox.x1, outlineBox.y2-priv->outlineWidth, outlineBox.x2-outlineBox.x1, priv->outlineWidth);
-	clutter_paint_node_add_rectangle(node, &outlinePath);
-	clutter_paint_node_add_child(inRootNode, node);
-	clutter_paint_node_unref(node);
-
-	node=clutter_color_node_new(&outlineColor);
-	clutter_paint_node_set_name(node, "outline-left");
-	clutter_actor_box_init_rect(&outlinePath, outlineBox.x1, outlineBox.y1, priv->outlineWidth, outlineBox.y2-outlineBox.y1);
-	clutter_paint_node_add_rectangle(node, &outlinePath);
-	clutter_paint_node_add_child(inRootNode, node);
-	clutter_paint_node_unref(node);
-
-	node=clutter_color_node_new(&outlineColor);
-	clutter_paint_node_set_name(node, "outline-right");
-	clutter_actor_box_init_rect(&outlinePath, outlineBox.x2-priv->outlineWidth, outlineBox.y1, priv->outlineWidth, outlineBox.y2-outlineBox.y1);
-	clutter_paint_node_add_rectangle(node, &outlinePath);
-	clutter_paint_node_add_child(inRootNode, node);
-	clutter_paint_node_unref(node);
-}
-
-/* Get preferred size of texture */
-static gboolean _xdashboard_window_content_clutter_content_iface_get_preferred_size(ClutterContent *inContent,
-																					gfloat *outWidth,
-																					gfloat *outHeight)
-{
-	XfdashboardWindowContentPrivate		*priv=XFDASHBOARD_WINDOW_CONTENT(inContent)->priv;
-	gfloat								w, h;
-
-	/* No texture - no size to retrieve */
-	if(priv->texture==NULL) return(FALSE);
-
-	/* If window is suspended or if we use the fallback image
-	 * get real window size ...
-	 */
-	if(priv->isFallback || priv->isSuspended)
-	{
-		/* Is a fallback texture so get real window size */
-		gint							windowW, windowH;
-
-		xfdashboard_window_tracker_window_get_size(priv->window, &windowW, &windowH);
-		w=windowW;
-		h=windowH;
-	}
-		else
-		{
-			/* ... otherwise get size of texture */
-			w=cogl_texture_get_width(priv->texture);
-			h=cogl_texture_get_height(priv->texture);
-		}
-
-	/* Set result values */
-	if(outWidth) *outWidth=w;
-	if(outHeight) *outHeight=h;
-
-	return(TRUE);
-}
-
-/* Initialize interface of type ClutterContent */
-static void _xdashboard_window_content_clutter_content_iface_init(ClutterContentIface *iface)
-{
-	iface->get_preferred_size=_xdashboard_window_content_clutter_content_iface_get_preferred_size;
-	iface->paint_content=_xdashboard_window_content_clutter_content_iface_paint_content;
-}
-
-/* IMPLEMENTATION: Interface XfdashboardStylable */
-
-/* Get stylable properties of stage */
-static void _xfdashboard_window_content_stylable_get_stylable_properties(XfdashboardStylable *self,
-																			GHashTable *ioStylableProperties)
-{
-	g_return_if_fail(XFDASHBOARD_IS_STYLABLE(self));
-
-	/* Add stylable properties to hashtable */
-	xfdashboard_stylable_add_stylable_property(self, ioStylableProperties, "include-window-frame");
-	xfdashboard_stylable_add_stylable_property(self, ioStylableProperties, "unmapped-window-icon-x-fill");
-	xfdashboard_stylable_add_stylable_property(self, ioStylableProperties, "unmapped-window-icon-y-fill");
-	xfdashboard_stylable_add_stylable_property(self, ioStylableProperties, "unmapped-window-icon-x-align");
-	xfdashboard_stylable_add_stylable_property(self, ioStylableProperties, "unmapped-window-icon-y-align");
-	xfdashboard_stylable_add_stylable_property(self, ioStylableProperties, "unmapped-window-icon-x-scale");
-	xfdashboard_stylable_add_stylable_property(self, ioStylableProperties, "unmapped-window-icon-y-scale");
-	xfdashboard_stylable_add_stylable_property(self, ioStylableProperties, "unmapped-window-icon-anchor-point");
-}
-
-/* Get/set style classes of stage */
-static const gchar* _xfdashboard_window_content_stylable_get_classes(XfdashboardStylable *inStylable)
-{
-	/* Not implemented */
-	return(NULL);
-}
+#include <libxfdashboard/window-content.h>
 
-static void _xfdashboard_window_content_stylable_set_classes(XfdashboardStylable *inStylable, const gchar *inStyleClasses)
-{
-	/* Not implemented */
-}
+#include <glib/gi18n-lib.h>
 
-/* Get/set style pseudo-classes of stage */
-static const gchar* _xfdashboard_window_content_stylable_get_pseudo_classes(XfdashboardStylable *inStylable)
-{
-	/* Not implemented */
-	return(NULL);
-}
+#include <libxfdashboard/x11/window-content-x11.h>
+#include <libxfdashboard/compat.h>
 
-static void _xfdashboard_window_content_stylable_set_pseudo_classes(XfdashboardStylable *inStylable, const gchar *inStylePseudoClasses)
-{
-	/* Not implemented */
-}
 
-/* Interface initialization
- * Set up default functions
- */
-void _xfdashboard_window_content_stylable_iface_init(XfdashboardStylableInterface *iface)
-{
-	iface->get_stylable_properties=_xfdashboard_window_content_stylable_get_stylable_properties;
-	iface->get_classes=_xfdashboard_window_content_stylable_get_classes;
-	iface->set_classes=_xfdashboard_window_content_stylable_set_classes;
-	iface->get_pseudo_classes=_xfdashboard_window_content_stylable_get_pseudo_classes;
-	iface->set_pseudo_classes=_xfdashboard_window_content_stylable_set_pseudo_classes;
-}
+/* Define this class in GObject system */
+G_DEFINE_ABSTRACT_TYPE(XfdashboardWindowContent,
+						xfdashboard_window_content,
+						G_TYPE_OBJECT);
 
 /* IMPLEMENTATION: GObject */
 
-/* Dispose this object */
-static void _xfdashboard_window_content_dispose(GObject *inObject)
-{
-	XfdashboardWindowContent			*self=XFDASHBOARD_WINDOW_CONTENT(inObject);
-	XfdashboardWindowContentPrivate		*priv=self->priv;
-
-	/* Dispose allocated resources */
-	_xfdashboard_window_content_release_resources(self);
-
-	if(priv->workaroundStateSignalID)
-	{
-		g_signal_handler_disconnect(priv->windowTracker, priv->workaroundStateSignalID);
-		priv->workaroundStateSignalID=0;
-
-		/* This signal was still connected to the window tracker so the window may be unminized
-		 * and need to ensure it is minimized again. We need to do this now, before we release
-		 * our handle to the window (priv->window).
-		 */
-		xfdashboard_window_tracker_window_hide(priv->window);
-	}
-
-	if(priv->windowTracker)
-	{
-		g_signal_handlers_disconnect_by_data(priv->windowTracker, self);
-		g_object_unref(priv->windowTracker);
-		priv->windowTracker=NULL;
-	}
-
-	if(priv->window)
-	{
-		/* Remove from cache */
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Removing window content for window '%s' with ref-count %d" ,
-							xfdashboard_window_tracker_window_get_title(priv->window),
-							G_OBJECT(self)->ref_count);
-		g_hash_table_remove(_xfdashboard_window_content_cache, priv->window);
-
-		/* Disconnect signals */
-		g_signal_handlers_disconnect_by_data(priv->window, self);
-
-		/* libwnck resources should never be freed. Just set to NULL */
-		priv->window=NULL;
-	}
-
-	if(priv->suspendSignalID)
-	{
-		g_signal_handler_disconnect(xfdashboard_application_get_default(), priv->suspendSignalID);
-		priv->suspendSignalID=0;
-	}
-
-	if(priv->outlineColor)
-	{
-		clutter_color_free(priv->outlineColor);
-		priv->outlineColor=NULL;
-	}
-
-	if(priv->styleClasses)
-	{
-		g_free(priv->styleClasses);
-		priv->styleClasses=NULL;
-	}
-
-	if(priv->stylePseudoClasses)
-	{
-		g_free(priv->stylePseudoClasses);
-		priv->stylePseudoClasses=NULL;
-	}
-
-	/* Call parent's class dispose method */
-	G_OBJECT_CLASS(xfdashboard_window_content_parent_class)->dispose(inObject);
-}
-
-/* Set/get properties */
-static void _xfdashboard_window_content_set_property(GObject *inObject,
-												guint inPropID,
-												const GValue *inValue,
-												GParamSpec *inSpec)
-{
-	XfdashboardWindowContent		*self=XFDASHBOARD_WINDOW_CONTENT(inObject);
-
-	switch(inPropID)
-	{
-		case PROP_WINDOW_CONTENT:
-			_xfdashboard_window_content_set_window(self, XFDASHBOARD_WINDOW_TRACKER_WINDOW(g_value_get_object(inValue)));
-			break;
-
-		case PROP_OUTLINE_COLOR:
-			xfdashboard_window_content_set_outline_color(self, clutter_value_get_color(inValue));
-			break;
-
-		case PROP_OUTLINE_WIDTH:
-			xfdashboard_window_content_set_outline_width(self, g_value_get_float(inValue));
-			break;
-
-		case PROP_INCLUDE_WINDOW_FRAME:
-			xfdashboard_window_content_set_include_window_frame(self, g_value_get_boolean(inValue));
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_X_FILL:
-			xfdashboard_window_content_set_unmapped_window_icon_x_fill(self, g_value_get_boolean(inValue));
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_Y_FILL:
-			xfdashboard_window_content_set_unmapped_window_icon_y_fill(self, g_value_get_boolean(inValue));
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_X_ALIGN:
-			xfdashboard_window_content_set_unmapped_window_icon_x_align(self, g_value_get_float(inValue));
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_Y_ALIGN:
-			xfdashboard_window_content_set_unmapped_window_icon_y_align(self, g_value_get_float(inValue));
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_X_SCALE:
-			xfdashboard_window_content_set_unmapped_window_icon_x_scale(self, g_value_get_float(inValue));
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_Y_SCALE:
-			xfdashboard_window_content_set_unmapped_window_icon_y_scale(self, g_value_get_float(inValue));
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_ANCHOR_POINT:
-			xfdashboard_window_content_set_unmapped_window_icon_anchor_point(self, g_value_get_enum(inValue));
-			break;
-
-		case PROP_STYLE_CLASSES:
-			_xfdashboard_window_content_stylable_set_classes(XFDASHBOARD_STYLABLE(self), g_value_get_string(inValue));
-			break;
-
-		case PROP_STYLE_PSEUDO_CLASSES:
-			_xfdashboard_window_content_stylable_set_pseudo_classes(XFDASHBOARD_STYLABLE(self), g_value_get_string(inValue));
-			break;
-
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(inObject, inPropID, inSpec);
-			break;
-	}
-}
-
-static void _xfdashboard_window_content_get_property(GObject *inObject,
-												guint inPropID,
-												GValue *outValue,
-												GParamSpec *inSpec)
-{
-	XfdashboardWindowContent			*self=XFDASHBOARD_WINDOW_CONTENT(inObject);
-	XfdashboardWindowContentPrivate		*priv=self->priv;
-
-	switch(inPropID)
-	{
-		case PROP_WINDOW_CONTENT:
-			g_value_set_object(outValue, priv->window);
-			break;
-
-		case PROP_SUSPENDED:
-			g_value_set_boolean(outValue, priv->isSuspended);
-			break;
-
-		case PROP_OUTLINE_COLOR:
-			clutter_value_set_color(outValue, priv->outlineColor);
-			break;
-
-		case PROP_OUTLINE_WIDTH:
-			g_value_set_float(outValue, priv->outlineWidth);
-			break;
-
-		case PROP_INCLUDE_WINDOW_FRAME:
-			g_value_set_boolean(outValue, priv->includeWindowFrame);
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_X_FILL:
-			g_value_set_boolean(outValue, priv->unmappedWindowIconXFill);
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_Y_FILL:
-			g_value_set_boolean(outValue, priv->unmappedWindowIconYFill);
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_X_ALIGN:
-			g_value_set_float(outValue, priv->unmappedWindowIconXAlign);
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_Y_ALIGN:
-			g_value_set_float(outValue, priv->unmappedWindowIconYAlign);
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_X_SCALE:
-			g_value_set_float(outValue, priv->unmappedWindowIconXScale);
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_Y_SCALE:
-			g_value_set_float(outValue, priv->unmappedWindowIconYScale);
-			break;
-
-		case PROP_UNMAPPED_WINDOW_ICON_ANCHOR_POINT:
-			g_value_set_enum(outValue, priv->unmappedWindowIconAnchorPoint);
-			break;
-
-		case PROP_STYLE_CLASSES:
-			g_value_set_string(outValue, priv->styleClasses);
-			break;
-
-		case PROP_STYLE_PSEUDO_CLASSES:
-			g_value_set_string(outValue, priv->stylePseudoClasses);
-			break;
-
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(inObject, inPropID, inSpec);
-			break;
-	}
-}
-
 /* Class initialization
  * Override functions in parent classes and define properties
  * and signals
  */
 void xfdashboard_window_content_class_init(XfdashboardWindowContentClass *klass)
 {
-	GObjectClass					*gobjectClass=G_OBJECT_CLASS(klass);
-	XfdashboardStylableInterface	*stylableIface;
-	GParamSpec						*paramSpec;
-
-	/* Override functions */
-	gobjectClass->dispose=_xfdashboard_window_content_dispose;
-	gobjectClass->set_property=_xfdashboard_window_content_set_property;
-	gobjectClass->get_property=_xfdashboard_window_content_get_property;
-
-	stylableIface=g_type_default_interface_ref(XFDASHBOARD_TYPE_STYLABLE);
-
-	/* Set up private structure */
-	g_type_class_add_private(klass, sizeof(XfdashboardWindowContentPrivate));
-
-	/* Define properties */
-	XfdashboardWindowContentProperties[PROP_WINDOW_CONTENT]=
-		g_param_spec_object("window",
-							_("Window"),
-							_("The window to handle and display"),
-							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
-
-	XfdashboardWindowContentProperties[PROP_SUSPENDED]=
-		g_param_spec_boolean("suspended",
-							_("Suspended"),
-							_("Is this window suspended"),
-							TRUE,
-							G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_OUTLINE_COLOR]=
-		clutter_param_spec_color("outline-color",
-									_("Outline color"),
-									_("Color to draw outline of mapped windows with"),
-									CLUTTER_COLOR_Black,
-									G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_OUTLINE_WIDTH]=
-		g_param_spec_float("outline-width",
-							_("Outline width"),
-							_("Width of line used to draw outline of mapped windows"),
-							0.0f, G_MAXFLOAT,
-							1.0f,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_INCLUDE_WINDOW_FRAME]=
-		g_param_spec_boolean("include-window-frame",
-							_("Include window frame"),
-							_("Whether the window frame should be included or only the window content should be shown"),
-							FALSE,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_X_FILL]=
-		g_param_spec_boolean("unmapped-window-icon-x-fill",
-							_("Unmapped window icon X fill"),
-							_("Whether the unmapped window icon should fill up horizontal space"),
-							TRUE,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_Y_FILL]=
-		g_param_spec_boolean("unmapped-window-icon-y-fill",
-							_("Unmapped window icon y fill"),
-							_("Whether the unmapped window icon should fill up vertical space"),
-							TRUE,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_X_ALIGN]=
-		g_param_spec_float("unmapped-window-icon-x-align",
-							_("Unmapped window icon X align"),
-							_("The alignment of the unmapped window icon on the X axis within the allocation in normalized coordinate between 0 and 1"),
-							0.0f, 1.0f,
-							0.0f,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_Y_ALIGN]=
-		g_param_spec_float("unmapped-window-icon-y-align",
-							_("Unmapped window icon Y align"),
-							_("The alignment of the unmapped window icon on the Y axis within the allocation in normalized coordinate between 0 and 1"),
-							0.0f, 1.0f,
-							0.0f,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_X_SCALE]=
-		g_param_spec_float("unmapped-window-icon-x-scale",
-							_("Unmapped window icon X scale"),
-							_("Scale factor of unmapped window icon on the X axis"),
-							0.0f, G_MAXFLOAT,
-							1.0f,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_Y_SCALE]=
-		g_param_spec_float("unmapped-window-icon-y-scale",
-							_("Unmapped window icon Y scale"),
-							_("Scale factor of unmapped window icon on the Y axis"),
-							0.0f, G_MAXFLOAT,
-							1.0f,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_ANCHOR_POINT]=
-		g_param_spec_enum("unmapped-window-icon-anchor-point",
-							_("Unmapped window icon anchor point"),
-							_("The anchor point of unmapped window icon"),
-							XFDASHBOARD_TYPE_ANCHOR_POINT,
-							XFDASHBOARD_ANCHOR_POINT_NONE,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
-	paramSpec=g_object_interface_find_property(stylableIface, "style-classes");
-	XfdashboardWindowContentProperties[PROP_STYLE_CLASSES]=
-		g_param_spec_override("style-classes", paramSpec);
-
-	paramSpec=g_object_interface_find_property(stylableIface, "style-pseudo-classes");
-	XfdashboardWindowContentProperties[PROP_STYLE_PSEUDO_CLASSES]=
-		g_param_spec_override("style-pseudo-classes", paramSpec);
-
-	g_object_class_install_properties(gobjectClass, PROP_LAST, XfdashboardWindowContentProperties);
-
-	/* Release allocated resources */
-	g_type_default_interface_unref(stylableIface);
 }
 
 /* Object initialization
@@ -2224,473 +53,4 @@ void xfdashboard_window_content_class_init(XfdashboardWindowContentClass *klass)
  */
 void xfdashboard_window_content_init(XfdashboardWindowContent *self)
 {
-	XfdashboardWindowContentPrivate		*priv;
-	XfdashboardApplication				*app;
-
-	priv=self->priv=XFDASHBOARD_WINDOW_CONTENT_GET_PRIVATE(self);
-
-	/* Set default values */
-	priv->window=NULL;
-	priv->texture=NULL;
-	priv->xWindowID=None;
-	priv->pixmap=None;
-#ifdef HAVE_XDAMAGE
-	priv->damage=None;
-#endif
-	priv->isFallback=FALSE;
-	priv->outlineColor=clutter_color_copy(CLUTTER_COLOR_Black);
-	priv->outlineWidth=1.0f;
-	priv->isSuspended=TRUE;
-	priv->suspendSignalID=0;
-	priv->isMapped=FALSE;
-	priv->includeWindowFrame=FALSE;
-	priv->styleClasses=NULL;
-	priv->stylePseudoClasses=NULL;
-	priv->windowTracker=xfdashboard_window_tracker_get_default();
-	priv->workaroundMode=XFDASHBOARD_WINDOW_CONTENT_WORKAROUND_MODE_NONE;
-	priv->workaroundStateSignalID=0;
-	priv->unmappedWindowIconXFill=FALSE;
-	priv->unmappedWindowIconYFill=FALSE;
-	priv->unmappedWindowIconXAlign=0.0f;
-	priv->unmappedWindowIconYAlign=0.0f;
-	priv->unmappedWindowIconXScale=1.0f;
-	priv->unmappedWindowIconYScale=1.0f;
-	priv->unmappedWindowIconAnchorPoint=XFDASHBOARD_ANCHOR_POINT_NONE;
-	priv->suspendAfterResumeOnIdle=FALSE;
-
-	/* Check extensions (will only be done once) */
-	_xfdashboard_window_content_check_extension();
-
-	/* Add event filter for this instance */
-	clutter_x11_add_filter(_xfdashboard_window_content_on_x_event, self);
-
-	/* Style content */
-	xfdashboard_stylable_invalidate(XFDASHBOARD_STYLABLE(self));
-
-	/* Handle suspension signals from application */
-	app=xfdashboard_application_get_default();
-	priv->suspendSignalID=g_signal_connect_swapped(app,
-													"notify::is-suspended",
-													G_CALLBACK(_xfdashboard_window_content_on_application_suspended_changed),
-													self);
-	priv->isAppSuspended=xfdashboard_application_is_suspended(app);
-
-	/* Register global signal handler for xfconf value change notification
-	 * if not done already.
-	 */
-	if(!_xfdashboard_window_content_xfconf_priority_notify_id)
-	{
-		XfconfChannel					*xfconfChannel;
-		gchar							*detailedSignal;
-
-		/* Connect to property changed signal in xfconf */
-		xfconfChannel=xfdashboard_application_get_xfconf_channel(NULL);
-		detailedSignal=g_strconcat("property-changed::", WINDOW_CONTENT_CREATION_PRIORITY_XFCONF_PROP, NULL);
-		_xfdashboard_window_content_xfconf_priority_notify_id=g_signal_connect(xfconfChannel,
-																				detailedSignal,
-																				G_CALLBACK(_xfdashboard_window_content_on_window_creation_priority_value_changed),
-																				NULL);
-		if(detailedSignal) g_free(detailedSignal);
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Connected to property changed signal with handler ID %u for xfconf value change notifications",
-							_xfdashboard_window_content_xfconf_priority_notify_id);
-
-		/* Connect to application shutdown signal for xfconf value change notification */
-		_xfdashboard_window_content_window_creation_shutdown_signal_id=g_signal_connect(app,
-																				"shutdown-final",
-																				G_CALLBACK(_xfdashboard_window_content_on_window_creation_priority_shutdown),
-																				NULL);
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Connected to shutdown signal with handler ID %u for xfconf value change notifications",
-							_xfdashboard_window_content_window_creation_shutdown_signal_id);
-	}
-}
-
-/* IMPLEMENTATION: Public API */
-
-/* Create new instance */
-ClutterContent* xfdashboard_window_content_new_for_window(XfdashboardWindowTrackerWindow *inWindow)
-{
-	ClutterContent		*content;
-
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inWindow), NULL);
-
-	/* If we a hash table (cache) set up lookup if window content is already cached
-	 * and return a new reference to it
-	 */
-	if(_xfdashboard_window_content_cache &&
-		g_hash_table_contains(_xfdashboard_window_content_cache, inWindow))
-	{
-		content=CLUTTER_CONTENT(g_hash_table_lookup(_xfdashboard_window_content_cache, inWindow));
-		g_object_ref(content);
-		XFDASHBOARD_DEBUG(content, WINDOWS,
-							"Using cached window content for '%s' - ref-count is now %d" ,
-							xfdashboard_window_tracker_window_get_title(XFDASHBOARD_WINDOW_CONTENT(content)->priv->window),
-							G_OBJECT(content)->ref_count);
-
-		return(content);
-	}
-
-	/* Create window content */
-	content=CLUTTER_CONTENT(g_object_new(XFDASHBOARD_TYPE_WINDOW_CONTENT,
-											"window", inWindow,
-											NULL));
-	g_return_val_if_fail(content, NULL);
-
-	/* Create cache if not available */
-	if(!_xfdashboard_window_content_cache) _xfdashboard_window_content_create_cache();
-
-	/* Store new window content into cache */
-	g_hash_table_insert(_xfdashboard_window_content_cache, inWindow, content);
-	XFDASHBOARD_DEBUG(content, WINDOWS,
-						"Added window content for '%s' with ref-count %d" ,
-						xfdashboard_window_tracker_window_get_title(inWindow),
-						G_OBJECT(content)->ref_count);
-
-	return(content);
-}
-
-/* Get window to handle and to display */
-XfdashboardWindowTrackerWindow* xfdashboard_window_content_get_window(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), NULL);
-
-	return(self->priv->window);
-}
-
-/* Get state of suspension */
-gboolean xfdashboard_window_content_is_suspended(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), TRUE);
-
-	return(self->priv->isSuspended);
-}
-
-/* Get/set color to draw outline with */
-const ClutterColor* xfdashboard_window_content_get_outline_color(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), NULL);
-
-	return(self->priv->outlineColor);
-}
-
-void xfdashboard_window_content_set_outline_color(XfdashboardWindowContent *self, const ClutterColor *inColor)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(inColor);
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->outlineColor==NULL || clutter_color_equal(inColor, priv->outlineColor)==FALSE)
-	{
-		/* Set value */
-		if(priv->outlineColor) clutter_color_free(priv->outlineColor);
-		priv->outlineColor=clutter_color_copy(inColor);
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_OUTLINE_COLOR]);
-	}
-}
-
-/* Get/set line width for outline */
-gfloat xfdashboard_window_content_get_outline_width(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), 0.0f);
-
-	return(self->priv->outlineWidth);
-}
-
-void xfdashboard_window_content_set_outline_width(XfdashboardWindowContent *self, const gfloat inWidth)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(inWidth>=0.0f);
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->outlineWidth!=inWidth)
-	{
-		/* Set value */
-		priv->outlineWidth=inWidth;
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_OUTLINE_WIDTH]);
-	}
-}
-
-/* Get/set flag to indicate whether to include the window frame or not */
-gboolean xfdashboard_window_content_get_include_window_frame(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), TRUE);
-
-	return(self->priv->includeWindowFrame);
-}
-
-void xfdashboard_window_content_set_include_window_frame(XfdashboardWindowContent *self, const gboolean inIncludeFrame)
-{
-	XfdashboardWindowContentPrivate				*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->includeWindowFrame!=inIncludeFrame)
-	{
-		/* Set value */
-		priv->includeWindowFrame=inIncludeFrame;
-
-		/* (Re-)Setup window content */
-		if(priv->window)
-		{
-			XfdashboardWindowTrackerWindow		*window;
-
-			/* Re-setup window by releasing all resources first and unsetting window
-			 * but remember window to set it again.
-			 */
-			_xfdashboard_window_content_release_resources(self);
-
-			/* libwnck resources should never be freed. Just set to NULL */
-			window=priv->window;
-			priv->window=NULL;
-
-			/* Now set same window again which causes this object to set up all
-			 * needed X resources again.
-			 */
-			_xfdashboard_window_content_set_window(self, window);
-		}
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_INCLUDE_WINDOW_FRAME]);
-	}
-}
-
-/* Get/set x fill of unmapped window icon */
-gboolean xfdashboard_window_content_get_unmapped_window_icon_x_fill(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), FALSE);
-
-	return(self->priv->unmappedWindowIconXFill);
-}
-
-void xfdashboard_window_content_set_unmapped_window_icon_x_fill(XfdashboardWindowContent *self, const gboolean inFill)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->unmappedWindowIconXFill!=inFill)
-	{
-		/* Set value */
-		priv->unmappedWindowIconXFill=inFill;
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_X_FILL]);
-	}
-}
-
-/* Get/set y fill of unmapped window icon */
-gboolean xfdashboard_window_content_get_unmapped_window_icon_y_fill(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), FALSE);
-
-	return(self->priv->unmappedWindowIconYFill);
-}
-
-void xfdashboard_window_content_set_unmapped_window_icon_y_fill(XfdashboardWindowContent *self, const gboolean inFill)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->unmappedWindowIconYFill!=inFill)
-	{
-		/* Set value */
-		priv->unmappedWindowIconYFill=inFill;
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_Y_FILL]);
-	}
-}
-
-/* Get/set x align of unmapped window icon */
-gfloat xfdashboard_window_content_get_unmapped_window_icon_x_align(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), 0.0f);
-
-	return(self->priv->unmappedWindowIconXAlign);
-}
-
-void xfdashboard_window_content_set_unmapped_window_icon_x_align(XfdashboardWindowContent *self, const gfloat inAlign)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(inAlign>=0.0f && inAlign<=1.0f);
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->unmappedWindowIconXAlign!=inAlign)
-	{
-		/* Set value */
-		priv->unmappedWindowIconXAlign=inAlign;
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_X_ALIGN]);
-	}
-}
-
-/* Get/set y align of unmapped window icon */
-gfloat xfdashboard_window_content_get_unmapped_window_icon_y_align(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), 0.0f);
-
-	return(self->priv->unmappedWindowIconYAlign);
-}
-
-void xfdashboard_window_content_set_unmapped_window_icon_y_align(XfdashboardWindowContent *self, const gfloat inAlign)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(inAlign>=0.0f && inAlign<=1.0f);
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->unmappedWindowIconYAlign!=inAlign)
-	{
-		/* Set value */
-		priv->unmappedWindowIconYAlign=inAlign;
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_Y_ALIGN]);
-	}
-}
-
-/* Get/set x scale of unmapped window icon */
-gfloat xfdashboard_window_content_get_unmapped_window_icon_x_scale(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), 0.0f);
-
-	return(self->priv->unmappedWindowIconXScale);
-}
-
-void xfdashboard_window_content_set_unmapped_window_icon_x_scale(XfdashboardWindowContent *self, const gfloat inScale)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(inScale>=0.0f);
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->unmappedWindowIconXScale!=inScale)
-	{
-		/* Set value */
-		priv->unmappedWindowIconXScale=inScale;
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_X_SCALE]);
-	}
-}
-
-/* Get/set y scale of unmapped window icon */
-gfloat xfdashboard_window_content_get_unmapped_window_icon_y_scale(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), 0.0f);
-
-	return(self->priv->unmappedWindowIconYScale);
-}
-
-void xfdashboard_window_content_set_unmapped_window_icon_y_scale(XfdashboardWindowContent *self, const gfloat inScale)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(inScale>=0.0f);
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->unmappedWindowIconYScale!=inScale)
-	{
-		/* Set value */
-		priv->unmappedWindowIconYScale=inScale;
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_Y_SCALE]);
-	}
-}
-
-/* Get/set gravity (anchor point) of unmapped window icon */
-XfdashboardAnchorPoint xfdashboard_window_content_get_unmapped_window_icon_anchor_point(XfdashboardWindowContent *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self), XFDASHBOARD_ANCHOR_POINT_NONE);
-
-	return(self->priv->unmappedWindowIconAnchorPoint);
-}
-
-void xfdashboard_window_content_set_unmapped_window_icon_anchor_point(XfdashboardWindowContent *self, const XfdashboardAnchorPoint inAnchorPoint)
-{
-	XfdashboardWindowContentPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_CONTENT(self));
-	g_return_if_fail(inAnchorPoint>=XFDASHBOARD_ANCHOR_POINT_NONE);
-	g_return_if_fail(inAnchorPoint<=XFDASHBOARD_ANCHOR_POINT_CENTER);
-
-	priv=self->priv;
-
-	/* Set value if changed */
-	if(priv->unmappedWindowIconAnchorPoint!=inAnchorPoint)
-	{
-		/* Set value */
-		priv->unmappedWindowIconAnchorPoint=inAnchorPoint;
-
-		/* Invalidate ourselve to get us redrawn */
-		clutter_content_invalidate(CLUTTER_CONTENT(self));
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowContentProperties[PROP_UNMAPPED_WINDOW_ICON_ANCHOR_POINT]);
-	}
 }
diff --git a/libxfdashboard/window-content.h b/libxfdashboard/window-content.h
index 3c9feb8..a59226a 100644
--- a/libxfdashboard/window-content.h
+++ b/libxfdashboard/window-content.h
@@ -28,10 +28,7 @@
 #error "Only <libxfdashboard/libxfdashboard.h> can be included directly."
 #endif
 
-#include <clutter/clutter.h>
-
 #include <libxfdashboard/window-tracker-window.h>
-#include <libxfdashboard/types.h>
 
 G_BEGIN_DECLS
 
@@ -69,42 +66,6 @@ struct _XfdashboardWindowContentClass
 /* Public API */
 GType xfdashboard_window_content_get_type(void) G_GNUC_CONST;
 
-ClutterContent* xfdashboard_window_content_new_for_window(XfdashboardWindowTrackerWindow *inWindow);
-
-XfdashboardWindowTrackerWindow* xfdashboard_window_content_get_window(XfdashboardWindowContent *self);
-
-gboolean xfdashboard_window_content_is_suspended(XfdashboardWindowContent *self);
-
-const ClutterColor* xfdashboard_window_content_get_outline_color(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_outline_color(XfdashboardWindowContent *self, const ClutterColor *inColor);
-
-gfloat xfdashboard_window_content_get_outline_width(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_outline_width(XfdashboardWindowContent *self, const gfloat inWidth);
-
-gboolean xfdashboard_window_content_get_include_window_frame(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_include_window_frame(XfdashboardWindowContent *self, const gboolean inIncludeFrame);
-
-gboolean xfdashboard_window_content_get_unmapped_window_icon_x_fill(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_unmapped_window_icon_x_fill(XfdashboardWindowContent *self, const gboolean inFill);
-
-gboolean xfdashboard_window_content_get_unmapped_window_icon_y_fill(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_unmapped_window_icon_y_fill(XfdashboardWindowContent *self, const gboolean inFill);
-
-gfloat xfdashboard_window_content_get_unmapped_window_icon_x_align(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_unmapped_window_icon_x_align(XfdashboardWindowContent *self, const gfloat inAlign);
-
-gfloat xfdashboard_window_content_get_unmapped_window_icon_y_align(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_unmapped_window_icon_y_align(XfdashboardWindowContent *self, const gfloat inAlign);
-
-gfloat xfdashboard_window_content_get_unmapped_window_icon_x_scale(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_unmapped_window_icon_x_scale(XfdashboardWindowContent *self, const gfloat inScale);
-
-gfloat xfdashboard_window_content_get_unmapped_window_icon_y_scale(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_unmapped_window_icon_y_scale(XfdashboardWindowContent *self, const gfloat inScale);
-
-XfdashboardAnchorPoint xfdashboard_window_content_get_unmapped_window_icon_anchor_point(XfdashboardWindowContent *self);
-void xfdashboard_window_content_set_unmapped_window_icon_anchor_point(XfdashboardWindowContent *self, const XfdashboardAnchorPoint inAnchorPoint);
-
 G_END_DECLS
 
 #endif
diff --git a/libxfdashboard/window-tracker-monitor.c b/libxfdashboard/window-tracker-monitor.c
index ea83f8e..a28b76f 100644
--- a/libxfdashboard/window-tracker-monitor.c
+++ b/libxfdashboard/window-tracker-monitor.c
@@ -4,7 +4,7 @@
  *                         size of monitor within screen and also a flag
  *                         if this monitor is the primary one.
  * 
- * Copyright 2012-2017 Stephan Haller <nomad at froevel.de>
+ * Copyright 2012-2016 Stephan Haller <nomad at froevel.de>
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -31,44 +31,15 @@
 #include <libxfdashboard/window-tracker-monitor.h>
 
 #include <glib/gi18n-lib.h>
-#include <gdk/gdkx.h>
 
 #include <libxfdashboard/compat.h>
-#include <libxfdashboard/debug.h>
 
 
 /* Define this class in GObject system */
-G_DEFINE_TYPE(XfdashboardWindowTrackerMonitor,
-				xfdashboard_window_tracker_monitor,
-				G_TYPE_OBJECT)
+G_DEFINE_INTERFACE(XfdashboardWindowTrackerMonitor,
+					xfdashboard_window_tracker_monitor,
+					G_TYPE_OBJECT)
 
-/* Private structure - access only by public API if needed */
-#define XFDASHBOARD_WINDOW_TRACKER_MONITOR_GET_PRIVATE(obj) \
-	(G_TYPE_INSTANCE_GET_PRIVATE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR, XfdashboardWindowTrackerMonitorPrivate))
-
-struct _XfdashboardWindowTrackerMonitorPrivate
-{
-	/* Properties related */
-	gint				monitorIndex;
-	gboolean			isPrimary;
-
-	/* Instance related */
-	GdkScreen			*screen;
-	GdkRectangle		geometry;
-};
-
-/* Properties */
-enum
-{
-	PROP_0,
-
-	PROP_MONITOR_INDEX,
-	PROP_IS_PRIMARY,
-
-	PROP_LAST
-};
-
-static GParamSpec* XfdashboardWindowTrackerMonitorProperties[PROP_LAST]={ 0, };
 
 /* Signals */
 enum
@@ -83,274 +54,92 @@ static guint XfdashboardWindowTrackerMonitorSignals[SIGNAL_LAST]={ 0, };
 
 
 /* IMPLEMENTATION: Private variables and methods */
-
-/* Set primary monitor flag */
-static void _xfdashboard_window_tracker_monitor_update_primary(XfdashboardWindowTrackerMonitor *self)
-{
-	XfdashboardWindowTrackerMonitorPrivate		*priv;
-	gint										primaryIndex;
-	gboolean									isPrimary;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self));
-
-	priv=self->priv;
-
-	/* Get primary flag */
-	primaryIndex=gdk_screen_get_primary_monitor(priv->screen);
-	if(primaryIndex==priv->monitorIndex) isPrimary=TRUE;
-		else isPrimary=FALSE;
-
-	/* Set value if changed */
-	if(priv->isPrimary!=isPrimary)
-	{
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Monitor %d changes primary state from %s to %s",
-							priv->monitorIndex,
-							priv->isPrimary ? "yes" : "no",
-							isPrimary ? "yes" : "no");
-
-		/* Set value */
-		priv->isPrimary=isPrimary;
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowTrackerMonitorProperties[PROP_IS_PRIMARY]);
-
-		/* Emit signal */
-		g_signal_emit(self, XfdashboardWindowTrackerMonitorSignals[SIGNAL_PRIMARY_CHANGED], 0);
-	}
-}
-
-/* Update monitor geometry */
-static void _xfdashboard_window_tracker_monitor_update_geometry(XfdashboardWindowTrackerMonitor *self)
-{
-	XfdashboardWindowTrackerMonitorPrivate		*priv;
-	GdkRectangle								geometry;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self));
-
-	priv=self->priv;
-
-	/* Check if monitor is valid */
-	if(priv->monitorIndex>=gdk_screen_get_n_monitors(priv->screen)) return;
-
-	/* Get monitor geometry */
-	gdk_screen_get_monitor_geometry(priv->screen, priv->monitorIndex, &geometry);
-
-	/* Set value if changed */
-	if(geometry.x!=priv->geometry.x ||
-		geometry.y!=priv->geometry.y ||
-		geometry.width!=priv->geometry.width ||
-		geometry.height!=priv->geometry.height)
-	{
-		/* Set value */
-		priv->geometry.x=geometry.x;
-		priv->geometry.y=geometry.y;
-		priv->geometry.width=geometry.width;
-		priv->geometry.height=geometry.height;
-
-		/* Emit signal */
-		g_signal_emit(self, XfdashboardWindowTrackerMonitorSignals[SIGNAL_GEOMETRY_CHANGED], 0);
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Monitor %d moved to %d,%d and resized to %dx%d",
-							priv->monitorIndex,
-							priv->geometry.x, priv->geometry.y,
-							priv->geometry.width, priv->geometry.height);
-	}
-}
-
-/* Set monitor index this object belongs to and to monitor */
-static void _xfdashboard_window_tracker_monitor_set_index(XfdashboardWindowTrackerMonitor *self, gint inIndex)
+#define XFDASHBOARD_WINDOWS_TRACKER_MONITOR_WARN_NOT_IMPLEMENTED(self, vfunc)\
+	g_warning(_("Object of type %s does not implement required virtual function XfdashboardWindowTrackerMonitor::%s"),\
+				G_OBJECT_TYPE_NAME(self), \
+				vfunc);
+
+/* Default implementation of virtual function "is_equal" */
+static gboolean _xfdashboard_window_tracker_monitor_real_is_equal(XfdashboardWindowTrackerMonitor *inLeft,
+																	XfdashboardWindowTrackerMonitor *inRight)
 {
-	XfdashboardWindowTrackerMonitorPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self));
-	g_return_if_fail(inIndex>=0);
-	g_return_if_fail(inIndex<gdk_screen_get_n_monitors(self->priv->screen));
-
-	priv=self->priv;
-
-	/* Freeze notification */
-	g_object_freeze_notify(G_OBJECT(self));
-
-	/* Set value if changed */
-	if(priv->monitorIndex!=inIndex)
-	{
-		/* Set value */
-		priv->monitorIndex=inIndex;
+	gint			leftIndex, rightIndex;
 
-		/* Update primary monitor flag */
-		_xfdashboard_window_tracker_monitor_update_primary(self);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inLeft), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inRight), FALSE);
 
-		/* Update geometry of monitor */
-		_xfdashboard_window_tracker_monitor_update_geometry(self);
-	}
+	/* Check if both are the same workspace or refer to same one */
+	leftIndex=xfdashboard_window_tracker_monitor_get_number(inLeft);
+	rightIndex=xfdashboard_window_tracker_monitor_get_number(inRight);
+	if(inLeft==inRight || leftIndex==rightIndex) return(TRUE);
 
-	/* Thaw notification */
-	g_object_thaw_notify(G_OBJECT(self));
+	/* If we get here then they cannot be considered equal */
+	return(FALSE);
 }
 
-/* Number of monitors, primary monitor or size of any monitor changed */
-static void _xfdashboard_window_tracker_monitor_on_monitors_changed(XfdashboardWindowTrackerMonitor *self,
-																	gpointer inUserData)
-{
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self));
-	g_return_if_fail(GDK_IS_SCREEN(inUserData));
-
-	/* Update primary monitor flag */
-	_xfdashboard_window_tracker_monitor_update_primary(self);
-
-	/* Update geometry of monitor */
-	_xfdashboard_window_tracker_monitor_update_geometry(self);
-}
 
 /* IMPLEMENTATION: GObject */
 
-/* Dispose this object */
-static void _xfdashboard_window_tracker_monitor_dispose(GObject *inObject)
-{
-	XfdashboardWindowTrackerMonitor			*self=XFDASHBOARD_WINDOW_TRACKER_MONITOR(inObject);
-	XfdashboardWindowTrackerMonitorPrivate	*priv=self->priv;
-
-	/* Release allocated resources */
-	if(priv->screen)
-	{
-		g_signal_handlers_disconnect_by_data(priv->screen, self);
-		priv->screen=NULL;
-	}
-
-	/* Call parent's class dispose method */
-	G_OBJECT_CLASS(xfdashboard_window_tracker_monitor_parent_class)->dispose(inObject);
-}
-
-/* Set/get properties */
-static void _xfdashboard_window_tracker_monitor_set_property(GObject *inObject,
-																guint inPropID,
-																const GValue *inValue,
-																GParamSpec *inSpec)
+/* Interface initialization
+ * Set up default functions
+ */
+static void xfdashboard_window_tracker_monitor_default_init(XfdashboardWindowTrackerMonitorInterface *iface)
 {
-	XfdashboardWindowTrackerMonitor			*self=XFDASHBOARD_WINDOW_TRACKER_MONITOR(inObject);
+	static gboolean		initialized=FALSE;
+	GParamSpec			*property;
 
-	switch(inPropID)
-	{
-		case PROP_MONITOR_INDEX:
-			_xfdashboard_window_tracker_monitor_set_index(self, g_value_get_int(inValue));
-			break;
-
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(inObject, inPropID, inSpec);
-			break;
-	}
-}
-
-static void _xfdashboard_window_tracker_monitor_get_property(GObject *inObject,
-																guint inPropID,
-																GValue *outValue,
-																GParamSpec *inSpec)
-{
-	XfdashboardWindowTrackerMonitor			*self=XFDASHBOARD_WINDOW_TRACKER_MONITOR(inObject);
-	XfdashboardWindowTrackerMonitorPrivate	*priv=self->priv;
+	/* The following virtual functions should be overriden if default
+	 * implementation does not fit.
+	 */
+	iface->is_equal=_xfdashboard_window_tracker_monitor_real_is_equal;
 
-	switch(inPropID)
+	/* Define properties, signals and actions */
+	if(!initialized)
 	{
-		case PROP_IS_PRIMARY:
-			g_value_set_boolean(outValue, priv->isPrimary);
-			break;
-
-		case PROP_MONITOR_INDEX:
-			g_value_set_uint(outValue, priv->monitorIndex);
-			break;
-
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(inObject, inPropID, inSpec);
-			break;
+		/* Define properties */
+		property=g_param_spec_int("monitor-index",
+									_("Monitor index"),
+									_("The index of this monitor"),
+									0, G_MAXINT,
+									0,
+									G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
+		g_object_interface_install_property(iface, property);
+
+		property=g_param_spec_boolean("is-primary",
+										_("Is primary"),
+										_("Whether this monitor is the primary one"),
+										FALSE,
+										G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+		g_object_interface_install_property(iface, property);
+
+		/* Define signals */
+		XfdashboardWindowTrackerMonitorSignals[SIGNAL_PRIMARY_CHANGED]=
+			g_signal_new("primary-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerMonitorInterface, primary_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__VOID,
+							G_TYPE_NONE,
+							0);
+
+		XfdashboardWindowTrackerMonitorSignals[SIGNAL_GEOMETRY_CHANGED]=
+			g_signal_new("geometry-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerMonitorInterface, geometry_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__VOID,
+							G_TYPE_NONE,
+							0);
+
+		/* Set flag that base initialization was done for this interface */
+		initialized=TRUE;
 	}
 }
 
-/* Class initialization
- * Override functions in parent classes and define properties
- * and signals
- */
-static void xfdashboard_window_tracker_monitor_class_init(XfdashboardWindowTrackerMonitorClass *klass)
-{
-	GObjectClass					*gobjectClass=G_OBJECT_CLASS(klass);
-
-	/* Override functions */
-	gobjectClass->dispose=_xfdashboard_window_tracker_monitor_dispose;
-	gobjectClass->set_property=_xfdashboard_window_tracker_monitor_set_property;
-	gobjectClass->get_property=_xfdashboard_window_tracker_monitor_get_property;
-
-	/* Set up private structure */
-	g_type_class_add_private(klass, sizeof(XfdashboardWindowTrackerMonitorPrivate));
-
-	/* Define properties */
-	XfdashboardWindowTrackerMonitorProperties[PROP_MONITOR_INDEX]=
-		g_param_spec_int("monitor-index",
-							_("Monitor index"),
-							_("The index of this monitor"),
-							0, G_MAXINT,
-							0,
-							G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY);
-
-	XfdashboardWindowTrackerMonitorProperties[PROP_IS_PRIMARY]=
-		g_param_spec_boolean("is-primary",
-								_("Is primary"),
-								_("Whether this monitor is the primary one"),
-								FALSE,
-								G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-
-	g_object_class_install_properties(gobjectClass, PROP_LAST, XfdashboardWindowTrackerMonitorProperties);
-
-	/* Define signals */
-	XfdashboardWindowTrackerMonitorSignals[SIGNAL_PRIMARY_CHANGED]=
-		g_signal_new("primary-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerMonitorClass, primary_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__VOID,
-						G_TYPE_NONE,
-						0);
-
-	XfdashboardWindowTrackerMonitorSignals[SIGNAL_GEOMETRY_CHANGED]=
-		g_signal_new("geometry-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerMonitorClass, geometry_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__VOID,
-						G_TYPE_NONE,
-						0);
-}
-
-/* Object initialization
- * Create private structure and set up default values
- */
-static void xfdashboard_window_tracker_monitor_init(XfdashboardWindowTrackerMonitor *self)
-{
-	XfdashboardWindowTrackerMonitorPrivate		*priv;
-
-	priv=self->priv=XFDASHBOARD_WINDOW_TRACKER_MONITOR_GET_PRIVATE(self);
-
-	/* Set default values */
-	priv->monitorIndex=0;
-	priv->isPrimary=FALSE;
-	priv->screen=gdk_screen_get_default();
-	priv->geometry.x=0;
-	priv->geometry.y=0;
-	priv->geometry.width=0;
-	priv->geometry.height=0;
-
-	/* Get initial primary monitor flag */
-	_xfdashboard_window_tracker_monitor_update_primary(self);
-
-	/* Get initial geometry of monitor */
-	_xfdashboard_window_tracker_monitor_update_geometry(self);
-
-	/* Connect signals */
-	g_signal_connect_swapped(priv->screen, "monitors-changed", G_CALLBACK(_xfdashboard_window_tracker_monitor_on_monitors_changed), self);
-}
 
 /* IMPLEMENTATION: Public API */
 
@@ -358,82 +147,95 @@ static void xfdashboard_window_tracker_monitor_init(XfdashboardWindowTrackerMoni
 gboolean xfdashboard_window_tracker_monitor_is_equal(XfdashboardWindowTrackerMonitor *inLeft,
 														XfdashboardWindowTrackerMonitor *inRight)
 {
-	gint			leftIndex, rightIndex;
+	XfdashboardWindowTrackerMonitorInterface		*iface;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inLeft), FALSE);
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inRight), FALSE);
 
-	/* Check if both are the same workspace or refer to same one */
-	leftIndex=xfdashboard_window_tracker_monitor_get_number(inLeft);
-	rightIndex=xfdashboard_window_tracker_monitor_get_number(inRight);
-	if(inLeft==inRight || leftIndex==rightIndex) return(TRUE);
+	iface=XFDASHBOARD_WINDOW_TRACKER_MONITOR_GET_IFACE(inLeft);
 
-	/* If we get here then they cannot be considered equal */
+	/* Call virtual function */
+	if(iface->is_equal)
+	{
+		return(iface->is_equal(inLeft, inRight));
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_MONITOR_WARN_NOT_IMPLEMENTED(inLeft, "is_equal");
 	return(FALSE);
 }
 
 /* Get monitor index */
 gint xfdashboard_window_tracker_monitor_get_number(XfdashboardWindowTrackerMonitor *self)
 {
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self), 0);
-
-	return(self->priv->monitorIndex);
-}
+	XfdashboardWindowTrackerMonitorInterface		*iface;
 
-/* Determine if monitor is primary one */
-gboolean xfdashboard_window_tracker_monitor_is_primary(XfdashboardWindowTrackerMonitor *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self), FALSE);
-
-	return(self->priv->isPrimary);
-}
-
-/* Get geometry of monitor */
-gint xfdashboard_window_tracker_monitor_get_x(XfdashboardWindowTrackerMonitor *self)
-{
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self), 0);
 
-	return(self->priv->geometry.x);
-}
+	iface=XFDASHBOARD_WINDOW_TRACKER_MONITOR_GET_IFACE(self);
 
-gint xfdashboard_window_tracker_monitor_get_y(XfdashboardWindowTrackerMonitor *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self), 0);
+	/* Call virtual function */
+	if(iface->get_number)
+	{
+		return(iface->get_number(self));
+	}
 
-	return(self->priv->geometry.y);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_MONITOR_WARN_NOT_IMPLEMENTED(self, "get_number");
+	return(0);
 }
 
-gint xfdashboard_window_tracker_monitor_get_width(XfdashboardWindowTrackerMonitor *self)
+/* Determine if monitor is primary one */
+gboolean xfdashboard_window_tracker_monitor_is_primary(XfdashboardWindowTrackerMonitor *self)
 {
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self), 0);
+	XfdashboardWindowTrackerMonitorInterface		*iface;
 
-	return(self->priv->geometry.width);
-}
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self), FALSE);
 
-gint xfdashboard_window_tracker_monitor_get_height(XfdashboardWindowTrackerMonitor *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self), 0);
+	iface=XFDASHBOARD_WINDOW_TRACKER_MONITOR_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->is_primary)
+	{
+		return(iface->is_primary(self));
+	}
 
-	return(self->priv->geometry.height);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_MONITOR_WARN_NOT_IMPLEMENTED(self, "get_number");
+	return(FALSE);
 }
 
+/* Get geometry of monitor */
 void xfdashboard_window_tracker_monitor_get_geometry(XfdashboardWindowTrackerMonitor *self,
 														gint *outX,
 														gint *outY,
 														gint *outWidth,
 														gint *outHeight)
 {
-	XfdashboardWindowTrackerMonitorPrivate		*priv;
+	XfdashboardWindowTrackerMonitorInterface		*iface;
+	gint											x, y, w, h;
 
 	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self));
 
-	priv=self->priv;
+	iface=XFDASHBOARD_WINDOW_TRACKER_MONITOR_GET_IFACE(self);
+
+	/* Get monitor geometry */
+	if(iface->get_geometry)
+	{
+		/* Get geometry */
+		iface->get_geometry(self, &x, &y, &w, &h);
+
+		/* Set result */
+		if(outX) *outX=x;
+		if(outX) *outY=y;
+		if(outWidth) *outWidth=w;
+		if(outHeight) *outHeight=h;
+
+		return;
+	}
 
-	/* Set position and size of monitor */
-	if(outX) *outX=priv->geometry.x;
-	if(outY) *outY=priv->geometry.y;
-	if(outWidth) *outWidth=priv->geometry.width;
-	if(outHeight) *outHeight=priv->geometry.height;
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_MONITOR_WARN_NOT_IMPLEMENTED(self, "get_geometry");
 }
 
 /* Check if requested position is inside monitor's geometry */
@@ -441,17 +243,18 @@ gboolean xfdashboard_window_tracker_monitor_contains(XfdashboardWindowTrackerMon
 														gint inX,
 														gint inY)
 {
-	XfdashboardWindowTrackerMonitorPrivate		*priv;
+	gint										x, y, width, height;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(self), FALSE);
 
-	priv=self->priv;
+	/* Get monitor's geometry */
+	xfdashboard_window_tracker_monitor_get_geometry(self, &x, &y, &width, &height);
 
 	/* Check if requested position is inside monitor's geometry */
-	if(inX>=priv->geometry.x &&
-		inX<(priv->geometry.x+priv->geometry.width) &&
-		inY>=priv->geometry.y &&
-		inY<(priv->geometry.y+priv->geometry.height))
+	if(inX>=x &&
+		inX<(x+width) &&
+		inY>=y &&
+		inY<(y+height))
 	{
 		return(TRUE);
 	}
diff --git a/libxfdashboard/window-tracker-monitor.h b/libxfdashboard/window-tracker-monitor.h
index ca3a356..7a3ccb1 100644
--- a/libxfdashboard/window-tracker-monitor.h
+++ b/libxfdashboard/window-tracker-monitor.h
@@ -4,7 +4,7 @@
  *                         size of monitor within screen and also a flag
  *                         if this monitor is the primary one.
  * 
- * Copyright 2012-2017 Stephan Haller <nomad at froevel.de>
+ * Copyright 2012-2016 Stephan Haller <nomad at froevel.de>
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -38,32 +38,27 @@ G_BEGIN_DECLS
 #define XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR					(xfdashboard_window_tracker_monitor_get_type())
 #define XFDASHBOARD_WINDOW_TRACKER_MONITOR(obj)					(G_TYPE_CHECK_INSTANCE_CAST((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR, XfdashboardWindowTrackerMonitor))
 #define XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(obj)				(G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR))
-#define XFDASHBOARD_WINDOW_TRACKER_MONITOR_CLASS(klass)			(G_TYPE_CHECK_CLASS_CAST((klass), XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR, XfdashboardWindowTrackerMonitorClass))
-#define XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR_CLASS(klass)		(G_TYPE_CHECK_CLASS_TYPE((klass), XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR))
-#define XFDASHBOARD_WINDOW_TRACKER_MONITOR_GET_CLASS(obj)		(G_TYPE_INSTANCE_GET_CLASS((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR, XfdashboardWindowTrackerMonitorClass))
+#define XFDASHBOARD_WINDOW_TRACKER_MONITOR_GET_IFACE(obj)		(G_TYPE_INSTANCE_GET_INTERFACE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR, XfdashboardWindowTrackerMonitorInterface))
 
 typedef struct _XfdashboardWindowTrackerMonitor					XfdashboardWindowTrackerMonitor;
-typedef struct _XfdashboardWindowTrackerMonitorClass			XfdashboardWindowTrackerMonitorClass;
-typedef struct _XfdashboardWindowTrackerMonitorPrivate			XfdashboardWindowTrackerMonitorPrivate;
+typedef struct _XfdashboardWindowTrackerMonitorInterface		XfdashboardWindowTrackerMonitorInterface;
 
-struct _XfdashboardWindowTrackerMonitor
-{
-	/*< private >*/
-	/* Parent instance */
-	GObject										parent_instance;
-
-	/* Private structure */
-	XfdashboardWindowTrackerMonitorPrivate		*priv;
-};
-
-struct _XfdashboardWindowTrackerMonitorClass
+struct _XfdashboardWindowTrackerMonitorInterface
 {
 	/*< private >*/
 	/* Parent class */
-	GObjectClass								parent_class;
+	GTypeInterface						parent_interface;
 
 	/*< public >*/
 	/* Virtual functions */
+	gboolean (*is_equal)(XfdashboardWindowTrackerMonitor *inLeft, XfdashboardWindowTrackerMonitor *inRight);
+
+	gboolean (*is_primary)(XfdashboardWindowTrackerMonitor *self);
+	gint (*get_number)(XfdashboardWindowTrackerMonitor *self);
+
+	void (*get_geometry)(XfdashboardWindowTrackerMonitor *self, gint *outX, gint *outY, gint *outWidth, gint *outHeight);
+
+	/* Signals */
 	void (*primary_changed)(XfdashboardWindowTrackerMonitor *self);
 	void (*geometry_changed)(XfdashboardWindowTrackerMonitor *self);
 };
@@ -78,16 +73,11 @@ gint xfdashboard_window_tracker_monitor_get_number(XfdashboardWindowTrackerMonit
 
 gboolean xfdashboard_window_tracker_monitor_is_primary(XfdashboardWindowTrackerMonitor *self);
 
-gint xfdashboard_window_tracker_monitor_get_x(XfdashboardWindowTrackerMonitor *self);
-gint xfdashboard_window_tracker_monitor_get_y(XfdashboardWindowTrackerMonitor *self);
-gint xfdashboard_window_tracker_monitor_get_width(XfdashboardWindowTrackerMonitor *self);
-gint xfdashboard_window_tracker_monitor_get_height(XfdashboardWindowTrackerMonitor *self);
 void xfdashboard_window_tracker_monitor_get_geometry(XfdashboardWindowTrackerMonitor *self,
 														gint *outX,
 														gint *outY,
 														gint *outWidth,
 														gint *outHeight);
-
 gboolean xfdashboard_window_tracker_monitor_contains(XfdashboardWindowTrackerMonitor *self,
 														gint inX,
 														gint inY);
diff --git a/libxfdashboard/window-tracker-window.c b/libxfdashboard/window-tracker-window.c
index ef0975f..68c6751 100644
--- a/libxfdashboard/window-tracker-window.c
+++ b/libxfdashboard/window-tracker-window.c
@@ -1,12 +1,7 @@
 /*
- * window-tracker-window: A window tracked by window tracker and also
- *                        a wrapper class around WnckWindow.
- *                        By wrapping libwnck objects we can use a virtual
- *                        stable API while the API in libwnck changes
- *                        within versions. We only need to use #ifdefs in
- *                        window tracker object and nowhere else in the code.
+ * window-tracker-window: A window tracked by window tracker.
  * 
- * Copyright 2012-2017 Stephan Haller <nomad at froevel.de>
+ * Copyright 2012-2016 Stephan Haller <nomad at froevel.de>
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -32,949 +27,841 @@
 
 #include <libxfdashboard/window-tracker-window.h>
 
-#define WNCK_I_KNOW_THIS_IS_UNSTABLE
-#include <libwnck/libwnck.h>
-
 #include <glib/gi18n-lib.h>
-#include <clutter/x11/clutter-x11.h>
-#include <gtk/gtkx.h>
-#include <gdk/gdkx.h>
-#ifdef HAVE_XINERAMA
-#include <X11/extensions/Xinerama.h>
-#endif
 
 #include <libxfdashboard/window-tracker.h>
+#include <libxfdashboard/enums.h>
 #include <libxfdashboard/marshal.h>
 #include <libxfdashboard/compat.h>
-#include <libxfdashboard/debug.h>
 
 
-/* Usually we would define a class in GObject system here but
- * this class is a wrapper around WnckWindow to create a virtual stable
- * libwnck API regardless of its version.
- */
+/* Define this class in GObject system */
+G_DEFINE_INTERFACE(XfdashboardWindowTrackerWindow,
+					xfdashboard_window_tracker_window,
+					G_TYPE_OBJECT)
+
+
+/* Signals */
+enum
+{
+	SIGNAL_NAME_CHANGED,
+	SIGNAL_STATE_CHANGED,
+	SIGNAL_ACTIONS_CHANGED,
+	SIGNAL_ICON_CHANGED,
+	SIGNAL_WORKSPACE_CHANGED,
+	SIGNAL_MONITOR_CHANGED,
+	SIGNAL_GEOMETRY_CHANGED,
+
+	SIGNAL_LAST
+};
+
+static guint XfdashboardWindowTrackerWindowSignals[SIGNAL_LAST]={ 0, };
+
 
 /* IMPLEMENTATION: Private variables and methods */
+#define XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, vfunc)\
+	g_warning(_("Object of type %s does not implement required virtual function XfdashboardWindowTrackerWindow::%s"),\
+				G_OBJECT_TYPE_NAME(self), \
+				vfunc);
 
-/* Size of screen has changed so resize stage window */
-static void _xfdashboard_window_tracker_window_on_screen_size_changed(XfdashboardWindowTracker *inWindowTracker,
-																		gint inWidth,
-																		gint inHeight,
-																		gpointer inUserData)
-{
-#ifdef HAVE_XINERAMA
-	WnckWindow				*stageWindow;
-	GdkDisplay				*display;
-	GdkScreen				*screen;
-	XineramaScreenInfo		*monitors;
-	int						monitorsCount;
-	gint					top, bottom, left, right;
-	gint					topIndex, bottomIndex, leftIndex, rightIndex;
-	gint					i;
-	Atom					atomFullscreenMonitors;
-	XEvent					xEvent;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(inWindowTracker));
-	g_return_if_fail(WNCK_IS_WINDOW(inUserData));
-
-	stageWindow=WNCK_WINDOW(inUserData);
-
-	XFDASHBOARD_DEBUG(inWindowTracker, WINDOWS, "Set fullscreen across all monitors using Xinerama");
-
-	/* If window manager does not support fullscreen across all monitors
-	 * return here.
-	 */
-	if(!wnck_screen_net_wm_supports(wnck_window_get_screen(stageWindow), "_NET_WM_FULLSCREEN_MONITORS"))
-	{
-		g_warning(_("Keep window fullscreen on primary monitor because window manager does not support _NET_WM_FULLSCREEN_MONITORS."));
-		return;
-	}
 
-	/* Get display */
-	display=gdk_display_get_default();
+/* Default implementation of virtual function "is_equal" */
+static gboolean _xfdashboard_window_tracker_window_real_is_equal(XfdashboardWindowTrackerWindow *inLeft,
+																	XfdashboardWindowTrackerWindow *inRight)
+{
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inLeft), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inRight), FALSE);
 
-	/* Get screen */
-	screen=gdk_screen_get_default();
+	/* Check if both are the same window */
+	if(inLeft==inRight) return(TRUE);
 
-	/* Check if Xinerama is active on display. If not try to move and resize
-	 * stage window to primary monitor.
-	 */
-	if(!XineramaIsActive(GDK_DISPLAY_XDISPLAY(display)))
-	{
-		gint				primaryMonitor;
-		GdkRectangle		geometry;
-
-		/* Get position and size of primary monitor and try to move and resize
-		 * stage window to its position and size. Even if it fails it should
-		 * resize the stage to the size of current monitor this window is
-		 * fullscreened to. Tested with xfwm4.
-		 */
-		primaryMonitor=gdk_screen_get_primary_monitor(screen);
-		gdk_screen_get_monitor_geometry(screen, primaryMonitor, &geometry);
-		wnck_window_set_geometry(stageWindow,
-									WNCK_WINDOW_GRAVITY_STATIC,
-									WNCK_WINDOW_CHANGE_X | WNCK_WINDOW_CHANGE_Y | WNCK_WINDOW_CHANGE_WIDTH | WNCK_WINDOW_CHANGE_HEIGHT,
-									geometry.x, geometry.y, geometry.width, geometry.height);
-		return;
-	}
+	/* If we get here then they cannot be considered equal */
+	return(FALSE);
+}
 
-	/* Get monitors from Xinerama */
-	monitors=XineramaQueryScreens(GDK_DISPLAY_XDISPLAY(display), &monitorsCount);
-	if(monitorsCount<=0 || !monitors)
-	{
-		if(monitors) XFree(monitors);
-		return;
-	}
+/* Default implementation of virtual function "get_monitor" */
+static XfdashboardWindowTrackerMonitor* _xfdashboard_window_tracker_window_real_get_monitor(XfdashboardWindowTrackerWindow *self)
+{
+	XfdashboardWindowTracker			*windowTracker;
+	GList								*monitors;
+	XfdashboardWindowTrackerMonitor		*monitor;
+	XfdashboardWindowTrackerMonitor		*foundMonitor;
 
-	/* Get monitor indices for each corner of screen */
-	top=gdk_screen_get_height(screen);
-	left=gdk_screen_get_width(screen);
-	bottom=0;
-	right=0;
-	topIndex=bottomIndex=leftIndex=rightIndex=0;
-	for(i=0; i<monitorsCount; i++)
-	{
-		XFDASHBOARD_DEBUG(inWindowTracker, WINDOWS,
-							"Checking edges at monitor %d with upper-left at %d,%d and lower-right at %d,%d [size: %dx%d]",
-							i,
-							monitors[i].x_org,
-							monitors[i].y_org,
-							monitors[i].x_org+monitors[i].width, monitors[i].y_org+monitors[i].height,
-							monitors[i].width, monitors[i].height);
-
-		if(left>monitors[i].x_org)
-		{
-			left=monitors[i].x_org;
-			leftIndex=i;
-		}
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-		if(right<(monitors[i].x_org+monitors[i].width))
-		{
-			right=(monitors[i].x_org+monitors[i].width);
-			rightIndex=i;
-		}
+	/* Get window tracker to retrieve list of monitors */
+	windowTracker=xfdashboard_window_tracker_get_default();
 
-		if(top>monitors[i].y_org)
-		{
-			top=monitors[i].y_org;
-			topIndex=i;
-		}
+	/* Get list of monitors */
+	monitors=xfdashboard_window_tracker_get_monitors(windowTracker);
 
-		if(bottom<(monitors[i].y_org+monitors[i].height))
+	/* Iterate through list of monitors and return monitor where window fits in */
+	foundMonitor=NULL;
+	for(; monitors && !foundMonitor; monitors=g_list_next(monitors))
+	{
+		monitor=XFDASHBOARD_WINDOW_TRACKER_MONITOR(monitors->data);
+		if(xfdashboard_window_tracker_window_is_on_monitor(self, monitor))
 		{
-			bottom=(monitors[i].y_org+monitors[i].height);
-			bottomIndex=i;
+			foundMonitor=monitor;
 		}
 	}
-	XFDASHBOARD_DEBUG(inWindowTracker, WINDOWS,
-						"Found edge monitors: left=%d (monitor %d), right=%d (monitor %d), top=%d (monitor %d), bottom=%d (monitor %d)",
-						left, leftIndex,
-						right, rightIndex,
-						top, topIndex,
-						bottom, bottomIndex);
-
-	/* Get X atom for fullscreen-across-all-monitors */
-	atomFullscreenMonitors=XInternAtom(GDK_DISPLAY_XDISPLAY(display),
-										"_NET_WM_FULLSCREEN_MONITORS",
-										False);
-
-	/* Send event to X to set window to fullscreen over all monitors */
-	memset(&xEvent, 0, sizeof(xEvent));
-	xEvent.type=ClientMessage;
-	xEvent.xclient.window=wnck_window_get_xid(stageWindow);
-	xEvent.xclient.display=GDK_DISPLAY_XDISPLAY(display);
-	xEvent.xclient.message_type=atomFullscreenMonitors;
-	xEvent.xclient.format=32;
-	xEvent.xclient.data.l[0]=topIndex;
-	xEvent.xclient.data.l[1]=bottomIndex;
-	xEvent.xclient.data.l[2]=leftIndex;
-	xEvent.xclient.data.l[3]=rightIndex;
-	xEvent.xclient.data.l[4]=0;
-	XSendEvent(GDK_DISPLAY_XDISPLAY(display),
-				DefaultRootWindow(GDK_DISPLAY_XDISPLAY(display)),
-				False,
-				SubstructureRedirectMask | SubstructureNotifyMask,
-				&xEvent);
 
 	/* Release allocated resources */
-	if(monitors) XFree(monitors);
-#else
-	WnckWindow				*stageWindow;
-	GdkScreen				*screen;
-	gint					primaryMonitor;
-	GdkRectangle			geometry;
+	g_object_unref(windowTracker);
 
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(inWindowTracker));
-	g_return_if_fail(WNCK_IS_WINDOW(inUserData));
+	/* Return found monitor */
+	return(foundMonitor);
+}
 
-	stageWindow=WNCK_WINDOW(inUserData);
+/* Default implementation of virtual function "is_on_monitor" */
+static gboolean _xfdashboard_window_tracker_window_real_is_on_monitor(XfdashboardWindowTrackerWindow *self,
+																		XfdashboardWindowTrackerMonitor *inMonitor)
+{
+	XfdashboardWindowTracker	*windowTracker;
+	gint						windowX, windowY, windowWidth, windowHeight;
+	gint						monitorX, monitorY, monitorWidth, monitorHeight;
+	gint						screenWidth, screenHeight;
+	gint						windowMiddleX, windowMiddleY;
 
-	XFDASHBOARD_DEBUG(inWindowTracker, WINDOWS, "No support for multiple monitor: Setting fullscreen on primary monitor");
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inMonitor), FALSE);
 
-	/* Get screen */
-	screen=gdk_screen_get_default();
+	/* Get window geometry */
+	xfdashboard_window_tracker_window_get_geometry(self,
+													&windowX,
+													&windowY,
+													&windowWidth,
+													&windowHeight);
 
-	/* Get position and size of primary monitor and try to move and resize
-	 * stage window to its position and size. Even if it fails it should
-	 * resize the stage to the size of current monitor this window is
-	 * fullscreened to. Tested with xfwm4.
-	 */
-	primaryMonitor=gdk_screen_get_primary_monitor(screen);
-	gdk_screen_get_monitor_geometry(screen, primaryMonitor, &geometry);
-	wnck_window_set_geometry(stageWindow,
-								WNCK_WINDOW_GRAVITY_STATIC,
-								WNCK_WINDOW_CHANGE_X | WNCK_WINDOW_CHANGE_Y | WNCK_WINDOW_CHANGE_WIDTH | WNCK_WINDOW_CHANGE_HEIGHT,
-								geometry.x, geometry.y, geometry.width, geometry.height);
-
-	XFDASHBOARD_DEBUG(inWindowTracker, WINDOWS,
-						"Moving stage window to %d,%d and resize to %dx%d",
-						geometry.x, geometry.y,
-						geometry.width, geometry.height);
-#endif
-}
+	/* Get monitor geometry */
+	xfdashboard_window_tracker_monitor_get_geometry(inMonitor,
+													&monitorX,
+													&monitorY,
+													&monitorWidth,
+													&monitorHeight);
 
-/* State of stage window changed */
-static void _xfdashboard_window_tracker_window_on_stage_state_changed(WnckWindow *inWindow,
-																		WnckWindowState inChangedMask,
-																		WnckWindowState inNewValue,
-																		gpointer inUserData)
-{
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
+	/* Get screen size */
+	windowTracker=xfdashboard_window_tracker_get_default();
+	xfdashboard_window_tracker_get_screen_size(windowTracker, &screenWidth, &screenHeight);
+	g_object_unref(windowTracker);
 
-	/* Set 'skip-tasklist' if changed */
-	if((inChangedMask & WNCK_WINDOW_STATE_SKIP_TASKLIST) &&
-		!(inNewValue & WNCK_WINDOW_STATE_SKIP_TASKLIST))
-	{
-		wnck_window_set_skip_tasklist(WNCK_WINDOW(inWindow), TRUE);
-		XFDASHBOARD_DEBUG(inWindow, WINDOWS,
-							"State 'skip-tasklist' for stage window %p needs reset",
-							inWindow);
-	}
+	/* Check if mid-point of window (adjusted to screen size) is within monitor */
+	windowMiddleX=windowX+(windowWidth/2);
+	if(windowMiddleX>screenWidth) windowMiddleX=screenWidth-1;
 
-	/* Set 'skip-pager' if changed */
-	if((inChangedMask & WNCK_WINDOW_STATE_SKIP_PAGER) &&
-		!(inNewValue & WNCK_WINDOW_STATE_SKIP_PAGER))
-	{
-		wnck_window_set_skip_pager(WNCK_WINDOW(inWindow), TRUE);
-		XFDASHBOARD_DEBUG(inWindow, WINDOWS,
-							"State 'skip-pager' for stage window %p needs reset",
-							inWindow);
-	}
+	windowMiddleY=windowY+(windowHeight/2);
+	if(windowMiddleY>screenHeight) windowMiddleY=screenHeight-1;
 
-	/* Set 'make-above' if changed */
-	if((inChangedMask & WNCK_WINDOW_STATE_ABOVE) &&
-		!(inNewValue & WNCK_WINDOW_STATE_ABOVE))
+	if(windowMiddleX>=monitorX && windowMiddleX<(monitorX+monitorWidth) &&
+		windowMiddleY>=monitorY && windowMiddleY<(monitorY+monitorHeight))
 	{
-		wnck_window_make_above(WNCK_WINDOW(inWindow));
-		XFDASHBOARD_DEBUG(inWindow, WINDOWS,
-							"State 'make-above' for stage window %p needs reset",
-							inWindow);
+		return(TRUE);
 	}
-}
 
-/* The active window changed. Reselect stage window as active one if it is visible */
-static void _xfdashboard_window_tracker_window_on_stage_active_window_changed(WnckScreen *self,
-																				WnckWindow *inPreviousWindow,
-																				gpointer inUserData)
-{
-	WnckWindow		*stageWindow;
-	WnckWindow		*activeWindow;
-	gboolean		reselect;
+	/* If we get here mid-point of window is out of range of requested monitor */
+	return(FALSE);
+}
 
-	g_return_if_fail(WNCK_IS_SCREEN(self));
-	g_return_if_fail(inPreviousWindow==NULL || WNCK_IS_WINDOW(inPreviousWindow));
-	g_return_if_fail(WNCK_IS_WINDOW(inUserData));
 
-	stageWindow=WNCK_WINDOW(inUserData);
-	reselect=FALSE;
+/* IMPLEMENTATION: GObject */
 
-	/* Reactive stage window if not hidden */
-	activeWindow=wnck_screen_get_active_window(self);
+/* Interface initialization
+ * Set up default functions
+ */
+static void xfdashboard_window_tracker_window_default_init(XfdashboardWindowTrackerWindowInterface *iface)
+{
+	static gboolean		initialized=FALSE;
+	GParamSpec			*property;
 
-	if(inPreviousWindow && inPreviousWindow==stageWindow) reselect=TRUE;
-	if(!activeWindow || activeWindow!=stageWindow) reselect=TRUE;
-	if(!(wnck_window_get_state(stageWindow) & (WNCK_WINDOW_STATE_MINIMIZED | WNCK_WINDOW_STATE_HIDDEN))) reselect=TRUE;
+	/* The following virtual functions should be overriden if default
+	 * implementation does not fit.
+	 */
+	iface->is_equal=_xfdashboard_window_tracker_window_real_is_equal;
+	iface->get_monitor=_xfdashboard_window_tracker_window_real_get_monitor;
+	iface->is_on_monitor=_xfdashboard_window_tracker_window_real_is_on_monitor;
 
-	if(reselect)
+	/* Define properties, signals and actions */
+	if(!initialized)
 	{
-		wnck_window_activate_transient(stageWindow, xfdashboard_window_tracker_get_time());
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Active window changed from %p (%s) to %p (%s) but stage window %p is visible and should be active one",
-							inPreviousWindow, inPreviousWindow ? wnck_window_get_name(inPreviousWindow) : "<nil>",
-							activeWindow, activeWindow ? wnck_window_get_name(activeWindow) : "<nil>",
-							stageWindow);
+		/* Define properties */
+		property=g_param_spec_flags("state",
+									_("State"),
+									_("The state of window"),
+									XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW_STATE,
+									0,
+									G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+		g_object_interface_install_property(iface, property);
+
+		property=g_param_spec_flags("actions",
+									_("Actions"),
+									_("The possible actions at window"),
+									XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW_ACTION,
+									0,
+									G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+		g_object_interface_install_property(iface, property);
+
+		/* Define signals */
+		XfdashboardWindowTrackerWindowSignals[SIGNAL_NAME_CHANGED]=
+			g_signal_new("name-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerWindowInterface, name_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__VOID,
+							G_TYPE_NONE,
+							0);
+
+		XfdashboardWindowTrackerWindowSignals[SIGNAL_STATE_CHANGED]=
+			g_signal_new("state-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerWindowInterface, state_changed),
+							NULL,
+							NULL,
+							_xfdashboard_marshal_VOID__FLAGS_FLAGS,
+							G_TYPE_NONE,
+							2,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW_STATE,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW_STATE);
+
+		XfdashboardWindowTrackerWindowSignals[SIGNAL_ACTIONS_CHANGED]=
+			g_signal_new("actions-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerWindowInterface, actions_changed),
+							NULL,
+							NULL,
+							_xfdashboard_marshal_VOID__FLAGS_FLAGS,
+							G_TYPE_NONE,
+							2,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW_ACTION,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW_ACTION);
+
+		XfdashboardWindowTrackerWindowSignals[SIGNAL_ICON_CHANGED]=
+			g_signal_new("icon-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerWindowInterface, icon_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__VOID,
+							G_TYPE_NONE,
+							0);
+
+		XfdashboardWindowTrackerWindowSignals[SIGNAL_WORKSPACE_CHANGED]=
+			g_signal_new("workspace-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerWindowInterface, workspace_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE);
+
+		XfdashboardWindowTrackerWindowSignals[SIGNAL_MONITOR_CHANGED]=
+			g_signal_new("monitor-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerWindowInterface, monitor_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
+
+		XfdashboardWindowTrackerWindowSignals[SIGNAL_GEOMETRY_CHANGED]=
+			g_signal_new("geometry-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerWindowInterface, geometry_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__VOID,
+							G_TYPE_NONE,
+							0);
+
+		/* Set flag that base initialization was done for this interface */
+		initialized=TRUE;
 	}
 }
 
-/* IMPLEMENTATION: Public API */
 
-/* Return type of WnckWindow as our type */
-GType xfdashboard_window_tracker_window_get_type(void)
-{
-	return(WNCK_TYPE_WINDOW);
-}
+/* IMPLEMENTATION: Public API */
 
 /* Check if both windows are the same */
 gboolean xfdashboard_window_tracker_window_is_equal(XfdashboardWindowTrackerWindow *inLeft,
 													XfdashboardWindowTrackerWindow *inRight)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inLeft), FALSE);
-	g_return_val_if_fail(WNCK_IS_WINDOW(inRight), FALSE);
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	/* Check if both are the same window*/
-	if(inLeft==inRight) return(TRUE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inLeft), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(inRight), FALSE);
 
-	/* If we get here then they cannot be considered equal */
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(inLeft);
+
+	/* Call virtual function */
+	if(iface->is_equal)
+	{
+		return(iface->is_equal(inLeft, inRight));
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(inLeft, "is_equal");
 	return(FALSE);
 }
 
-
-/* Determine if window is minimized */
-gboolean xfdashboard_window_tracker_window_is_minimized(XfdashboardWindowTrackerWindow *inWindow)
+/* Determine if window is visible at all */
+gboolean xfdashboard_window_tracker_window_is_visible(XfdashboardWindowTrackerWindow *self)
 {
-	WnckWindowState		state;
-	gboolean			isMinimized;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), FALSE);
 
-	isMinimized=FALSE;
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	/* Check if state of window has minimized flag set */
-	state=wnck_window_get_state(WNCK_WINDOW(inWindow));
-	if(state & WNCK_WINDOW_STATE_MINIMIZED) isMinimized=TRUE;
+	/* Call virtual function */
+	if(iface->is_visible)
+	{
+		return(iface->is_visible(self));
+	}
 
-	/* Return minimized state of window */
-	return(isMinimized);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "is_visible");
+	return(FALSE);
 }
 
-/* Determine if window is maximized */
-gboolean xfdashboard_window_tracker_window_is_maximized(XfdashboardWindowTrackerWindow *inWindow)
+/* Determine if window is visible and placed on requested workspace */
+gboolean xfdashboard_window_tracker_window_is_visible_on_workspace(XfdashboardWindowTrackerWindow *self,
+																	XfdashboardWindowTrackerWorkspace *inWorkspace)
 {
-	WnckWindowState		state;
-	gboolean			isMaximized;
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(inWorkspace), FALSE);
 
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	/* Check if window is visible generally and if it is on requested workspace */
+	return(xfdashboard_window_tracker_window_is_visible(self) &&
+			xfdashboard_window_tracker_window_is_on_workspace(self, inWorkspace));
+}
 
-	isMaximized=FALSE;
+/* Determine if window is visible and placed on requested monitor */
+gboolean xfdashboard_window_tracker_window_is_visible_on_monitor(XfdashboardWindowTrackerWindow *self,
+																	XfdashboardWindowTrackerMonitor *inMonitor)
+{
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inMonitor), FALSE);
 
-	/* Check if state of window has all maximized flags set but it must not
-	 * have the minimized flag set.
-	 */
-	state=wnck_window_get_state(WNCK_WINDOW(inWindow));
-	if(!(state & WNCK_WINDOW_STATE_MINIMIZED))
+	/* Check if window is visible generally and if it is on requested monitor */
+	return(xfdashboard_window_tracker_window_is_visible(self) &&
+			xfdashboard_window_tracker_window_is_on_monitor(self, inMonitor));
+}
+
+/* Show window */
+void xfdashboard_window_tracker_window_show(XfdashboardWindowTrackerWindow *self)
+{
+	XfdashboardWindowTrackerWindowInterface		*iface;
+
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self));
+
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->show)
 	{
-		if((state & WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY) &&
-			(state & WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY))
-		{
-			isMaximized=TRUE;
-		}
+		iface->show(self);
+		return;
 	}
 
-	/* Return maximized state of window */
-	return(isMaximized);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "show");
 }
 
-/* Determine if window is fullscreen */
-gboolean xfdashboard_window_tracker_window_is_fullscreen(XfdashboardWindowTrackerWindow *inWindow)
+/* Hide window */
+void xfdashboard_window_tracker_window_hide(XfdashboardWindowTrackerWindow *self)
 {
-	WnckWindowState		state;
-	gboolean			isFullscreen;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self));
 
-	isFullscreen=FALSE;
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	/* Check if state of window has fullscreen flag set */
-	state=wnck_window_get_state(WNCK_WINDOW(inWindow));
-	if(state & WNCK_WINDOW_STATE_FULLSCREEN) isFullscreen=TRUE;
+	/* Call virtual function */
+	if(iface->hide)
+	{
+		iface->hide(self);
+		return;
+	}
 
-	/* Return fullscreen state of window */
-	return(isFullscreen);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "hide");
 }
 
-/* Determine if window is visible */
-gboolean xfdashboard_window_tracker_window_is_visible(XfdashboardWindowTrackerWindow *inWindow)
+/* Get parent window of this window */
+XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_window_get_parent(XfdashboardWindowTrackerWindow *self)
 {
-	WnckWindowState		state;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-	state=wnck_window_get_state(WNCK_WINDOW(inWindow));
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	/* Windows are invisible if hidden but not minimized */
-	if((state & WNCK_WINDOW_STATE_HIDDEN) &&
-		!(state & WNCK_WINDOW_STATE_MINIMIZED))
+	/* Call virtual function */
+	if(iface->get_parent)
 	{
-		return(FALSE);
+		return(iface->get_parent(self));
 	}
 
-	/* If we get here the window is visible */
-	return(TRUE);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_parent");
+	return(NULL);
 }
 
-/* Set visibility of window (show/hide) */
-void xfdashboard_window_tracker_window_show(XfdashboardWindowTrackerWindow *inWindow)
+/* Get state of window */
+XfdashboardWindowTrackerWindowState xfdashboard_window_tracker_window_get_state(XfdashboardWindowTrackerWindow *self)
 {
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	wnck_window_unminimize(WNCK_WINDOW(inWindow), xfdashboard_window_tracker_get_time());
-}
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), 0);
 
-void xfdashboard_window_tracker_window_hide(XfdashboardWindowTrackerWindow *inWindow)
-{
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	wnck_window_minimize(WNCK_WINDOW(inWindow));
+	/* Call virtual function */
+	if(iface->get_state)
+	{
+		return(iface->get_state(self));
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_state");
+	return(0);
 }
 
-/* Get parent window if this window is a child window */
-XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_window_get_parent_window(XfdashboardWindowTrackerWindow *inWindow)
+/* Get possible actions for requested window */
+XfdashboardWindowTrackerWindowAction xfdashboard_window_tracker_window_get_actions(XfdashboardWindowTrackerWindow *self)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), NULL);
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	return(wnck_window_get_transient(WNCK_WINDOW(inWindow)));
-}
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), 0);
 
-/* Get workspace where window is on */
-XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_window_get_workspace(XfdashboardWindowTrackerWindow *inWindow)
-{
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), NULL);
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->get_actions)
+	{
+		return(iface->get_actions(self));
+	}
 
-	return(wnck_window_get_workspace(WNCK_WINDOW(inWindow)));
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_actions");
+	return(0);
 }
 
-/* Determine if window is on requested workspace */
-gboolean xfdashboard_window_tracker_window_is_on_workspace(XfdashboardWindowTrackerWindow *inWindow,
-															XfdashboardWindowTrackerWorkspace *inWorkspace)
+/* Get name (title) of window */
+const gchar* xfdashboard_window_tracker_window_get_name(XfdashboardWindowTrackerWindow *self)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
-	g_return_val_if_fail(WNCK_IS_WORKSPACE(inWorkspace), FALSE);
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	return(wnck_window_is_on_workspace(WNCK_WINDOW(inWindow), WNCK_WORKSPACE(inWorkspace)));
-}
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-/* Move a window to another workspace */
-void xfdashboard_window_tracker_window_move_to_workspace(XfdashboardWindowTrackerWindow *inWindow,
-															XfdashboardWindowTrackerWorkspace *inWorkspace)
-{
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
-	g_return_if_fail(WNCK_IS_WORKSPACE(inWorkspace));
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->get_name)
+	{
+		return(iface->get_name(self));
+	}
 
-	wnck_window_move_to_workspace(WNCK_WINDOW(inWindow), WNCK_WORKSPACE(inWorkspace));
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_name");
+	return(NULL);
 }
 
-/* Get monitor where window is on */
-XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_window_get_monitor(XfdashboardWindowTrackerWindow *inWindow)
+/* Get icon of window */
+GdkPixbuf* xfdashboard_window_tracker_window_get_icon(XfdashboardWindowTrackerWindow *self)
 {
-	XfdashboardWindowTracker			*windowTracker;
-	GList								*monitors;
-	XfdashboardWindowTrackerMonitor		*monitor;
-	XfdashboardWindowTrackerMonitor		*foundMonitor;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), NULL);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-	/* Get window tracker to retrieve list of monitors */
-	windowTracker=xfdashboard_window_tracker_get_default();
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	/* Get list of monitors */
-	monitors=xfdashboard_window_tracker_get_monitors(windowTracker);
-
-	/* Iterate through list of monitors and return monitor where window fits in */
-	foundMonitor=NULL;
-	for(; monitors && !foundMonitor; monitors=g_list_next(monitors))
+	/* Call virtual function */
+	if(iface->get_icon)
 	{
-		monitor=XFDASHBOARD_WINDOW_TRACKER_MONITOR(monitors->data);
-		if(xfdashboard_window_tracker_window_is_on_monitor(inWindow, monitor))
-		{
-			foundMonitor=monitor;
-		}
+		return(iface->get_icon(self));
 	}
 
-	/* Release allocated resources */
-	g_object_unref(windowTracker);
-
-	/* Return found monitor */
-	return(foundMonitor);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_icon");
+	return(NULL);
 }
 
-/* Determine if window is on requested monitor */
-gboolean xfdashboard_window_tracker_window_is_on_monitor(XfdashboardWindowTrackerWindow *inWindow,
-															XfdashboardWindowTrackerMonitor *inMonitor)
+const gchar* xfdashboard_window_tracker_window_get_icon_name(XfdashboardWindowTrackerWindow *self)
 {
-	XfdashboardWindowTracker	*windowTracker;
-	gint						windowX, windowY, windowWidth, windowHeight;
-	gint						monitorX, monitorY, monitorWidth, monitorHeight;
-	gint						screenWidth, screenHeight;
-	gint						windowMiddleX, windowMiddleY;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inMonitor), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-	/* Get window geometry */
-	xfdashboard_window_tracker_window_get_position_size(inWindow, &windowX, &windowY, &windowWidth, &windowHeight);
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	/* Get monitor geometry */
-	xfdashboard_window_tracker_monitor_get_geometry(inMonitor, &monitorX, &monitorY, &monitorWidth, &monitorHeight);
+	/* Call virtual function */
+	if(iface->get_icon_name)
+	{
+		return(iface->get_icon_name(self));
+	}
 
-	/* Get screen size */
-	windowTracker=xfdashboard_window_tracker_get_default();
-	screenWidth=xfdashboard_window_tracker_get_screen_width(windowTracker);
-	screenHeight=xfdashboard_window_tracker_get_screen_height(windowTracker);
-	g_object_unref(windowTracker);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_icon_name");
+	return(NULL);
+}
 
-	/* Check if mid-point of window (adjusted to screen size) is within monitor */
-	windowMiddleX=windowX+(windowWidth/2);
-	if(windowMiddleX>screenWidth) windowMiddleX=screenWidth-1;
+/* Get workspace where window is on */
+XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_window_get_workspace(XfdashboardWindowTrackerWindow *self)
+{
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	windowMiddleY=windowY+(windowHeight/2);
-	if(windowMiddleY>screenHeight) windowMiddleY=screenHeight-1;
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-	if(windowMiddleX>=monitorX && windowMiddleX<(monitorX+monitorWidth) &&
-		windowMiddleY>=monitorY && windowMiddleY<(monitorY+monitorHeight))
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->get_workspace)
 	{
-		return(TRUE);
+		return(iface->get_workspace(self));
 	}
 
-	/* If we get here mid-point of window is out of range of requested monitor */
-	return(FALSE);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_workspace");
+	return(NULL);
 }
 
-/* Get name (title) of window */
-const gchar* xfdashboard_window_tracker_window_get_title(XfdashboardWindowTrackerWindow *inWindow)
+/* Determine if window is on requested workspace */
+gboolean xfdashboard_window_tracker_window_is_on_workspace(XfdashboardWindowTrackerWindow *self,
+															XfdashboardWindowTrackerWorkspace *inWorkspace)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), NULL);
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	if(!wnck_window_has_name(WNCK_WINDOW(inWindow))) return(NULL);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), FALSE);
 
-	return(wnck_window_get_name(WNCK_WINDOW(inWindow)));
-}
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-/* Get icon of window */
-GdkPixbuf* xfdashboard_window_tracker_window_get_icon(XfdashboardWindowTrackerWindow *inWindow)
-{
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), NULL);
+	/* Call virtual function */
+	if(iface->is_on_workspace)
+	{
+		return(iface->is_on_workspace(self, inWorkspace));
+	}
 
-	return(wnck_window_get_icon(WNCK_WINDOW(inWindow)));
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "is_on_workspace");
+	return(FALSE);
 }
 
-const gchar* xfdashboard_window_tracker_window_get_icon_name(XfdashboardWindowTrackerWindow *inWindow)
+/* Move a window to another workspace */
+void xfdashboard_window_tracker_window_move_to_workspace(XfdashboardWindowTrackerWindow *self,
+															XfdashboardWindowTrackerWorkspace *inWorkspace)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), NULL);
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	if(!wnck_window_has_icon_name(WNCK_WINDOW(inWindow))) return(NULL);
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self));
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(inWorkspace));
 
-	return(wnck_window_get_icon_name(WNCK_WINDOW(inWindow)));
-}
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-/* Get state of window */
-gboolean xfdashboard_window_tracker_window_is_skip_pager(XfdashboardWindowTrackerWindow *inWindow)
-{
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	/* Call virtual function */
+	if(iface->move_to_workspace)
+	{
+		iface->move_to_workspace(self, inWorkspace);
+		return;
+	}
 
-	return(wnck_window_is_skip_pager(WNCK_WINDOW(inWindow)));
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "move_to_workspace");
 }
 
-gboolean xfdashboard_window_tracker_window_is_skip_tasklist(XfdashboardWindowTrackerWindow *inWindow)
+/* Get monitor where window is on */
+XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_window_get_monitor(XfdashboardWindowTrackerWindow *self)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	return(wnck_window_is_skip_tasklist(WNCK_WINDOW(inWindow)));
-}
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-gboolean xfdashboard_window_tracker_window_is_pinned(XfdashboardWindowTrackerWindow *inWindow)
-{
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	return(wnck_window_is_pinned(WNCK_WINDOW(inWindow)));
+	/* Call virtual function */
+	if(iface->get_monitor)
+	{
+		return(iface->get_monitor(self));
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_monitor");
+	return(NULL);
 }
 
-gboolean xfdashboard_window_tracker_window_is_urgent(XfdashboardWindowTrackerWindow *inWindow)
+/* Determine if window is on requested monitor */
+gboolean xfdashboard_window_tracker_window_is_on_monitor(XfdashboardWindowTrackerWindow *self,
+															XfdashboardWindowTrackerMonitor *inMonitor)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	XfdashboardWindowTrackerWindowInterface		*iface;
+
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), FALSE);
 
-	if(wnck_window_get_state(WNCK_WINDOW(inWindow)) & WNCK_WINDOW_STATE_URGENT) return(TRUE);
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
+	/* Call virtual function */
+	if(iface->is_on_monitor)
+	{
+		return(iface->is_on_monitor(self, inMonitor));
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "is_on_monitor");
 	return(FALSE);
 }
 
-/* Get possible actions of window */
-gboolean xfdashboard_window_tracker_window_has_close_action(XfdashboardWindowTrackerWindow *inWindow)
+/* Get geometry of window */
+void xfdashboard_window_tracker_window_get_geometry(XfdashboardWindowTrackerWindow *self,
+													gint *outX,
+													gint *outY,
+													gint *outWidth,
+													gint *outHeight)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	XfdashboardWindowTrackerWindowInterface		*iface;
+	gint										x, y, width, height;
 
-	return((wnck_window_get_actions(WNCK_WINDOW(inWindow)) & WNCK_WINDOW_ACTION_CLOSE) ? TRUE : FALSE);
-}
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self));
 
-/* Activate window with its transient windows */
-void xfdashboard_window_tracker_window_activate(XfdashboardWindowTrackerWindow *inWindow)
-{
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	wnck_window_activate_transient(WNCK_WINDOW(inWindow), xfdashboard_window_tracker_get_time());
-}
+	/* Get window geometry */
+	if(iface->get_geometry)
+	{
+		/* Get geometry */
+		iface->get_geometry(self, &x, &y, &width, &height);
 
-/* Close window */
-void xfdashboard_window_tracker_window_close(XfdashboardWindowTrackerWindow *inWindow)
-{
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
+		/* Set result */
+		if(outX) *outX=x;
+		if(outX) *outY=y;
+		if(outWidth) *outWidth=width;
+		if(outHeight) *outHeight=height;
 
-	wnck_window_close(WNCK_WINDOW(inWindow), xfdashboard_window_tracker_get_time());
-}
+		return;
+	}
 
-/* Get position and size of window */
-void xfdashboard_window_tracker_window_get_position(XfdashboardWindowTrackerWindow *inWindow, gint *outX, gint *outY)
-{
-	xfdashboard_window_tracker_window_get_position_size(inWindow, outX, outY, NULL, NULL);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_geometry");
 }
 
-void xfdashboard_window_tracker_window_get_size(XfdashboardWindowTrackerWindow *inWindow, gint *outWidth, gint *outHeight)
+/* Set geometry of window */
+void xfdashboard_window_tracker_window_set_geometry(XfdashboardWindowTrackerWindow *self,
+													gint inX,
+													gint inY,
+													gint inWidth,
+													gint inHeight)
 {
-	xfdashboard_window_tracker_window_get_position_size(inWindow, NULL, NULL, outWidth, outHeight);
-}
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-void xfdashboard_window_tracker_window_get_position_size(XfdashboardWindowTrackerWindow *inWindow,
-															gint *outX, gint *outY,
-															gint *outWidth, gint *outHeight)
-{
-	gint		x, y, w, h;
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self));
 
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	/* Get window geometry */
-	wnck_window_get_client_window_geometry(WNCK_WINDOW(inWindow), &x, &y, &w, &h);
+	/* Call virtual function */
+	if(iface->set_geometry)
+	{
+		iface->set_geometry(self, inX, inY, inWidth, inHeight);
+		return;
+	}
 
-	/* Set result */
-	if(outX) *outX=x;
-	if(outX) *outY=y;
-	if(outWidth) *outWidth=w;
-	if(outHeight) *outHeight=h;
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "set_geometry");
 }
 
-/* Move and resize window */
+/* Move window */
 void xfdashboard_window_tracker_window_move(XfdashboardWindowTrackerWindow *inWindow,
-												gint inX,
-												gint inY)
+											gint inX,
+											gint inY)
 {
-	xfdashboard_window_tracker_window_move_resize(inWindow, inX, inY, -1, -1);
+	xfdashboard_window_tracker_window_set_geometry(inWindow, inX, inY, -1, -1);
 }
 
+/* Resize window */
 void xfdashboard_window_tracker_window_resize(XfdashboardWindowTrackerWindow *inWindow,
 												gint inWidth,
 												gint inHeight)
 {
-	xfdashboard_window_tracker_window_move_resize(inWindow, -1, -1, inWidth, inHeight);
+	xfdashboard_window_tracker_window_set_geometry(inWindow, -1, -1, inWidth, inHeight);
 }
 
-void xfdashboard_window_tracker_window_move_resize(XfdashboardWindowTrackerWindow *inWindow,
-													gint inX,
-													gint inY,
-													gint inWidth,
-													gint inHeight)
+/* Activate window with its transient windows */
+void xfdashboard_window_tracker_window_activate(XfdashboardWindowTrackerWindow *self)
 {
-	WnckWindowMoveResizeMask	flags;
-	gint						contentWidth, contentHeight;
-	gint						borderWidth, borderHeight;
-
-	gint						contentX, contentY;
-	gint						borderX, borderY;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self));
 
-	/* Get window border size to respect it when moving window */
-	wnck_window_get_client_window_geometry(WNCK_WINDOW(inWindow), &contentX, &contentY, &contentWidth, &contentHeight);
-	wnck_window_get_geometry(WNCK_WINDOW(inWindow), &borderX, &borderY, &borderWidth, &borderHeight);
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	/* Get modification flags */
-	flags=0;
-	if(inX>=0)
+	/* Call virtual function */
+	if(iface->activate)
 	{
-		flags|=WNCK_WINDOW_CHANGE_X;
-		inX-=(contentX-borderX);
+		iface->activate(self);
+		return;
 	}
 
-	if(inY>=0)
-	{
-		flags|=WNCK_WINDOW_CHANGE_Y;
-		inY-=(contentY-borderY);
-	}
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "activate");
+}
 
-	if(inWidth>=0)
-	{
-		flags|=WNCK_WINDOW_CHANGE_WIDTH;
-		inWidth+=(borderWidth-contentWidth);
-	}
+/* Close window */
+void xfdashboard_window_tracker_window_close(XfdashboardWindowTrackerWindow *self)
+{
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	if(inHeight>=0)
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self));
+
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->close)
 	{
-		flags|=WNCK_WINDOW_CHANGE_HEIGHT;
-		inHeight+=(borderHeight-contentHeight);
+		iface->close(self);
+		return;
 	}
 
-	/* Set geometry */
-	wnck_window_set_geometry(WNCK_WINDOW(inWindow),
-								WNCK_WINDOW_GRAVITY_STATIC,
-								flags,
-								inX, inY, inWidth, inHeight);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "close");
 }
 
-/* Determine and find stage by requested window */
-gboolean xfdashboard_window_tracker_window_is_stage(XfdashboardWindowTrackerWindow *inWindow)
+/* Determine if window is a stage window */
+gboolean xfdashboard_window_tracker_window_is_stage(XfdashboardWindowTrackerWindow *self)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), FALSE);
 
-	return(xfdashboard_window_tracker_window_find_stage(inWindow)!=NULL);
+	return(xfdashboard_window_tracker_window_get_stage(self)!=NULL);
 }
 
-ClutterStage* xfdashboard_window_tracker_window_find_stage(XfdashboardWindowTrackerWindow *inWindow)
+/* Get stage for requested window */
+ClutterStage* xfdashboard_window_tracker_window_get_stage(XfdashboardWindowTrackerWindow *self)
 {
-	ClutterStage			*foundStage;
-	ClutterStage			*stage;
-	Window					stageXWindow;
-	GSList					*stages, *entry;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), NULL);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-	/* Iterate through stages and check if stage window matches requested one */
-	foundStage=NULL;
-	stages=clutter_stage_manager_list_stages(clutter_stage_manager_get_default());
-	for(entry=stages; !foundStage && entry; entry=g_slist_next(entry))
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->get_stage)
 	{
-		stage=CLUTTER_STAGE(entry->data);
-		if(stage)
-		{
-			stageXWindow=clutter_x11_get_stage_window(stage);
-			if(stageXWindow==wnck_window_get_xid(WNCK_WINDOW(inWindow))) foundStage=stage;
-		}
+		return(iface->get_stage(self));
 	}
-	g_slist_free(stages);
 
-	return(foundStage);
-}
-
-/* Get window of stage */
-XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_window_get_stage_window(ClutterStage *inStage)
-{
-	Window					stageXWindow;
-	WnckWindow				*window;
-
-	g_return_val_if_fail(CLUTTER_IS_STAGE(inStage), NULL);
-
-	/* Get stage X window and translate to needed window type */
-	stageXWindow=clutter_x11_get_stage_window(inStage);
-	window=wnck_window_get(stageXWindow);
-
-	return(window);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_stage");
+	return(NULL);
 }
 
 /* Set up window for use as stage window */
-void xfdashboard_window_tracker_window_make_stage_window(XfdashboardWindowTrackerWindow *inWindow)
+void xfdashboard_window_tracker_window_make_stage_window(XfdashboardWindowTrackerWindow *self)
 {
-	XfdashboardWindowTracker	*windowTracker;
-	WnckScreen					*screen;
-	guint						signalID;
-	gulong						handlerID;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self));
 
-	/* Window of stage should always be above all other windows,
-	 * pinned to all workspaces, not be listed in window pager
-	 * and set to fullscreen
-	 */
-	if(!wnck_window_is_skip_tasklist(WNCK_WINDOW(inWindow))) wnck_window_set_skip_tasklist(WNCK_WINDOW(inWindow), TRUE);
-	if(!wnck_window_is_skip_pager(WNCK_WINDOW(inWindow))) wnck_window_set_skip_pager(WNCK_WINDOW(inWindow), TRUE);
-	if(!wnck_window_is_above(WNCK_WINDOW(inWindow))) wnck_window_make_above(WNCK_WINDOW(inWindow));
-	if(!wnck_window_is_pinned(WNCK_WINDOW(inWindow))) wnck_window_pin(WNCK_WINDOW(inWindow));
-
-	/* Get screen of window */
-	screen=wnck_window_get_screen(WNCK_WINDOW(inWindow));
-
-	/* Connect signals if not already connected */
-	signalID=g_signal_lookup("state-changed", WNCK_TYPE_WINDOW);
-	handlerID=g_signal_handler_find(inWindow,
-									G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC,
-									signalID,
-									0,
-									NULL,
-									G_CALLBACK(_xfdashboard_window_tracker_window_on_stage_state_changed),
-									NULL);
-	if(!handlerID)
-	{
-		g_signal_connect(inWindow, "state-changed", G_CALLBACK(_xfdashboard_window_tracker_window_on_stage_state_changed), NULL);
-		XFDASHBOARD_DEBUG(inWindow, WINDOWS,
-							"Connecting signal to 'state-changed' at window %p",
-							inWindow);
-	}
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	signalID=g_signal_lookup("active-window-changed", WNCK_TYPE_SCREEN);
-	handlerID=g_signal_handler_find(screen,
-									G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC,
-									signalID,
-									0,
-									NULL,
-									G_CALLBACK(_xfdashboard_window_tracker_window_on_stage_active_window_changed),
-									NULL);
-	if(!handlerID)
+	/* Call virtual function */
+	if(iface->make_stage_window)
 	{
-		g_signal_connect(screen, "active-window-changed", G_CALLBACK(_xfdashboard_window_tracker_window_on_stage_active_window_changed), inWindow);
-		XFDASHBOARD_DEBUG(screen, WINDOWS,
-							"Connecting signal to 'active-window-changed' at screen %p of window %p",
-							screen,
-							inWindow);
+		iface->make_stage_window(self);
+		return;
 	}
 
-	windowTracker=xfdashboard_window_tracker_get_default();
-	signalID=g_signal_lookup("screen-size-changed", XFDASHBOARD_TYPE_WINDOW_TRACKER);
-	handlerID=g_signal_handler_find(windowTracker,
-									G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC,
-									signalID,
-									0,
-									NULL,
-									G_CALLBACK(_xfdashboard_window_tracker_window_on_screen_size_changed),
-									NULL);
-	if(!handlerID)
-	{
-		g_signal_connect(windowTracker, "screen-size-changed", G_CALLBACK(_xfdashboard_window_tracker_window_on_screen_size_changed), inWindow);
-		XFDASHBOARD_DEBUG(windowTracker, WINDOWS,
-							"Connecting signal to 'screen-size-changed' at window %p",
-							inWindow);
-	}
-	_xfdashboard_window_tracker_window_on_screen_size_changed(windowTracker,
-																xfdashboard_window_tracker_get_screen_width(windowTracker),
-																xfdashboard_window_tracker_get_screen_height(windowTracker),
-																inWindow);
-	g_object_unref(windowTracker);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "make_stage_window");
 }
 
 /* Unset up stage window (only remove connected signals) */
-void xfdashboard_window_tracker_window_unmake_stage_window(XfdashboardWindowTrackerWindow *inWindow)
+void xfdashboard_window_tracker_window_unmake_stage_window(XfdashboardWindowTrackerWindow *self)
 {
-	XfdashboardWindowTracker	*windowTracker;
-	WnckScreen					*screen;
-	guint						signalID;
-	gulong						handlerID;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self));
 
-	/* Get screen of window */
-	screen=wnck_window_get_screen(WNCK_WINDOW(inWindow));
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	/* Disconnect signals */
-	signalID=g_signal_lookup("state-changed", WNCK_TYPE_WINDOW);
-	handlerID=g_signal_handler_find(inWindow,
-									G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC,
-									signalID,
-									0,
-									NULL,
-									G_CALLBACK(_xfdashboard_window_tracker_window_on_stage_state_changed),
-									NULL);
-	if(handlerID)
+	/* Call virtual function */
+	if(iface->unmake_stage_window)
 	{
-		g_signal_handler_disconnect(inWindow, handlerID);
-		XFDASHBOARD_DEBUG(inWindow, WINDOWS,
-							"Disconnecting handler %lu for signal 'state-changed' at window %p",
-							handlerID,
-							inWindow);
-	}
-
-	signalID=g_signal_lookup("active-window-changed", WNCK_TYPE_SCREEN);
-	handlerID=g_signal_handler_find(screen,
-									G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC,
-									signalID,
-									0,
-									NULL,
-									G_CALLBACK(_xfdashboard_window_tracker_window_on_stage_active_window_changed),
-									NULL);
-	if(handlerID)
-	{
-		g_signal_handler_disconnect(screen, handlerID);
-		XFDASHBOARD_DEBUG(screen, WINDOWS,
-							"Disconnecting handler %lu for signal 'active-window-changed' at screen %p of window %p",
-							handlerID,
-							screen,
-							inWindow);
+		iface->unmake_stage_window(self);
+		return;
 	}
 
-	windowTracker=xfdashboard_window_tracker_get_default();
-	signalID=g_signal_lookup("screen-size-changed", XFDASHBOARD_TYPE_WINDOW_TRACKER);
-	handlerID=g_signal_handler_find(windowTracker,
-									G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC,
-									signalID,
-									0,
-									NULL,
-									G_CALLBACK(_xfdashboard_window_tracker_window_on_screen_size_changed),
-									NULL);
-	if(handlerID)
-	{
-		g_signal_handler_disconnect(windowTracker, handlerID);
-		XFDASHBOARD_DEBUG(windowTracker, WINDOWS,
-							"Disconnecting handler %lu for signal 'screen-size-changed' at window %p",
-							handlerID,
-							inWindow);
-	}
-	g_object_unref(windowTracker);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "unmake_stage_window");
 }
 
 /* Get process ID owning the requested window */
-gint xfdashboard_window_tracker_window_get_pid(XfdashboardWindowTrackerWindow *inWindow)
+gint xfdashboard_window_tracker_window_get_pid(XfdashboardWindowTrackerWindow *self)
 {
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), -1);
+	XfdashboardWindowTrackerWindowInterface		*iface;
+
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), -1);
+
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	return(wnck_window_get_pid(WNCK_WINDOW(inWindow)));
+	/* Call virtual function */
+	if(iface->get_pid)
+	{
+		return(iface->get_pid(self));
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_pid");
+	return(-1);
 }
 
 /* Get all possible instance name for window, e.g. class name, instance name.
  * Caller is responsible to free result with g_strfreev() if not NULL.
  */
-gchar** xfdashboard_window_tracker_window_get_instance_names(XfdashboardWindowTrackerWindow *inWindow)
+gchar** xfdashboard_window_tracker_window_get_instance_names(XfdashboardWindowTrackerWindow *self)
 {
-	GSList			*names;
-	GSList			*iter;
-	const gchar		*value;
-	guint			numberEntries;
-	gchar			**result;
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), NULL);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-	names=NULL;
-	result=NULL;
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	/* Add class name of window to list */
-	value=wnck_window_get_class_group_name(WNCK_WINDOW(inWindow));
-	if(value) names=g_slist_prepend(names, g_strdup(value));
+	/* Call virtual function */
+	if(iface->get_instance_names)
+	{
+		return(iface->get_instance_names(self));
+	}
 
-	/* Add instance name of window to list */
-	value=wnck_window_get_class_instance_name(WNCK_WINDOW(inWindow));
-	if(value) names=g_slist_prepend(names, g_strdup(value));
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_instance_names");
+	return(NULL);
+}
 
-	/* Add role of window to list */
-	value=wnck_window_get_role(WNCK_WINDOW(inWindow));
-	if(value) names=g_slist_prepend(names, g_strdup(value));
+/* Get content for this window for use in actors.
+ * Caller is responsible to remove reference with g_object_unref().
+ */
+ClutterContent* xfdashboard_window_tracker_window_get_content(XfdashboardWindowTrackerWindow *self)
+{
+	XfdashboardWindowTrackerWindowInterface		*iface;
 
-	/* If nothing was added to list of name, stop here and return */
-	if(!names) return(NULL);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(self), NULL);
 
-	/* Build result list as a NULL-terminated list of strings */
-	numberEntries=g_slist_length(names);
+	iface=XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(self);
 
-	result=g_new(gchar*, numberEntries+1);
-	result[numberEntries]=NULL;
-	for(iter=names; iter; iter=g_slist_next(iter))
+	/* Call virtual function */
+	if(iface->get_content)
 	{
-		numberEntries--;
-		result[numberEntries]=iter->data;
+		return(iface->get_content(self));
 	}
 
-	/* Release allocated resources */
-	g_slist_free(names);
-
-	/* Return result list */
-	return(result);
-}
-
-/* Get X window ID of window */
-gulong xfdashboard_window_tracker_window_get_xid(XfdashboardWindowTrackerWindow *inWindow)
-{
-	g_return_val_if_fail(WNCK_IS_WINDOW(inWindow), None);
-
-	return(wnck_window_get_xid(WNCK_WINDOW(inWindow)));
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WINDOW_WARN_NOT_IMPLEMENTED(self, "get_content");
+	return(NULL);
 }
diff --git a/libxfdashboard/window-tracker-window.h b/libxfdashboard/window-tracker-window.h
index a6d2572..b03ee8b 100644
--- a/libxfdashboard/window-tracker-window.h
+++ b/libxfdashboard/window-tracker-window.h
@@ -1,12 +1,7 @@
 /*
- * window-tracker-window: A window tracked by window tracker and also
- *                        a wrapper class around WnckWindow.
- *                        By wrapping libwnck objects we can use a virtual
- *                        stable API while the API in libwnck changes
- *                        within versions. We only need to use #ifdefs in
- *                        window tracker object and nowhere else in the code.
+ * window-tracker-window: A window tracked by window tracker.
  * 
- * Copyright 2012-2017 Stephan Haller <nomad at froevel.de>
+ * Copyright 2012-2016 Stephan Haller <nomad at froevel.de>
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -42,15 +37,117 @@
 
 G_BEGIN_DECLS
 
+/* Public definitions */
+/**
+ * XfdashboardWindowTrackerWindowState:
+ * @XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_HIDDEN: The window is not visible on its
+ *                                                  #XfdashboardWindowTrackerWorkspace,
+ *                                                  e.g. when minimized.
+ * @XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_MINIMIZED: The window is minimized.
+ * @XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_MAXIMIZED: The window is maximized.
+ * @XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_FULLSCREEN: The window is fullscreen.
+ * @XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_SKIP_PAGER: The window should not be included on pagers.
+ * @XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_SKIP_TASKLIST: The window should not be included on tasklists.
+ * @XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_PINNED: The window is on all workspaces.
+ * @XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_URGENT: The window requires a response from the user.
+ *
+ * Type used as a bitmask to describe the state of a #XfdashboardWindowTrackerWindow.
+ */
+typedef enum /*< flags,prefix=XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE >*/
+{
+	XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_HIDDEN=1 << 0,
+	XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_MINIMIZED=1 << 1,
+	XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_MAXIMIZED=1 << 2,
+	XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_FULLSCREEN=1 << 3,
+	XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_SKIP_PAGER=1 << 4,
+	XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_SKIP_TASKLIST=1 << 5,
+	XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_PINNED=1 << 6,
+	XFDASHBOARD_WINDOW_TRACKER_WINDOW_STATE_URGENT=1 << 7,
+} XfdashboardWindowTrackerWindowState;
+
+/**
+ * XfdashboardWindowTrackerWindowAction:
+ * @XFDASHBOARD_WINDOW_TRACKER_WINDOW_ACTION_CLOSE: The window may be closed.
+ *
+ * Type used as a bitmask to describe the actions that can be done for a #XfdashboardWindowTrackerWindow.
+ */
+typedef enum /*< flags,prefix=XFDASHBOARD_WINDOW_TRACKER_WINDOW_ACTION >*/
+{
+	XFDASHBOARD_WINDOW_TRACKER_WINDOW_ACTION_CLOSE=1 << 0,
+} XfdashboardWindowTrackerWindowAction;
+
+
+/* Object declaration */
 #define XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW				(xfdashboard_window_tracker_window_get_type())
 #define XFDASHBOARD_WINDOW_TRACKER_WINDOW(obj)				(G_TYPE_CHECK_INSTANCE_CAST((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW, XfdashboardWindowTrackerWindow))
 #define XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW(obj)			(G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW))
-#define XFDASHBOARD_WINDOW_TRACKER_WINDOW_CLASS(klass)		(G_TYPE_CHECK_CLASS_CAST((klass), XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW, XfdashboardWindowTrackerWindowClass))
-#define XFDASHBOARD_IS_WINDOW_TRACKER_WINDOW_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW))
-#define XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW, XfdashboardWindowTrackerWindowClass))
-
-typedef struct _WnckWindow									XfdashboardWindowTrackerWindow;
-typedef struct _WnckWindowClass								XfdashboardWindowTrackerWindowClass;
+#define XFDASHBOARD_WINDOW_TRACKER_WINDOW_GET_IFACE(obj)	(G_TYPE_INSTANCE_GET_INTERFACE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW, XfdashboardWindowTrackerWindowInterface))
+
+typedef struct _XfdashboardWindowTrackerWindow				XfdashboardWindowTrackerWindow;
+typedef struct _XfdashboardWindowTrackerWindowInterface		XfdashboardWindowTrackerWindowInterface;
+
+struct _XfdashboardWindowTrackerWindowInterface
+{
+	/*< private >*/
+	/* Parent interface */
+	GTypeInterface						parent_interface;
+
+	/*< public >*/
+	/* Virtual functions */
+	gboolean (*is_equal)(XfdashboardWindowTrackerWindow *inLeft, XfdashboardWindowTrackerWindow *inRight);
+
+	gboolean (*is_visible)(XfdashboardWindowTrackerWindow *self);
+	void (*show)(XfdashboardWindowTrackerWindow *self);
+	void (*hide)(XfdashboardWindowTrackerWindow *self);
+
+	XfdashboardWindowTrackerWindow* (*get_parent)(XfdashboardWindowTrackerWindow *self);
+
+	XfdashboardWindowTrackerWindowState (*get_state)(XfdashboardWindowTrackerWindow *self);
+	XfdashboardWindowTrackerWindowAction (*get_actions)(XfdashboardWindowTrackerWindow *self);
+
+	const gchar* (*get_name)(XfdashboardWindowTrackerWindow *self);
+
+	GdkPixbuf* (*get_icon)(XfdashboardWindowTrackerWindow *self);
+	const gchar* (*get_icon_name)(XfdashboardWindowTrackerWindow *self);
+
+	XfdashboardWindowTrackerWorkspace* (*get_workspace)(XfdashboardWindowTrackerWindow *self);
+	gboolean (*is_on_workspace)(XfdashboardWindowTrackerWindow *self, XfdashboardWindowTrackerWorkspace *inWorkspace);
+
+	XfdashboardWindowTrackerMonitor* (*get_monitor)(XfdashboardWindowTrackerWindow *self);
+	gboolean (*is_on_monitor)(XfdashboardWindowTrackerWindow *self, XfdashboardWindowTrackerMonitor *inMonitor);
+
+	void (*get_geometry)(XfdashboardWindowTrackerWindow *self, gint *outX, gint *outY, gint *outWidth, gint *outHeight);
+	void (*set_geometry)(XfdashboardWindowTrackerWindow *self, gint inX, gint inY, gint inWidth, gint inHeight);
+	void (*move)(XfdashboardWindowTrackerWindow *self, gint inX, gint inY);
+	void (*resize)(XfdashboardWindowTrackerWindow *self, gint inWidth, gint inHeight);
+	void (*move_to_workspace)(XfdashboardWindowTrackerWindow *self, XfdashboardWindowTrackerWorkspace *inWorkspace);
+	void (*activate)(XfdashboardWindowTrackerWindow *self);
+	void (*close)(XfdashboardWindowTrackerWindow *self);
+
+	gint (*get_pid)(XfdashboardWindowTrackerWindow *self);
+	gchar** (*get_instance_names)(XfdashboardWindowTrackerWindow *self);
+
+	ClutterContent* (*get_content)(XfdashboardWindowTrackerWindow *self);
+
+	ClutterStage* (*get_stage)(XfdashboardWindowTrackerWindow *self);
+	void (*make_stage_window)(XfdashboardWindowTrackerWindow *self);
+	void (*unmake_stage_window)(XfdashboardWindowTrackerWindow *self);
+
+	/* Signals */
+	void (*name_changed)(XfdashboardWindowTrackerWindow *self);
+	void (*state_changed)(XfdashboardWindowTrackerWindow *self,
+							XfdashboardWindowTrackerWindowState inChangedStates,
+							XfdashboardWindowTrackerWindowState inNewState);
+	void (*actions_changed)(XfdashboardWindowTrackerWindow *self,
+							XfdashboardWindowTrackerWindowAction inChangedActions,
+							XfdashboardWindowTrackerWindowAction inNewActions);
+	void (*icon_changed)(XfdashboardWindowTrackerWindow *self);
+	void (*workspace_changed)(XfdashboardWindowTrackerWindow *self,
+								XfdashboardWindowTrackerWorkspace *inOldWorkspace);
+	void (*monitor_changed)(XfdashboardWindowTrackerWindow *self,
+							XfdashboardWindowTrackerMonitor *inOldMonitor);
+	void (*geometry_changed)(XfdashboardWindowTrackerWindow *self);
+};
 
 /* Public API */
 GType xfdashboard_window_tracker_window_get_type(void) G_GNUC_CONST;
@@ -58,64 +155,64 @@ GType xfdashboard_window_tracker_window_get_type(void) G_GNUC_CONST;
 gboolean xfdashboard_window_tracker_window_is_equal(XfdashboardWindowTrackerWindow *inLeft,
 													XfdashboardWindowTrackerWindow *inRight);
 
-gboolean xfdashboard_window_tracker_window_is_minimized(XfdashboardWindowTrackerWindow *inWindow);
-gboolean xfdashboard_window_tracker_window_is_maximized(XfdashboardWindowTrackerWindow *inWindow);
-gboolean xfdashboard_window_tracker_window_is_fullscreen(XfdashboardWindowTrackerWindow *inWindow);
-gboolean xfdashboard_window_tracker_window_is_visible(XfdashboardWindowTrackerWindow *inWindow);
-void xfdashboard_window_tracker_window_show(XfdashboardWindowTrackerWindow *inWindow);
-void xfdashboard_window_tracker_window_hide(XfdashboardWindowTrackerWindow *inWindow);
+gboolean xfdashboard_window_tracker_window_is_visible(XfdashboardWindowTrackerWindow *self);
+gboolean xfdashboard_window_tracker_window_is_visible_on_workspace(XfdashboardWindowTrackerWindow *self,
+																	XfdashboardWindowTrackerWorkspace *inWorkspace);
+gboolean xfdashboard_window_tracker_window_is_visible_on_monitor(XfdashboardWindowTrackerWindow *self,
+																	XfdashboardWindowTrackerMonitor *inMonitor);
+void xfdashboard_window_tracker_window_show(XfdashboardWindowTrackerWindow *self);
+void xfdashboard_window_tracker_window_hide(XfdashboardWindowTrackerWindow *self);
 
-XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_window_get_parent_window(XfdashboardWindowTrackerWindow *inWindow);
-
-XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_window_get_workspace(XfdashboardWindowTrackerWindow *inWindow);
-gboolean xfdashboard_window_tracker_window_is_on_workspace(XfdashboardWindowTrackerWindow *inWindow,
-															XfdashboardWindowTrackerWorkspace *inWorkspace);
-void xfdashboard_window_tracker_window_move_to_workspace(XfdashboardWindowTrackerWindow *inWindow,
-															XfdashboardWindowTrackerWorkspace *inWorkspace);
-
-XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_window_get_monitor(XfdashboardWindowTrackerWindow *inWindow);
-gboolean xfdashboard_window_tracker_window_is_on_monitor(XfdashboardWindowTrackerWindow *inWindow,
-															XfdashboardWindowTrackerMonitor *inMonitor);
+XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_window_get_parent(XfdashboardWindowTrackerWindow *self);
 
-const gchar* xfdashboard_window_tracker_window_get_title(XfdashboardWindowTrackerWindow *inWindow);
+XfdashboardWindowTrackerWindowState xfdashboard_window_tracker_window_get_state(XfdashboardWindowTrackerWindow *self);
+XfdashboardWindowTrackerWindowAction xfdashboard_window_tracker_window_get_actions(XfdashboardWindowTrackerWindow *self);
 
-GdkPixbuf* xfdashboard_window_tracker_window_get_icon(XfdashboardWindowTrackerWindow *inWindow);
-const gchar* xfdashboard_window_tracker_window_get_icon_name(XfdashboardWindowTrackerWindow *inWindow);
+const gchar* xfdashboard_window_tracker_window_get_name(XfdashboardWindowTrackerWindow *self);
 
-gboolean xfdashboard_window_tracker_window_is_skip_pager(XfdashboardWindowTrackerWindow *inWindow);
-gboolean xfdashboard_window_tracker_window_is_skip_tasklist(XfdashboardWindowTrackerWindow *inWindow);
-gboolean xfdashboard_window_tracker_window_is_pinned(XfdashboardWindowTrackerWindow *inWindow);
-gboolean xfdashboard_window_tracker_window_is_urgent(XfdashboardWindowTrackerWindow *inWindow);
+GdkPixbuf* xfdashboard_window_tracker_window_get_icon(XfdashboardWindowTrackerWindow *self);
+const gchar* xfdashboard_window_tracker_window_get_icon_name(XfdashboardWindowTrackerWindow *self);
 
-gboolean xfdashboard_window_tracker_window_has_close_action(XfdashboardWindowTrackerWindow *inWindow);
-
-void xfdashboard_window_tracker_window_activate(XfdashboardWindowTrackerWindow *inWindow);
-
-void xfdashboard_window_tracker_window_close(XfdashboardWindowTrackerWindow *inWindow);
-
-void xfdashboard_window_tracker_window_get_position(XfdashboardWindowTrackerWindow *inWindow, gint *outX, gint *outY);
-void xfdashboard_window_tracker_window_get_size(XfdashboardWindowTrackerWindow *inWindow, gint *outWidth, gint *outHeight);
-void xfdashboard_window_tracker_window_get_position_size(XfdashboardWindowTrackerWindow *inWindow,
-															gint *outX, gint *outY,
-															gint *outWidth, gint *outHeight);
-
-void xfdashboard_window_tracker_window_move(XfdashboardWindowTrackerWindow *inWindow, gint inX, gint inY);
-void xfdashboard_window_tracker_window_resize(XfdashboardWindowTrackerWindow *inWindow, gint inWidth, gint inHeight);
-void xfdashboard_window_tracker_window_move_resize(XfdashboardWindowTrackerWindow *inWindow,
-													gint inX, gint inY,
-													gint inWidth, gint inHeight);
-
-gboolean xfdashboard_window_tracker_window_is_stage(XfdashboardWindowTrackerWindow *inWindow);
-ClutterStage* xfdashboard_window_tracker_window_find_stage(XfdashboardWindowTrackerWindow *inWindow);
-XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_window_get_stage_window(ClutterStage *inStage);
-
-void xfdashboard_window_tracker_window_make_stage_window(XfdashboardWindowTrackerWindow *inWindow);
-void xfdashboard_window_tracker_window_unmake_stage_window(XfdashboardWindowTrackerWindow *inWindow);
+XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_window_get_workspace(XfdashboardWindowTrackerWindow *self);
+gboolean xfdashboard_window_tracker_window_is_on_workspace(XfdashboardWindowTrackerWindow *self,
+															XfdashboardWindowTrackerWorkspace *inWorkspace);
+void xfdashboard_window_tracker_window_move_to_workspace(XfdashboardWindowTrackerWindow *self,
+															XfdashboardWindowTrackerWorkspace *inWorkspace);
 
-gint xfdashboard_window_tracker_window_get_pid(XfdashboardWindowTrackerWindow *inWindow);
-gchar** xfdashboard_window_tracker_window_get_instance_names(XfdashboardWindowTrackerWindow *inWindow);
+XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_window_get_monitor(XfdashboardWindowTrackerWindow *self);
+gboolean xfdashboard_window_tracker_window_is_on_monitor(XfdashboardWindowTrackerWindow *self,
+															XfdashboardWindowTrackerMonitor *inMonitor);
 
-gulong xfdashboard_window_tracker_window_get_xid(XfdashboardWindowTrackerWindow *inWindow);
+void xfdashboard_window_tracker_window_get_geometry(XfdashboardWindowTrackerWindow *self,
+															gint *outX,
+															gint *outY,
+															gint *outWidth,
+															gint *outHeight);
+void xfdashboard_window_tracker_window_set_geometry(XfdashboardWindowTrackerWindow *self,
+															gint inX,
+															gint inY,
+															gint inWidth,
+															gint inHeight);
+void xfdashboard_window_tracker_window_move(XfdashboardWindowTrackerWindow *self,
+											gint inX,
+											gint inY);
+void xfdashboard_window_tracker_window_resize(XfdashboardWindowTrackerWindow *self,
+												gint inWidth,
+												gint inHeight);
+
+void xfdashboard_window_tracker_window_activate(XfdashboardWindowTrackerWindow *self);
+void xfdashboard_window_tracker_window_close(XfdashboardWindowTrackerWindow *self);
+
+gboolean xfdashboard_window_tracker_window_is_stage(XfdashboardWindowTrackerWindow *self);
+ClutterStage* xfdashboard_window_tracker_window_get_stage(XfdashboardWindowTrackerWindow *self);
+
+void xfdashboard_window_tracker_window_make_stage_window(XfdashboardWindowTrackerWindow *self);
+void xfdashboard_window_tracker_window_unmake_stage_window(XfdashboardWindowTrackerWindow *self);
+
+gint xfdashboard_window_tracker_window_get_pid(XfdashboardWindowTrackerWindow *self);
+gchar** xfdashboard_window_tracker_window_get_instance_names(XfdashboardWindowTrackerWindow *self);
+
+ClutterContent* xfdashboard_window_tracker_window_get_content(XfdashboardWindowTrackerWindow *self);
 
 G_END_DECLS
 
diff --git a/libxfdashboard/window-tracker-workspace.c b/libxfdashboard/window-tracker-workspace.c
index 5139091..1f027c6 100644
--- a/libxfdashboard/window-tracker-workspace.c
+++ b/libxfdashboard/window-tracker-workspace.c
@@ -1,13 +1,7 @@
 /*
- * window-tracker-workspace: A workspace tracked by window tracker and
- *                           also a wrapper class around WnckWorkspace.
- *                           By wrapping libwnck objects we can use a 
- *                           virtual stable API while the API in libwnck
- *                           changes within versions. We only need to
- *                           use #ifdefs in window tracker object and
- *                           nowhere else in the code.
+ * window-tracker-workspace: A workspace tracked by window tracker.
  * 
- * Copyright 2012-2017 Stephan Haller <nomad at froevel.de>
+ * Copyright 2012-2016 Stephan Haller <nomad at froevel.de>
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,9 +27,6 @@
 
 #include <libxfdashboard/window-tracker-workspace.h>
 
-#define WNCK_I_KNOW_THIS_IS_UNSTABLE
-#include <libwnck/libwnck.h>
-
 #include <glib/gi18n-lib.h>
 
 #include <libxfdashboard/window-tracker.h>
@@ -43,27 +34,37 @@
 #include <libxfdashboard/compat.h>
 
 
-/* Usually we found define a class in GObject system here but
- * this class is a wrapper around WnckWorkspace to create a virtual stable
- * libwnck API regardless of its version.
- */
+/* Define this class in GObject system */
+G_DEFINE_INTERFACE(XfdashboardWindowTrackerWorkspace,
+					xfdashboard_window_tracker_workspace,
+					G_TYPE_OBJECT)
 
-/* IMPLEMENTATION: Public API */
 
-/* Return type of WnckWorkspace as our type */
-GType xfdashboard_window_tracker_workspace_get_type(void)
+/* Signals */
+enum
 {
-	return(WNCK_TYPE_WORKSPACE);
-}
+	SIGNAL_NAME_CHANGED,
 
-/* Check if both workspaces are the same */
-gboolean xfdashboard_window_tracker_workspace_is_equal(XfdashboardWindowTrackerWorkspace *inLeft,
-														XfdashboardWindowTrackerWorkspace *inRight)
+	SIGNAL_LAST
+};
+
+static guint XfdashboardWindowTrackerWorkspaceSignals[SIGNAL_LAST]={ 0, };
+
+
+/* IMPLEMENTATION: Private variables and methods */
+#define XFDASHBOARD_WINDOWS_TRACKER_WORKSPACE_WARN_NOT_IMPLEMENTED(self, vfunc)\
+	g_warning(_("Object of type %s does not implement required virtual function XfdashboardWindowTrackerWorkspace::%s"),\
+				G_OBJECT_TYPE_NAME(self), \
+				vfunc);
+
+/* Default implementation of virtual function "is_equal" */
+static gboolean _xfdashboard_window_tracker_workspace_real_is_equal(XfdashboardWindowTrackerWorkspace *inLeft,
+																	XfdashboardWindowTrackerWorkspace *inRight)
 {
 	gint			leftIndex, rightIndex;
 
-	g_return_val_if_fail(WNCK_IS_WORKSPACE(inLeft), FALSE);
-	g_return_val_if_fail(WNCK_IS_WORKSPACE(inRight), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(inLeft), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(inRight), FALSE);
 
 	/* Check if both are the same workspace or refer to same one */
 	leftIndex=xfdashboard_window_tracker_workspace_get_number(inLeft);
@@ -74,58 +75,170 @@ gboolean xfdashboard_window_tracker_workspace_is_equal(XfdashboardWindowTrackerW
 	return(FALSE);
 }
 
-/* Get number of workspace */
-gint xfdashboard_window_tracker_workspace_get_number(XfdashboardWindowTrackerWorkspace *inWorkspace)
-{
-	g_return_val_if_fail(WNCK_IS_WORKSPACE(inWorkspace), -1);
 
-	return(wnck_workspace_get_number(WNCK_WORKSPACE(inWorkspace)));
+/* IMPLEMENTATION: GObject */
+
+/* Interface initialization
+ * Set up default functions
+ */
+static void xfdashboard_window_tracker_workspace_default_init(XfdashboardWindowTrackerWorkspaceInterface *iface)
+{
+	static gboolean		initialized=FALSE;
+
+	/* The following virtual functions should be overriden if default
+	 * implementation does not fit.
+	 */
+	iface->is_equal=_xfdashboard_window_tracker_workspace_real_is_equal;
+
+	/* Define signals */
+	if(!initialized)
+	{
+		XfdashboardWindowTrackerWorkspaceSignals[SIGNAL_NAME_CHANGED]=
+			g_signal_new("name-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerWorkspaceInterface, name_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__VOID,
+							G_TYPE_NONE,
+							0);
+
+		/* Set flag that base initialization was done for this interface */
+		initialized=TRUE;
+	}
 }
 
-/* Get name of workspace */
-const gchar* xfdashboard_window_tracker_workspace_get_name(XfdashboardWindowTrackerWorkspace *inWorkspace)
+
+/* IMPLEMENTATION: Public API */
+
+/* Check if both workspaces are the same */
+gboolean xfdashboard_window_tracker_workspace_is_equal(XfdashboardWindowTrackerWorkspace *inLeft,
+														XfdashboardWindowTrackerWorkspace *inRight)
 {
-	g_return_val_if_fail(WNCK_IS_WORKSPACE(inWorkspace), NULL);
+	XfdashboardWindowTrackerWorkspaceInterface		*iface;
+
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(inLeft), FALSE);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(inRight), FALSE);
+
+	iface=XFDASHBOARD_WINDOW_TRACKER_WORKSPACE_GET_IFACE(inLeft);
+
+	/* Call virtual function */
+	if(iface->is_equal)
+	{
+		return(iface->is_equal(inLeft, inRight));
+	}
 
-	return(wnck_workspace_get_name(WNCK_WORKSPACE(inWorkspace)));
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WORKSPACE_WARN_NOT_IMPLEMENTED(inLeft, "is_equal");
+	return(FALSE);
 }
 
-/* Get size of workspace */
-gint xfdashboard_window_tracker_workspace_get_width(XfdashboardWindowTrackerWorkspace *inWorkspace)
+/* Get number of workspace */
+gint xfdashboard_window_tracker_workspace_get_number(XfdashboardWindowTrackerWorkspace *self)
 {
-	g_return_val_if_fail(WNCK_IS_WORKSPACE(inWorkspace), 0);
+	XfdashboardWindowTrackerWorkspaceInterface		*iface;
+
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(self), 0);
 
-	return(wnck_workspace_get_width(WNCK_WORKSPACE(inWorkspace)));
+	iface=XFDASHBOARD_WINDOW_TRACKER_WORKSPACE_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->get_number)
+	{
+		return(iface->get_number(self));
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WORKSPACE_WARN_NOT_IMPLEMENTED(self, "get_number");
+	return(0);
 }
 
-gint xfdashboard_window_tracker_workspace_get_height(XfdashboardWindowTrackerWorkspace *inWorkspace)
+/* Get name of workspace */
+const gchar* xfdashboard_window_tracker_workspace_get_name(XfdashboardWindowTrackerWorkspace *self)
 {
-	g_return_val_if_fail(WNCK_IS_WORKSPACE(inWorkspace), 0);
+	XfdashboardWindowTrackerWorkspaceInterface		*iface;
 
-	return(wnck_workspace_get_height(WNCK_WORKSPACE(inWorkspace)));
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(self), NULL);
+
+	iface=XFDASHBOARD_WINDOW_TRACKER_WORKSPACE_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->get_name)
+	{
+		return(iface->get_name(self));
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WORKSPACE_WARN_NOT_IMPLEMENTED(self, "get_name");
+	return(NULL);
 }
 
-void xfdashboard_window_tracker_workspace_get_size(XfdashboardWindowTrackerWorkspace *inWorkspace,
+/* Get size of workspace */
+void xfdashboard_window_tracker_workspace_get_size(XfdashboardWindowTrackerWorkspace *self,
 													gint *outWidth,
 													gint *outHeight)
 {
-	gint		width, height;
+	XfdashboardWindowTrackerWorkspaceInterface		*iface;
+	gint											width, height;
+
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(self));
+
+	iface=XFDASHBOARD_WINDOW_TRACKER_WORKSPACE_GET_IFACE(self);
 
-	g_return_if_fail(WNCK_IS_WORKSPACE(inWorkspace));
+	/* Call virtual function */
+	if(iface->get_size)
+	{
+		/* Get geometry of workspace */
+		iface->get_size(self, &width, &height);
 
-	/* Get width and height of workspace */
-	width=wnck_workspace_get_width(WNCK_WORKSPACE(inWorkspace));
-	height=wnck_workspace_get_height(WNCK_WORKSPACE(inWorkspace));
+		/* Store result */
+		if(outWidth) *outWidth=width;
+		if(outHeight) *outHeight=height;
 
-	/* Set values */
-	if(outWidth) *outWidth=width;
-	if(outHeight) *outHeight=height;
+		return;
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WORKSPACE_WARN_NOT_IMPLEMENTED(self, "get_size");
+}
+
+/* Determine if requested workspace is the active one */
+gint xfdashboard_window_tracker_workspace_is_active(XfdashboardWindowTrackerWorkspace *self)
+{
+	XfdashboardWindowTrackerWorkspaceInterface		*iface;
+
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(self), FALSE);
+
+	iface=XFDASHBOARD_WINDOW_TRACKER_WORKSPACE_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->is_active)
+	{
+		return(iface->is_active(self));
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WORKSPACE_WARN_NOT_IMPLEMENTED(self, "is_active");
+	return(FALSE);
 }
 
 /* Activate workspace */
-void xfdashboard_window_tracker_workspace_activate(XfdashboardWindowTrackerWorkspace *inWorkspace)
+void xfdashboard_window_tracker_workspace_activate(XfdashboardWindowTrackerWorkspace *self)
 {
-	g_return_if_fail(WNCK_IS_WORKSPACE(inWorkspace));
+	XfdashboardWindowTrackerWorkspaceInterface		*iface;
+
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(self));
+
+	iface=XFDASHBOARD_WINDOW_TRACKER_WORKSPACE_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->activate)
+	{
+		iface->activate(self);
+		return;
+	}
 
-	wnck_workspace_activate(WNCK_WORKSPACE(inWorkspace), xfdashboard_window_tracker_get_time());
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WORKSPACE_WARN_NOT_IMPLEMENTED(self, "activate");
 }
diff --git a/libxfdashboard/window-tracker-workspace.h b/libxfdashboard/window-tracker-workspace.h
index 23a75c2..88f383f 100644
--- a/libxfdashboard/window-tracker-workspace.h
+++ b/libxfdashboard/window-tracker-workspace.h
@@ -1,13 +1,7 @@
 /*
- * window-tracker-workspace: A workspace tracked by window tracker and
- *                           also a wrapper class around WnckWorkspace.
- *                           By wrapping libwnck objects we can use a 
- *                           virtual stable API while the API in libwnck
- *                           changes within versions. We only need to
- *                           use #ifdefs in window tracker object and
- *                           nowhere else in the code.
+ * window-tracker-workspace: A workspace tracked by window tracker.
  * 
- * Copyright 2012-2017 Stephan Haller <nomad at froevel.de>
+ * Copyright 2012-2016 Stephan Haller <nomad at froevel.de>
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -41,12 +35,32 @@ G_BEGIN_DECLS
 #define XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE				(xfdashboard_window_tracker_workspace_get_type())
 #define XFDASHBOARD_WINDOW_TRACKER_WORKSPACE(obj)				(G_TYPE_CHECK_INSTANCE_CAST((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE, XfdashboardWindowTrackerWorkspace))
 #define XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE(obj)			(G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE))
-#define XFDASHBOARD_WINDOW_TRACKER_WORKSPACE_CLASS(klass)		(G_TYPE_CHECK_CLASS_CAST((klass), XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE, XfdashboardWindowTrackerWorkspaceClass))
-#define XFDASHBOARD_IS_WINDOW_TRACKER_WORKSPACE_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE))
-#define XFDASHBOARD_WINDOW_TRACKER_WORKSPACE_GET_CLASS(obj)		(G_TYPE_INSTANCE_GET_CLASS((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE, XfdashboardWindowTrackerWorkspaceClass))
+#define XFDASHBOARD_WINDOW_TRACKER_WORKSPACE_GET_IFACE(obj)		(G_TYPE_INSTANCE_GET_INTERFACE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE, XfdashboardWindowTrackerWorkspaceInterface))
 
-typedef struct _WnckWorkspace									XfdashboardWindowTrackerWorkspace;
-typedef struct _WnckWorkspaceClass								XfdashboardWindowTrackerWorkspaceClass;
+typedef struct _XfdashboardWindowTrackerWorkspace				XfdashboardWindowTrackerWorkspace;
+typedef struct _XfdashboardWindowTrackerWorkspaceInterface		XfdashboardWindowTrackerWorkspaceInterface;
+
+struct _XfdashboardWindowTrackerWorkspaceInterface
+{
+	/*< private >*/
+	/* Parent interface */
+	GTypeInterface						parent_interface;
+
+	/*< public >*/
+	/* Virtual functions */
+	gboolean (*is_equal)(XfdashboardWindowTrackerWorkspace *inLeft, XfdashboardWindowTrackerWorkspace *inRight);
+
+	gint (*get_number)(XfdashboardWindowTrackerWorkspace *self);
+	const gchar* (*get_name)(XfdashboardWindowTrackerWorkspace *self);
+
+	void (*get_size)(XfdashboardWindowTrackerWorkspace *self, gint *outWidth, gint *outHeight);
+
+	gboolean (*is_active)(XfdashboardWindowTrackerWorkspace *self);
+	void (*activate)(XfdashboardWindowTrackerWorkspace *self);
+
+	/* Signals */
+	void (*name_changed)(XfdashboardWindowTrackerWorkspace *self);
+};
 
 /* Public API */
 GType xfdashboard_window_tracker_workspace_get_type(void) G_GNUC_CONST;
@@ -54,16 +68,15 @@ GType xfdashboard_window_tracker_workspace_get_type(void) G_GNUC_CONST;
 gboolean xfdashboard_window_tracker_workspace_is_equal(XfdashboardWindowTrackerWorkspace *inLeft,
 														XfdashboardWindowTrackerWorkspace *inRight);
 
-gint xfdashboard_window_tracker_workspace_get_number(XfdashboardWindowTrackerWorkspace *inWorkspace);
-const gchar* xfdashboard_window_tracker_workspace_get_name(XfdashboardWindowTrackerWorkspace *inWorkspace);
+gint xfdashboard_window_tracker_workspace_get_number(XfdashboardWindowTrackerWorkspace *self);
+const gchar* xfdashboard_window_tracker_workspace_get_name(XfdashboardWindowTrackerWorkspace *self);
 
-gint xfdashboard_window_tracker_workspace_get_width(XfdashboardWindowTrackerWorkspace *inWorkspace);
-gint xfdashboard_window_tracker_workspace_get_height(XfdashboardWindowTrackerWorkspace *inWorkspace);
-void xfdashboard_window_tracker_workspace_get_size(XfdashboardWindowTrackerWorkspace *inWorkspace,
+void xfdashboard_window_tracker_workspace_get_size(XfdashboardWindowTrackerWorkspace *self,
 													gint *outWidth,
 													gint *outHeight);
 
-void xfdashboard_window_tracker_workspace_activate(XfdashboardWindowTrackerWorkspace *inWorkspace);
+gboolean xfdashboard_window_tracker_workspace_is_active(XfdashboardWindowTrackerWorkspace *self);
+void xfdashboard_window_tracker_workspace_activate(XfdashboardWindowTrackerWorkspace *self);
 
 G_END_DECLS
 
diff --git a/libxfdashboard/window-tracker.c b/libxfdashboard/window-tracker.c
index 1504368..ed7f42a 100644
--- a/libxfdashboard/window-tracker.c
+++ b/libxfdashboard/window-tracker.c
@@ -2,12 +2,8 @@
  * window-tracker: Tracks windows, workspaces, monitors and
  *                 listens for changes. It also bundles libwnck into one
  *                 class.
- *                 By wrapping libwnck objects we can use a virtual
- *                 stable API while the API in libwnck changes within versions.
- *                 We only need to use #ifdefs in window tracker object
- *                 and nowhere else in the code.
  * 
- * Copyright 2012-2017 Stephan Haller <nomad at froevel.de>
+ * Copyright 2012-2016 Stephan Haller <nomad at froevel.de>
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,64 +29,18 @@
 
 #include <libxfdashboard/window-tracker.h>
 
-#define WNCK_I_KNOW_THIS_IS_UNSTABLE
-#include <libwnck/libwnck.h>
-
 #include <glib/gi18n-lib.h>
-#include <clutter/clutter.h>
-#include <clutter/x11/clutter-x11.h>
-#include <gdk/gdkx.h>
-#ifdef HAVE_XINERAMA
-#include <X11/extensions/Xinerama.h>
-#endif
 
+#include <libxfdashboard/x11/window-tracker-x11.h>
 #include <libxfdashboard/marshal.h>
-#include <libxfdashboard/application.h>
 #include <libxfdashboard/compat.h>
-#include <libxfdashboard/debug.h>
 
 
 /* Define this class in GObject system */
-G_DEFINE_TYPE(XfdashboardWindowTracker,
-				xfdashboard_window_tracker,
-				G_TYPE_OBJECT)
-
-/* Private structure - access only by public API if needed */
-#define XFDASHBOARD_WINDOW_TRACKER_GET_PRIVATE(obj) \
-	(G_TYPE_INSTANCE_GET_PRIVATE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER, XfdashboardWindowTrackerPrivate))
-
-struct _XfdashboardWindowTrackerPrivate
-{
-	/* Properties related */
-	WnckWindow							*activeWindow;
-	WnckWorkspace						*activeWorkspace;
-	XfdashboardWindowTrackerMonitor		*primaryMonitor;
-
-	/* Instance related */
-	XfdashboardApplication				*application;
-	gboolean							isAppSuspended;
-	guint								suspendSignalID;
-
-	WnckScreen							*screen;
-
-	gboolean							supportsMultipleMonitors;
-	GdkScreen							*gdkScreen;
-	GList								*monitors;
-};
-
-/* Properties */
-enum
-{
-	PROP_0,
-
-	PROP_ACTIVE_WINDOW,
-	PROP_ACTIVE_WORKSPACE,
-	PROP_PRIMARY_MONITOR,
-
-	PROP_LAST
-};
+G_DEFINE_INTERFACE(XfdashboardWindowTracker,
+					xfdashboard_window_tracker,
+					G_TYPE_OBJECT)
 
-static GParamSpec* XfdashboardWindowTrackerProperties[PROP_LAST]={ 0, };
 
 /* Signals */
 
@@ -126,1519 +76,650 @@ enum
 static guint XfdashboardWindowTrackerSignals[SIGNAL_LAST]={ 0, };
 
 /* IMPLEMENTATION: Private variables and methods */
-#define LAST_X_DATA_KEY			"last-x"
-#define LAST_Y_DATA_KEY			"last-y"
-#define LAST_WIDTH_DATA_KEY		"last-width"
-#define LAST_HEIGHT_DATA_KEY	"last-height"
+#define XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, vfunc)  \
+	g_warning(_("Object of type %s does not implement required virtual function XfdashboardWindowTracker::%s"),\
+				G_OBJECT_TYPE_NAME(self), \
+				vfunc);
 
 static XfdashboardWindowTracker *_xfdashboard_window_tracker_singleton=NULL;
 
 
-/* Position and/or size of window has changed */
-static void _xfdashboard_window_tracker_on_window_geometry_changed(XfdashboardWindowTracker *self, gpointer inUserData)
-{
-	XfdashboardWindowTrackerPrivate			*priv;
-	WnckWindow								*window;
-	gint									x, y, width, height;
-	gint									lastX, lastY, lastWidth, lastHeight;
-	XfdashboardWindowTrackerMonitor			*currentMonitor;
-	XfdashboardWindowTrackerMonitor			*lastMonitor;
-	GList									*iter;
-	gint									screenWidth, screenHeight;
-	gint									windowMiddleX, windowMiddleY;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WINDOW(inUserData));
-
-	priv=self->priv;
-	window=WNCK_WINDOW(inUserData);
-
-
-	/* Get last and current position and size of window to determine
-	 * if window has moved or resized and do not emit this signal if
-	 * neither happened, although it is very unlike that the window
-	 * has not moved or resized if this signal was called.
-	 */
-	lastX=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(window), LAST_X_DATA_KEY));
-	lastY=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(window), LAST_Y_DATA_KEY));
-	lastWidth=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(window), LAST_WIDTH_DATA_KEY));
-	lastHeight=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(window), LAST_HEIGHT_DATA_KEY));
-
-	xfdashboard_window_tracker_window_get_position_size(window, &x, &y, &width, &height);
-
-	if(G_UNLIKELY(lastX==x && lastY==y && lastWidth==width && lastHeight==height))
-	{
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Window '%s' has not moved or resized",
-							wnck_window_get_name(window));
-		return;
-	}
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Window '%s' changed position and/or size",
-						wnck_window_get_name(window));
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_GEOMETRY_CHANGED], 0, window);
-
-	/* Get monitor at old position of window and the monitor at current position.
-	 * If they differ emit signal for window changed monitor.
-	 */
-	screenWidth=xfdashboard_window_tracker_get_screen_width(self);
-	screenHeight=xfdashboard_window_tracker_get_screen_height(self);
-
-	windowMiddleX=lastX+(lastWidth/2);
-	if(windowMiddleX>screenWidth) windowMiddleX=screenWidth-1;
-
-	windowMiddleY=lastY+(lastHeight/2);
-	if(windowMiddleY>screenHeight) windowMiddleY=screenHeight-1;
-
-	lastMonitor=NULL;
-	for(iter=priv->monitors; iter && !lastMonitor; iter=g_list_next(iter))
-	{
-		gint								monitorX, monitorY, monitorWidth, monitorHeight;
-		XfdashboardWindowTrackerMonitor		*monitor;
-
-		/* Get monitor */
-		monitor=XFDASHBOARD_WINDOW_TRACKER_MONITOR(iter->data);
-
-		/* Get monitor geometry */
-		xfdashboard_window_tracker_monitor_get_geometry(monitor, &monitorX, &monitorY, &monitorWidth, &monitorHeight);
+/* IMPLEMENTATION: GObject */
 
-		/* Check if mid-point of window (adjusted to screen size) is within monitor */
-		if(windowMiddleX>=monitorX && windowMiddleX<(monitorX+monitorWidth) &&
-			windowMiddleY>=monitorY && windowMiddleY<(monitorY+monitorHeight))
-		{
-			lastMonitor=monitor;
-		}
-	}
+/* Interface initialization
+ * Set up default functions
+ */
+void xfdashboard_window_tracker_default_init(XfdashboardWindowTrackerInterface *iface)
+{
+	static gboolean		initialized=FALSE;
+	GParamSpec			*property;
 
-	currentMonitor=xfdashboard_window_tracker_window_get_monitor(window);
-	if(currentMonitor!=lastMonitor)
+	/* Define properties, signals and actions */
+	if(!initialized)
 	{
-		/* Emit signal */
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Window '%s' moved from monitor %d to %d",
-							wnck_window_get_name(window),
-							xfdashboard_window_tracker_monitor_get_number(lastMonitor),
-							xfdashboard_window_tracker_monitor_get_number(currentMonitor));
-		g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_MONITOR_CHANGED], 0, window, lastMonitor, currentMonitor);
+		/* Define properties */
+		property=g_param_spec_object("active-window",
+										_("Active window"),
+										_("The current active window"),
+										XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW,
+										G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+		g_object_interface_install_property(iface, property);
+
+		property=g_param_spec_object("active-workspace",
+										_("Active workspace"),
+										_("The current active workspace"),
+										XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE,
+										G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+		g_object_interface_install_property(iface, property);
+
+		property=g_param_spec_object("primary-monitor",
+										_("Primary monitor"),
+										_("The current primary monitor"),
+										XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR,
+										G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+		g_object_interface_install_property(iface, property);
+
+		/* Define signals */
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_STACKING_CHANGED]=
+			g_signal_new("window-stacking-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_stacking_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__VOID,
+							G_TYPE_NONE,
+							0);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_ACTIVE_WINDOW_CHANGED]=
+			g_signal_new("active-window-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, active_window_changed),
+							NULL,
+							NULL,
+							_xfdashboard_marshal_VOID__OBJECT_OBJECT,
+							G_TYPE_NONE,
+							2,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_OPENED]=
+			g_signal_new("window-opened",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_opened),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_CLOSED]=
+			g_signal_new("window-closed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_closed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_GEOMETRY_CHANGED]=
+			g_signal_new("window-geometry-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_geometry_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_ACTIONS_CHANGED]=
+			g_signal_new("window-actions-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_actions_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_STATE_CHANGED]=
+			g_signal_new("window-state-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_state_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_ICON_CHANGED]=
+			g_signal_new("window-icon-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_icon_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_NAME_CHANGED]=
+			g_signal_new("window-name-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_name_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_WORKSPACE_CHANGED]=
+			g_signal_new("window-workspace-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_workspace_changed),
+							NULL,
+							NULL,
+							_xfdashboard_marshal_VOID__OBJECT_OBJECT,
+							G_TYPE_NONE,
+							2,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_MONITOR_CHANGED]=
+			g_signal_new("window-monitor-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, window_monitor_changed),
+							NULL,
+							NULL,
+							_xfdashboard_marshal_VOID__OBJECT_OBJECT_OBJECT,
+							G_TYPE_NONE,
+							3,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WINDOW,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_ACTIVE_WORKSPACE_CHANGED]=
+			g_signal_new("active-workspace-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, active_workspace_changed),
+							NULL,
+							NULL,
+							_xfdashboard_marshal_VOID__OBJECT_OBJECT,
+							G_TYPE_NONE,
+							2,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WORKSPACE_ADDED]=
+			g_signal_new("workspace-added",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, workspace_added),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WORKSPACE_REMOVED]=
+			g_signal_new("workspace-removed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, workspace_removed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_WORKSPACE_NAME_CHANGED]=
+			g_signal_new("workspace-name-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, workspace_name_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_WORKSPACE);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_PRIMARY_MONITOR_CHANGED]=
+			g_signal_new("primary-monitor-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, primary_monitor_changed),
+							NULL,
+							NULL,
+							_xfdashboard_marshal_VOID__OBJECT_OBJECT,
+							G_TYPE_NONE,
+							2,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_MONITOR_ADDED]=
+			g_signal_new("monitor-added",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, monitor_added),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_MONITOR_REMOVED]=
+			g_signal_new("monitor-removed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, monitor_removed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_MONITOR_GEOMETRY_CHANGED]=
+			g_signal_new("monitor-geometry-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, monitor_geometry_changed),
+							NULL,
+							NULL,
+							g_cclosure_marshal_VOID__OBJECT,
+							G_TYPE_NONE,
+							1,
+							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
+
+		XfdashboardWindowTrackerSignals[SIGNAL_SCREEN_SIZE_CHANGED]=
+			g_signal_new("screen-size-changed",
+							G_TYPE_FROM_INTERFACE(iface),
+							G_SIGNAL_RUN_LAST,
+							G_STRUCT_OFFSET(XfdashboardWindowTrackerInterface, screen_size_changed),
+							NULL,
+							NULL,
+							_xfdashboard_marshal_VOID__INT_INT,
+							G_TYPE_NONE,
+							2,
+							G_TYPE_INT,
+							G_TYPE_INT);
+
+		/* Set flag that base initialization was done for this interface */
+		initialized=TRUE;
 	}
-
-	/* Remember new position and size as last known ones */
-	g_object_set_data(G_OBJECT(window), LAST_X_DATA_KEY, GINT_TO_POINTER(x));
-	g_object_set_data(G_OBJECT(window), LAST_Y_DATA_KEY, GINT_TO_POINTER(y));
-	g_object_set_data(G_OBJECT(window), LAST_WIDTH_DATA_KEY, GINT_TO_POINTER(width));
-	g_object_set_data(G_OBJECT(window), LAST_HEIGHT_DATA_KEY, GINT_TO_POINTER(height));
-}
-
-/* Action items of window has changed */
-static void _xfdashboard_window_tracker_on_window_actions_changed(XfdashboardWindowTracker *self,
-																	WnckWindowActions inChangedMask,
-																	WnckWindowActions inNewValue,
-																	gpointer inUserData)
-{
-	WnckWindow			*window;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WINDOW(inUserData));
-
-	window=WNCK_WINDOW(inUserData);
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Window '%s' changed actions to %u with mask %u",
-						wnck_window_get_name(window),
-						inNewValue,
-						inChangedMask);
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_ACTIONS_CHANGED], 0, window);
-}
-
-/* State of window has changed */
-static void _xfdashboard_window_tracker_on_window_state_changed(XfdashboardWindowTracker *self,
-																	WnckWindowState inChangedMask,
-																	WnckWindowState inNewValue,
-																	gpointer inUserData)
-{
-	WnckWindow			*window;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WINDOW(inUserData));
-
-	window=WNCK_WINDOW(inUserData);
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Window '%s' changed state to %u with mask %u",
-						wnck_window_get_name(window),
-						inNewValue,
-						inChangedMask);
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_STATE_CHANGED], 0, window);
 }
 
-/* Icon of window has changed */
-static void _xfdashboard_window_tracker_on_window_icon_changed(XfdashboardWindowTracker *self, gpointer inUserData)
-{
-	WnckWindow			*window;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WINDOW(inUserData));
-
-	window=WNCK_WINDOW(inUserData);
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Window '%s' changed its icon",
-						wnck_window_get_name(window));
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_ICON_CHANGED], 0, window);
-}
-
-/* Name of window has changed */
-static void _xfdashboard_window_tracker_on_window_name_changed(XfdashboardWindowTracker *self, gpointer inUserData)
-{
-	WnckWindow			*window;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WINDOW(inUserData));
-
-	window=WNCK_WINDOW(inUserData);
-
-	/* Emit "signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Window changed its name to '%s'",
-						wnck_window_get_name(window));
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_NAME_CHANGED], 0, window);
-}
-
-/* A window has moved to another workspace */
-static void _xfdashboard_window_tracker_on_window_workspace_changed(XfdashboardWindowTracker *self, gpointer inUserData)
-{
-	WnckWindow			*window;
-	WnckWorkspace		*workspace;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WINDOW(inUserData));
-
-	window=WNCK_WINDOW(inUserData);
-
-	/* Get workspace window resides on */
-	workspace=wnck_window_get_workspace(window);
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Window '%s' moved to workspace %d (%s)",
-						wnck_window_get_name(window),
-						workspace ? wnck_workspace_get_number(workspace) : -1,
-						workspace ? wnck_workspace_get_name(workspace) : "<nil>");
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_WORKSPACE_CHANGED], 0, window, workspace);
-}
-
-/* A window was activated */
-static void _xfdashboard_window_tracker_on_active_window_changed(XfdashboardWindowTracker *self,
-																	WnckWindow *inPreviousWindow,
-																	gpointer inUserData)
-{
-	XfdashboardWindowTrackerPrivate		*priv;
-	WnckScreen							*screen;
-	WnckWindow							*oldActiveWindow;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(inPreviousWindow==NULL || WNCK_IS_WINDOW(inPreviousWindow));
-	g_return_if_fail(WNCK_IS_SCREEN(inUserData));
-
-	priv=self->priv;
-	screen=WNCK_SCREEN(inUserData);
-
-	/* Get and remember new active window */
-	oldActiveWindow=priv->activeWindow;
-	priv->activeWindow=wnck_screen_get_active_window(screen);
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Active window changed from '%s' to '%s'",
-						oldActiveWindow ? wnck_window_get_name(oldActiveWindow) : "<nil>",
-						priv->activeWindow ? wnck_window_get_name(priv->activeWindow) : "<nil>");
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_ACTIVE_WINDOW_CHANGED], 0, oldActiveWindow, priv->activeWindow);
-}
-
-/* A window was closed */
-static void _xfdashboard_window_tracker_on_window_closed(XfdashboardWindowTracker *self,
-															WnckWindow *inWindow,
-															gpointer inUserData)
-{
-	XfdashboardWindowTrackerPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
-	g_return_if_fail(WNCK_IS_SCREEN(inUserData));
-
-	priv=self->priv;
 
-	/* Should not happen but if closed window is the last known one
-	 * reset to NULL
-	 */
-	if(priv->activeWindow==inWindow) priv->activeWindow=NULL;
-
-	/* Remove all signal handlers for closed window */
-	g_signal_handlers_disconnect_by_data(inWindow, self);
-
-	/* Emit signals */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Window '%s' closed",
-						wnck_window_get_name(inWindow));
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_CLOSED], 0, inWindow);
-}
+/* IMPLEMENTATION: Public API */
 
-/* A new window was opened */
-static void _xfdashboard_window_tracker_on_window_opened(XfdashboardWindowTracker *self,
-															WnckWindow *inWindow,
-															gpointer inUserData)
+/* Create new instance */
+XfdashboardWindowTracker* xfdashboard_window_tracker_get_default(void)
 {
-	XfdashboardWindowTrackerPrivate		*priv;
-	gint								x, y, width, height;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WINDOW(inWindow));
-	g_return_if_fail(WNCK_IS_SCREEN(inUserData));
-
-	priv=self->priv;
-
-	/* Remember current position and size as last known ones */
-	xfdashboard_window_tracker_window_get_position_size(inWindow, &x, &y, &width, &height);
-	g_object_set_data(G_OBJECT(inWindow), LAST_X_DATA_KEY, GINT_TO_POINTER(x));
-	g_object_set_data(G_OBJECT(inWindow), LAST_Y_DATA_KEY, GINT_TO_POINTER(y));
-	g_object_set_data(G_OBJECT(inWindow), LAST_WIDTH_DATA_KEY, GINT_TO_POINTER(width));
-	g_object_set_data(G_OBJECT(inWindow), LAST_HEIGHT_DATA_KEY, GINT_TO_POINTER(height));
-
-	/* Connect signals on newly opened window */
-	g_signal_connect_swapped(inWindow, "actions-changed", G_CALLBACK(_xfdashboard_window_tracker_on_window_actions_changed), self);
-	g_signal_connect_swapped(inWindow, "state-changed", G_CALLBACK(_xfdashboard_window_tracker_on_window_state_changed), self);
-	g_signal_connect_swapped(inWindow, "icon-changed", G_CALLBACK(_xfdashboard_window_tracker_on_window_icon_changed), self);
-	g_signal_connect_swapped(inWindow, "name-changed", G_CALLBACK(_xfdashboard_window_tracker_on_window_name_changed), self);
-	g_signal_connect_swapped(inWindow, "workspace-changed", G_CALLBACK(_xfdashboard_window_tracker_on_window_workspace_changed), self);
-	g_signal_connect_swapped(inWindow, "geometry-changed", G_CALLBACK(_xfdashboard_window_tracker_on_window_geometry_changed), self);
-
-	/* Block signal handler for 'geometry-changed' at window if application is suspended */
-	if(priv->isAppSuspended)
+	if(G_UNLIKELY(_xfdashboard_window_tracker_singleton==NULL))
 	{
-		g_signal_handlers_block_by_func(inWindow, _xfdashboard_window_tracker_on_window_geometry_changed, self);
+		_xfdashboard_window_tracker_singleton=
+			XFDASHBOARD_WINDOW_TRACKER(g_object_new(XFDASHBOARD_TYPE_WINDOW_TRACKER_X11, NULL));
 	}
+		else g_object_ref(_xfdashboard_window_tracker_singleton);
 
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Window '%s' created",
-						wnck_window_get_name(inWindow));
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_OPENED], 0, inWindow);
-}
-
-/* Window stacking has changed */
-static void _xfdashboard_window_tracker_on_window_stacking_changed(XfdashboardWindowTracker *self,
-																	gpointer inUserData)
-{
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS, "Window stacking has changed");
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_STACKING_CHANGED], 0);
-}
-
-/* A workspace changed its name */
-static void _xfdashboard_window_tracker_on_workspace_name_changed(XfdashboardWindowTracker *self,
-																	gpointer inUserData)
-{
-	WnckWorkspace				*workspace;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WORKSPACE(inUserData));
-
-	workspace=WNCK_WORKSPACE(inUserData);
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Workspace #%d changed name to '%s'",
-						wnck_workspace_get_number(workspace),
-						wnck_workspace_get_name(workspace));
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WORKSPACE_NAME_CHANGED], 0, workspace);
-
-}
-
-/* A workspace was activated */
-static void _xfdashboard_window_tracker_on_active_workspace_changed(XfdashboardWindowTracker *self,
-																	WnckWorkspace *inPreviousWorkspace,
-																	gpointer inUserData)
-{
-	XfdashboardWindowTrackerPrivate		*priv;
-	WnckScreen							*screen;
-	WnckWorkspace						*oldActiveWorkspace;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(inPreviousWorkspace==NULL || WNCK_IS_WORKSPACE(inPreviousWorkspace));
-	g_return_if_fail(WNCK_IS_SCREEN(inUserData));
-
-	priv=self->priv;
-	screen=WNCK_SCREEN(inUserData);
-
-	/* Get and remember new active workspace */
-	oldActiveWorkspace=priv->activeWorkspace;
-	priv->activeWorkspace=wnck_screen_get_active_workspace(screen);
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Active workspace changed from #%d (%s) to #%d (%s)",
-						oldActiveWorkspace ? wnck_workspace_get_number(oldActiveWorkspace) : -1,
-						oldActiveWorkspace ? wnck_workspace_get_name(oldActiveWorkspace) : "<nil>",
-						priv->activeWorkspace ? wnck_workspace_get_number(priv->activeWorkspace) : -1,
-						priv->activeWorkspace ? wnck_workspace_get_name(priv->activeWorkspace) : "<nil>");
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_ACTIVE_WORKSPACE_CHANGED], 0, oldActiveWorkspace, priv->activeWorkspace);
-}
-
-/* A workspace was destroyed */
-static void _xfdashboard_window_tracker_on_workspace_destroyed(XfdashboardWindowTracker *self,
-																WnckWorkspace *inWorkspace,
-																gpointer inUserData)
-{
-	XfdashboardWindowTrackerPrivate		*priv;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WORKSPACE(inWorkspace));
-	g_return_if_fail(WNCK_IS_SCREEN(inUserData));
-
-	priv=self->priv;
-
-	/* Should not happen but if destroyed workspace is the last known one
-	 * reset to NULL
-	 */
-	if(priv->activeWorkspace==inWorkspace) priv->activeWorkspace=NULL;
-
-	/* Remove all signal handlers for closed window */
-	g_signal_handlers_disconnect_by_data(inWorkspace, self);
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Workspace #%d (%s) destroyed",
-						wnck_workspace_get_number(inWorkspace),
-						wnck_workspace_get_name(inWorkspace));
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WORKSPACE_REMOVED], 0, inWorkspace);
-}
+	return(_xfdashboard_window_tracker_singleton);
 
-/* A new workspace was created */
-static void _xfdashboard_window_tracker_on_workspace_created(XfdashboardWindowTracker *self,
-																WnckWorkspace *inWorkspace,
-																gpointer inUserData)
-{
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(WNCK_IS_WORKSPACE(inWorkspace));
-	g_return_if_fail(WNCK_IS_SCREEN(inUserData));
-
-	/* Connect signals on newly created workspace */
-	g_signal_connect_swapped(inWorkspace, "name-changed", G_CALLBACK(_xfdashboard_window_tracker_on_workspace_name_changed), self);
-
-	/* Emit signal */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"New workspace #%d (%s) created",
-						wnck_workspace_get_number(inWorkspace),
-						wnck_workspace_get_name(inWorkspace));
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_WORKSPACE_ADDED], 0, inWorkspace);
 }
 
-/* Primary monitor has changed */
-static void _xfdashboard_window_tracker_on_primary_monitor_changed(XfdashboardWindowTracker *self,
-																	gpointer inUserData)
+/* Get list of all windows (if wanted in stack order) */
+GList* xfdashboard_window_tracker_get_windows(XfdashboardWindowTracker *self)
 {
-	XfdashboardWindowTrackerPrivate			*priv;
-	XfdashboardWindowTrackerMonitor			*monitor;
+	XfdashboardWindowTrackerInterface		*iface;
 
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inUserData));
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
 
-	priv=self->priv;
-	monitor=XFDASHBOARD_WINDOW_TRACKER_MONITOR(inUserData);
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-	/* If monitor emitting this signal is the (new) primary one
-	 * then update primary monitor value of this instance.
-	 */
-	if(xfdashboard_window_tracker_monitor_is_primary(monitor) &&
-		priv->primaryMonitor!=monitor)
+	/* Call virtual function */
+	if(iface->get_windows)
 	{
-		XfdashboardWindowTrackerMonitor		*oldMonitor;
-
-		/* Remember old monitor for signal emission */
-		oldMonitor=priv->primaryMonitor;
-
-		/* Set value */
-		priv->primaryMonitor=monitor;
-
-		/* Emit signal */
-		g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_PRIMARY_MONITOR_CHANGED], 0, oldMonitor, priv->primaryMonitor);
-
-		/* Notify about property change */
-		g_object_notify_by_pspec(G_OBJECT(self), XfdashboardWindowTrackerProperties[PROP_PRIMARY_MONITOR]);
-
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Primary monitor changed from %d to %d",
-							oldMonitor ? xfdashboard_window_tracker_monitor_get_number(oldMonitor) : -1,
-							xfdashboard_window_tracker_monitor_get_number(monitor));
+		return(iface->get_windows(self));
 	}
-}
-
-/* A monitor has changed its position and/or size */
-static void _xfdashboard_window_tracker_on_monitor_geometry_changed(XfdashboardWindowTracker *self,
-																	gpointer inUserData)
-{
-	XfdashboardWindowTrackerMonitor			*monitor;
 
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inUserData));
-
-	monitor=XFDASHBOARD_WINDOW_TRACKER_MONITOR(inUserData);
-
-	/* A monitor changed its position and/or size so re-emit the signal */
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_MONITOR_GEOMETRY_CHANGED], 0, monitor);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_windows");
+	return(NULL);
 }
 
-/* Create a monitor object */
-static XfdashboardWindowTrackerMonitor* _xfdashboard_window_tracker_monitor_new(XfdashboardWindowTracker *self, guint inMonitorIndex)
+GList* xfdashboard_window_tracker_get_windows_stacked(XfdashboardWindowTracker *self)
 {
-	XfdashboardWindowTrackerPrivate		*priv;
-	XfdashboardWindowTrackerMonitor		*monitor;
+	XfdashboardWindowTrackerInterface		*iface;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
-	g_return_val_if_fail(inMonitorIndex>=g_list_length(self->priv->monitors), NULL);
-
-	priv=self->priv;
-
-	/* Create monitor object */
-	monitor=XFDASHBOARD_WINDOW_TRACKER_MONITOR(g_object_new(XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR,
-															"monitor-index", inMonitorIndex,
-															NULL));
-	priv->monitors=g_list_append(priv->monitors, monitor);
-
-	/* Connect signals */
-	g_signal_connect_swapped(monitor,
-								"primary-changed",
-								G_CALLBACK(_xfdashboard_window_tracker_on_primary_monitor_changed),
-								self);
-	g_signal_connect_swapped(monitor,
-								"geometry-changed",
-								G_CALLBACK(_xfdashboard_window_tracker_on_monitor_geometry_changed),
-								self);
-
-	/* Emit signal */
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_MONITOR_ADDED], 0, monitor);
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Monitor %d added",
-						inMonitorIndex);
-
-	/* If we newly added monitor is the primary one then emit signal. We could not
-	 * have done it yet because the signals were connect to new monitor object
-	 * after its creation.
-	 */
-	if(xfdashboard_window_tracker_monitor_is_primary(monitor))
-	{
-		_xfdashboard_window_tracker_on_primary_monitor_changed(self, monitor);
-	}
 
-	/* Return newly created monitor */
-	return(monitor);
-}
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-/* Free a monitor object */
-static void _xfdashboard_window_tracker_monitor_free(XfdashboardWindowTracker *self, XfdashboardWindowTrackerMonitor *inMonitor)
-{
-	XfdashboardWindowTrackerPrivate		*priv;
-	GList								*iter;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inMonitor));
-
-	priv=self->priv;
-
-	/* Find monitor to free */
-	iter=g_list_find(priv->monitors,  inMonitor);
-	if(!iter)
+	/* Call virtual function */
+	if(iface->get_windows_stacked)
 	{
-		g_critical(_("Cannot release unknown monitor %d"),
-					xfdashboard_window_tracker_monitor_get_number(inMonitor));
-		return;
+		return(iface->get_windows_stacked(self));
 	}
 
-	/* Disconnect signals */
-	g_signal_handlers_disconnect_by_data(inMonitor, self);
-
-	/* Emit signal */
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_MONITOR_REMOVED], 0, inMonitor);
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Monitor %d removed",
-						xfdashboard_window_tracker_monitor_get_number(inMonitor));
-
-	/* Remove monitor object from list */
-	priv->monitors=g_list_delete_link(priv->monitors, iter);
-
-	/* Unref monitor object. Usually this is the last reference released
-	 * and the object will be destroyed.
-	 */
-	g_object_unref(inMonitor);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_windows_stacked");
+	return(NULL);
 }
 
-#ifdef HAVE_XINERAMA
-/* Number of monitors, primary monitor or size of any monitor changed */
-static void _xfdashboard_window_tracker_on_monitors_changed(XfdashboardWindowTracker *self,
-																gpointer inUserData)
+/* Get active window */
+XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_get_active_window(XfdashboardWindowTracker *self)
 {
-	XfdashboardWindowTrackerPrivate			*priv;
-	GdkScreen								*screen;
-	gint									currentMonitorCount;
-	gint									newMonitorCount;
-	gint									i;
-	XfdashboardWindowTrackerMonitor			*monitor;
-	GList									*iter;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(GDK_IS_SCREEN(inUserData));
+	XfdashboardWindowTrackerInterface		*iface;
 
-	priv=self->priv;
-	screen=GDK_SCREEN(inUserData);
-
-	/* Get current monitor states */
-	currentMonitorCount=g_list_length(priv->monitors);
-
-	/* Get new monitor state */
-	newMonitorCount=gdk_screen_get_n_monitors(screen);
-	if(newMonitorCount!=currentMonitorCount)
-	{
-		XFDASHBOARD_DEBUG(self, WINDOWS,
-							"Number of monitors changed from %d to %d",
-							currentMonitorCount,
-							newMonitorCount);
-	}
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
 
-	/* There is no need to check if size of any monitor has changed because
-	 * XfdashboardWindowTrackerMonitor instances should also be connected to
-	 * this signal and will raise a signal if their size changed. This instance
-	 * is connected to this "monitor-has-changed-signal' and will re-emit them.
-	 * The same is with primary monitor.
-	 */
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-	/* If number of monitors has increased create newly added monitors */
-	if(newMonitorCount>currentMonitorCount)
+	/* Call virtual function */
+	if(iface->get_active_window)
 	{
-		for(i=currentMonitorCount; i<newMonitorCount; i++)
-		{
-			/* Create monitor object */
-			_xfdashboard_window_tracker_monitor_new(self, i);
-		}
+		return(iface->get_active_window(self));
 	}
 
-	/* If number of monitors has decreased remove all monitors beyond
-	 * the new number of monitors.
-	 */
-	if(newMonitorCount<currentMonitorCount)
-	{
-		for(i=currentMonitorCount; i>newMonitorCount; i--)
-		{
-			/* Get monitor object */
-			iter=g_list_last(priv->monitors);
-			if(!iter) continue;
-
-			monitor=XFDASHBOARD_WINDOW_TRACKER_MONITOR(iter->data);
-
-			/* Free monitor object */
-			_xfdashboard_window_tracker_monitor_free(self, monitor);
-		}
-	}
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_active_window");
+	return(NULL);
 }
-#endif
 
-/* Total size of screen changed */
-static void _xfdashboard_window_tracker_on_screen_size_changed(XfdashboardWindowTracker *self,
-																gpointer inUserData)
+/* Get number of workspaces */
+gint xfdashboard_window_tracker_get_workspaces_count(XfdashboardWindowTracker *self)
 {
-	GdkScreen		*screen;
-	gint			w, h;
+	XfdashboardWindowTrackerInterface		*iface;
 
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(GDK_IS_SCREEN(inUserData));
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), 0);
 
-	screen=GDK_SCREEN(inUserData);
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-	/* Get new total size of screen */
-	w=gdk_screen_get_width(screen);
-	h=gdk_screen_get_height(screen);
+	/* Call virtual function */
+	if(iface->get_workspaces_count)
+	{
+		return(iface->get_workspaces_count(self));
+	}
 
-	/* Emit signal to tell that screen size has changed */
-	XFDASHBOARD_DEBUG(self, WINDOWS,
-						"Screen size changed to %dx%d",
-						w,
-						h);
-	g_signal_emit(self, XfdashboardWindowTrackerSignals[SIGNAL_SCREEN_SIZE_CHANGED], 0, w, h);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_workspaces_count");
+	return(0);
 }
 
-/* Suspension state of application changed */
-static void _xfdashboard_window_tracker_on_application_suspended_changed(XfdashboardWindowTracker *self,
-																			GParamSpec *inSpec,
-																			gpointer inUserData)
+/* Get list of workspaces */
+GList* xfdashboard_window_tracker_get_workspaces(XfdashboardWindowTracker *self)
 {
-	XfdashboardWindowTrackerPrivate		*priv;
-	XfdashboardApplication				*app;
-	GList								*iter;
-	XfdashboardWindowTrackerWindow		*window;
-
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
-	g_return_if_fail(XFDASHBOARD_IS_APPLICATION(inUserData));
+	XfdashboardWindowTrackerInterface		*iface;
 
-	priv=self->priv;
-	app=XFDASHBOARD_APPLICATION(inUserData);
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
 
-	/* Get application suspend state */
-	priv->isAppSuspended=xfdashboard_application_is_suspended(app);
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-	/* Iterate through all windows and connect handler to signal 'geometry-changed'
-	 * if application was resumed or disconnect signal handler if it was suspended.
-	 */
-	for(iter=xfdashboard_window_tracker_get_windows(self); iter; iter=g_list_next(iter))
+	/* Call virtual function */
+	if(iface->get_workspaces)
 	{
-		/* Get window */
-		window=XFDASHBOARD_WINDOW_TRACKER_WINDOW(iter->data);
-		if(!window) continue;
-
-		/* If application was suspended disconnect signal handlers ... */
-		if(priv->isAppSuspended)
-		{
-			g_signal_handlers_block_by_func(window, _xfdashboard_window_tracker_on_window_geometry_changed, self);
-		}
-			/* ... otherwise if application was resumed reconnect signals handlers
-			 * and emit 'geometry-changed' signal to reflect latest changes of
-			 * position and size of window.
-			 */
-			else
-			{
-				/* Reconnect signal handler */
-				g_signal_handlers_unblock_by_func(window, _xfdashboard_window_tracker_on_window_geometry_changed, self);
-
-				/* Call signal handler to reflect latest changes */
-				_xfdashboard_window_tracker_on_window_geometry_changed(self, window);
-			}
+		return(iface->get_workspaces(self));
 	}
-}
-
-/* IMPLEMENTATION: GObject */
-
-/* Dispose this object */
-static void _xfdashboard_window_tracker_dispose_free_monitor(gpointer inData, gpointer inUserData)
-{
-	XfdashboardWindowTracker				*self;
-	XfdashboardWindowTrackerMonitor			*monitor;
 
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER_MONITOR(inData));
-	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(inUserData));
-
-	self=XFDASHBOARD_WINDOW_TRACKER(inUserData);
-	monitor=XFDASHBOARD_WINDOW_TRACKER_MONITOR(inData);
-
-	/* Unreference monitor */
-	_xfdashboard_window_tracker_monitor_free(self, monitor);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_workspaces");
+	return(NULL);
 }
 
-static void _xfdashboard_window_tracker_dispose(GObject *inObject)
+/* Get active workspace */
+XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_get_active_workspace(XfdashboardWindowTracker *self)
 {
-	XfdashboardWindowTracker				*self=XFDASHBOARD_WINDOW_TRACKER(inObject);
-	XfdashboardWindowTrackerPrivate			*priv=self->priv;
+	XfdashboardWindowTrackerInterface		*iface;
 
-	/* Dispose allocated resources */
-	if(priv->suspendSignalID)
-	{
-		g_signal_handler_disconnect(xfdashboard_application_get_default(), priv->suspendSignalID);
-		priv->suspendSignalID=0;
-	}
-
-	if(priv->primaryMonitor)
-	{
-		priv->primaryMonitor=NULL;
-	}
-
-	if(priv->monitors)
-	{
-		g_list_foreach(priv->monitors, _xfdashboard_window_tracker_dispose_free_monitor, self);
-		g_list_free(priv->monitors);
-		priv->monitors=NULL;
-	}
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
 
-	if(priv->gdkScreen)
-	{
-		g_signal_handlers_disconnect_by_data(priv->gdkScreen, self);
-		priv->gdkScreen=NULL;
-	}
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-	if(priv->screen)
+	/* Call virtual function */
+	if(iface->get_active_workspace)
 	{
-		/* TODO:
-		 * - Disconnect from all windows
-		 * - Disconnect from all workspaces
-		 */
-		g_signal_handlers_disconnect_by_data(priv->screen, self);
-		priv->screen=NULL;
+		return(iface->get_active_workspace(self));
 	}
 
-	/* Call parent's class dispose method */
-	G_OBJECT_CLASS(xfdashboard_window_tracker_parent_class)->dispose(inObject);
-}
-
-/* Set/get properties */
-static void _xfdashboard_window_tracker_set_property(GObject *inObject,
-														guint inPropID,
-														const GValue *inValue,
-														GParamSpec *inSpec)
-{
-	switch(inPropID)
-	{
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(inObject, inPropID, inSpec);
-			break;
-	}
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_active_workspace");
+	return(NULL);
 }
 
-static void _xfdashboard_window_tracker_get_property(GObject *inObject,
-														guint inPropID,
-														GValue *outValue,
-														GParamSpec *inSpec)
+/* Get workspace by number */
+XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_get_workspace_by_number(XfdashboardWindowTracker *self,
+																						gint inNumber)
 {
-	XfdashboardWindowTracker			*self=XFDASHBOARD_WINDOW_TRACKER(inObject);
-
-	switch(inPropID)
-	{
-		case PROP_ACTIVE_WINDOW:
-			g_value_set_object(outValue, self->priv->activeWindow);
-			break;
+	XfdashboardWindowTrackerInterface		*iface;
 
-		case PROP_ACTIVE_WORKSPACE:
-			g_value_set_object(outValue, self->priv->activeWorkspace);
-			break;
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
+	g_return_val_if_fail(inNumber>=0, NULL);
+	g_return_val_if_fail(inNumber<xfdashboard_window_tracker_get_workspaces_count(self), NULL);
 
-		case PROP_PRIMARY_MONITOR:
-			g_value_set_object(outValue, self->priv->primaryMonitor);
-			break;
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID(inObject, inPropID, inSpec);
-			break;
+	/* Call virtual function */
+	if(iface->get_workspace_by_number)
+	{
+		return(iface->get_workspace_by_number(self, inNumber));
 	}
-}
 
-/* Class initialization
- * Override functions in parent classes and define properties
- * and signals
- */
-void xfdashboard_window_tracker_class_init(XfdashboardWindowTrackerClass *klass)
-{
-	GObjectClass		*gobjectClass=G_OBJECT_CLASS(klass);
-
-	/* Override functions */
-	gobjectClass->dispose=_xfdashboard_window_tracker_dispose;
-	gobjectClass->set_property=_xfdashboard_window_tracker_set_property;
-	gobjectClass->get_property=_xfdashboard_window_tracker_get_property;
-
-	/* Set up private structure */
-	g_type_class_add_private(klass, sizeof(XfdashboardWindowTrackerPrivate));
-
-	/* Define properties */
-	XfdashboardWindowTrackerProperties[PROP_ACTIVE_WINDOW]=
-		g_param_spec_object("active-window",
-							_("Active window"),
-							_("The current active window"),
-							WNCK_TYPE_WINDOW,
-							G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowTrackerProperties[PROP_ACTIVE_WORKSPACE]=
-		g_param_spec_object("active-workspace",
-							_("Active workspace"),
-							_("The current active workspace"),
-							WNCK_TYPE_WORKSPACE,
-							G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-
-	XfdashboardWindowTrackerProperties[PROP_PRIMARY_MONITOR]=
-		g_param_spec_object("primary-monitor",
-							_("Primary monitor"),
-							_("The current primary monitor"),
-							XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR,
-							G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-
-	g_object_class_install_properties(gobjectClass, PROP_LAST, XfdashboardWindowTrackerProperties);
-
-	/* Define signals */
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_STACKING_CHANGED]=
-		g_signal_new("window-stacking-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_stacking_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__VOID,
-						G_TYPE_NONE,
-						0);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_ACTIVE_WINDOW_CHANGED]=
-		g_signal_new("active-window-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, active_window_changed),
-						NULL,
-						NULL,
-						_xfdashboard_marshal_VOID__OBJECT_OBJECT,
-						G_TYPE_NONE,
-						2,
-						WNCK_TYPE_WINDOW,
-						WNCK_TYPE_WINDOW);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_OPENED]=
-		g_signal_new("window-opened",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_opened),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WINDOW);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_CLOSED]=
-		g_signal_new("window-closed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_closed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WINDOW);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_GEOMETRY_CHANGED]=
-		g_signal_new("window-geometry-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_geometry_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WINDOW);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_ACTIONS_CHANGED]=
-		g_signal_new("window-actions-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_actions_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WINDOW);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_STATE_CHANGED]=
-		g_signal_new("window-state-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_state_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WINDOW);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_ICON_CHANGED]=
-		g_signal_new("window-icon-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_icon_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WINDOW);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_NAME_CHANGED]=
-		g_signal_new("window-name-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_name_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WINDOW);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_WORKSPACE_CHANGED]=
-		g_signal_new("window-workspace-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_workspace_changed),
-						NULL,
-						NULL,
-						_xfdashboard_marshal_VOID__OBJECT_OBJECT,
-						G_TYPE_NONE,
-						2,
-						WNCK_TYPE_WINDOW,
-						WNCK_TYPE_WORKSPACE);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WINDOW_MONITOR_CHANGED]=
-		g_signal_new("window-monitor-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, window_monitor_changed),
-						NULL,
-						NULL,
-						_xfdashboard_marshal_VOID__OBJECT_OBJECT_OBJECT,
-						G_TYPE_NONE,
-						3,
-						WNCK_TYPE_WINDOW,
-						XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR,
-						XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_ACTIVE_WORKSPACE_CHANGED]=
-		g_signal_new("active-workspace-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, active_workspace_changed),
-						NULL,
-						NULL,
-						_xfdashboard_marshal_VOID__OBJECT_OBJECT,
-						G_TYPE_NONE,
-						2,
-						WNCK_TYPE_WORKSPACE,
-						WNCK_TYPE_WORKSPACE);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WORKSPACE_ADDED]=
-		g_signal_new("workspace-added",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, workspace_added),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WORKSPACE);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WORKSPACE_REMOVED]=
-		g_signal_new("workspace-removed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, workspace_removed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WORKSPACE);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_WORKSPACE_NAME_CHANGED]=
-		g_signal_new("workspace-name-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, workspace_name_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						WNCK_TYPE_WORKSPACE);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_PRIMARY_MONITOR_CHANGED]=
-		g_signal_new("primary-monitor-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, primary_monitor_changed),
-						NULL,
-						NULL,
-						_xfdashboard_marshal_VOID__OBJECT_OBJECT,
-						G_TYPE_NONE,
-						2,
-						XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR,
-						XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_MONITOR_ADDED]=
-		g_signal_new("monitor-added",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, monitor_added),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_MONITOR_REMOVED]=
-		g_signal_new("monitor-removed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, monitor_removed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_MONITOR_GEOMETRY_CHANGED]=
-		g_signal_new("monitor-geometry-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, monitor_geometry_changed),
-						NULL,
-						NULL,
-						g_cclosure_marshal_VOID__OBJECT,
-						G_TYPE_NONE,
-						1,
-						XFDASHBOARD_TYPE_WINDOW_TRACKER_MONITOR);
-
-	XfdashboardWindowTrackerSignals[SIGNAL_SCREEN_SIZE_CHANGED]=
-		g_signal_new("screen-size-changed",
-						G_TYPE_FROM_CLASS(klass),
-						G_SIGNAL_RUN_LAST,
-						G_STRUCT_OFFSET(XfdashboardWindowTrackerClass, screen_size_changed),
-						NULL,
-						NULL,
-						_xfdashboard_marshal_VOID__INT_INT,
-						G_TYPE_NONE,
-						2,
-						G_TYPE_INT,
-						G_TYPE_INT);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_workspace_by_number");
+	return(NULL);
 }
 
-/* Object initialization
- * Create private structure and set up default values
- */
-void xfdashboard_window_tracker_init(XfdashboardWindowTracker *self)
+/* Determine if multiple monitors are supported */
+gboolean xfdashboard_window_tracker_supports_multiple_monitors(XfdashboardWindowTracker *self)
 {
-	XfdashboardWindowTrackerPrivate			*priv;
-	XfdashboardApplication					*app;
-
-	priv=self->priv=XFDASHBOARD_WINDOW_TRACKER_GET_PRIVATE(self);
-
-	XFDASHBOARD_DEBUG(self, WINDOWS, "Initializing window tracker");
-
-	/* Set default values */
-	priv->screen=wnck_screen_get_default();
-	priv->gdkScreen=gdk_screen_get_default();
-	priv->activeWindow=NULL;
-	priv->activeWorkspace=NULL;
-	priv->primaryMonitor=NULL;
-	priv->monitors=NULL;
-	priv->supportsMultipleMonitors=FALSE;
-
-	/* The very first call to libwnck should be setting the client type */
-	wnck_set_client_type(WNCK_CLIENT_TYPE_PAGER);
-
-	/* Connect signals to screen */
-	g_signal_connect_swapped(priv->screen,
-								"window-stacking-changed",
-								G_CALLBACK(_xfdashboard_window_tracker_on_window_stacking_changed),
-								self);
-
-	g_signal_connect_swapped(priv->screen,
-								"window-closed",
-								G_CALLBACK(_xfdashboard_window_tracker_on_window_closed),
-								self);
-	g_signal_connect_swapped(priv->screen,
-								"window-opened",
-								G_CALLBACK(_xfdashboard_window_tracker_on_window_opened),
-								self);
-	g_signal_connect_swapped(priv->screen,
-								"active-window-changed",
-								G_CALLBACK(_xfdashboard_window_tracker_on_active_window_changed),
-								self);
-
-	g_signal_connect_swapped(priv->screen,
-								"workspace-destroyed",
-								G_CALLBACK(_xfdashboard_window_tracker_on_workspace_destroyed),
-								self);
-	g_signal_connect_swapped(priv->screen,
-								"workspace-created",
-								G_CALLBACK(_xfdashboard_window_tracker_on_workspace_created),
-								self);
-	g_signal_connect_swapped(priv->screen,
-								"active-workspace-changed",
-								G_CALLBACK(_xfdashboard_window_tracker_on_active_workspace_changed),
-								self);
-
-	g_signal_connect_swapped(priv->gdkScreen,
-								"size-changed",
-								G_CALLBACK(_xfdashboard_window_tracker_on_screen_size_changed),
-								self);
-
-#ifdef HAVE_XINERAMA
-	/* Check if multiple monitors are supported */
-	if(XineramaIsActive(GDK_SCREEN_XDISPLAY(priv->gdkScreen)))
-	{
-		XfdashboardWindowTrackerMonitor		*monitor;
-		gint								i;
-
-		/* Set flag that multiple monitors are supported */
-		priv->supportsMultipleMonitors=TRUE;
-
-		/* This signal must be called at least after the default signal handler - best at last.
-		 * The reason is that all other signal handler should been processed because this handler
-		 * could destroy monitor instances even the one of the primary monitor if it was not
-		 * handled before. So give the other signal handlers a chance ;)
-		 */
-		g_signal_connect_data(priv->gdkScreen,
-								"monitors-changed",
-								G_CALLBACK(_xfdashboard_window_tracker_on_monitors_changed),
-								self,
-								NULL,
-								G_CONNECT_AFTER | G_CONNECT_SWAPPED);
-
-		/* Get monitors */
-		for(i=0; i<gdk_screen_get_n_monitors(priv->gdkScreen); i++)
-		{
-			/* Create monitor object */
-			monitor=_xfdashboard_window_tracker_monitor_new(self, i);
-
-			/* Remember primary monitor */
-			if(xfdashboard_window_tracker_monitor_is_primary(monitor))
-			{
-				priv->primaryMonitor=monitor;
-			}
-		}
-	}
-#endif
+	XfdashboardWindowTrackerInterface		*iface;
 
-	/* Handle suspension signals from application */
-	app=xfdashboard_application_get_default();
-	priv->suspendSignalID=g_signal_connect_swapped(app,
-													"notify::is-suspended",
-													G_CALLBACK(_xfdashboard_window_tracker_on_application_suspended_changed),
-													self);
-	priv->isAppSuspended=xfdashboard_application_is_suspended(app);
-}
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), FALSE);
 
-/* IMPLEMENTATION: Public API */
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-/* Create new instance */
-XfdashboardWindowTracker* xfdashboard_window_tracker_get_default(void)
-{
-	if(G_UNLIKELY(_xfdashboard_window_tracker_singleton==NULL))
+	/* Call virtual function */
+	if(iface->supports_multiple_monitors)
 	{
-		_xfdashboard_window_tracker_singleton=
-			XFDASHBOARD_WINDOW_TRACKER(g_object_new(XFDASHBOARD_TYPE_WINDOW_TRACKER, NULL));
+		return(iface->supports_multiple_monitors(self));
 	}
-		else g_object_ref(_xfdashboard_window_tracker_singleton);
-
-	return(_xfdashboard_window_tracker_singleton);
 
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "supports_multiple_monitors");
+	return(FALSE);
 }
 
-/* Get last timestamp for use in libwnck */
-guint32 xfdashboard_window_tracker_get_time(void)
+/* Get number of monitors */
+gint xfdashboard_window_tracker_get_monitors_count(XfdashboardWindowTracker *self)
 {
-	const ClutterEvent		*currentClutterEvent;
-	guint32					timestamp;
-	GdkDisplay				*display;
-	GdkWindow				*window;
-	GdkEventMask			eventMask;
-	GSList					*stages, *entry;
-	ClutterStage			*stage;
-
-	/* We don't use clutter_get_current_event_time as it can return
-	 * a too old timestamp if there is no current event.
-	 */
-	currentClutterEvent=clutter_get_current_event();
-	if(currentClutterEvent!=NULL) return(clutter_event_get_time(currentClutterEvent));
-
-	/* Next we try timestamp of last GTK+ event */
-	timestamp=gtk_get_current_event_time();
-	if(timestamp>0) return(timestamp);
-
-	/* Next we try to ask GDK for a timestamp */
-	timestamp=gdk_x11_display_get_user_time(gdk_display_get_default());
-	if(timestamp>0) return(timestamp);
-
-	/* Next we try to retrieve timestamp of last X11 event in clutter */
-	XFDASHBOARD_DEBUG(_xfdashboard_window_tracker_singleton, WINDOWS, "No timestamp for windows - trying timestamp of last X11 event in Clutter");
-	timestamp=(guint32)clutter_x11_get_current_event_time();
-	if(timestamp!=0)
-	{
-		XFDASHBOARD_DEBUG(_xfdashboard_window_tracker_singleton, WINDOWS,
-							"Got timestamp %u of last X11 event in Clutter",
-							timestamp);
-		return(timestamp);
-	}
+	XfdashboardWindowTrackerInterface		*iface;
 
-	/* Last resort is to get X11 server time via stage windows */
-	XFDASHBOARD_DEBUG(_xfdashboard_window_tracker_singleton, WINDOWS, "No timestamp for windows - trying last resort via stage windows");
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), 0);
 
-	display=gdk_display_get_default();
-	if(!display)
-	{
-		XFDASHBOARD_DEBUG(_xfdashboard_window_tracker_singleton, WINDOWS, "No default display found in GDK to get timestamp for windows");
-		return(0);
-	}
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-	/* Iterate through stages, get their GDK window and try to retrieve timestamp */
-	timestamp=0;
-	stages=clutter_stage_manager_list_stages(clutter_stage_manager_get_default());
-	for(entry=stages; timestamp==0 && entry; entry=g_slist_next(entry))
+	/* Call virtual function */
+	if(iface->get_monitors_count)
 	{
-		/* Get stage */
-		stage=CLUTTER_STAGE(entry->data);
-		if(stage)
-		{
-			/* Get GDK window of stage */
-			window=gdk_x11_window_lookup_for_display(display, clutter_x11_get_stage_window(stage));
-			if(!window)
-			{
-				XFDASHBOARD_DEBUG(_xfdashboard_window_tracker_singleton, WINDOWS,
-									"No GDK window found for stage %p to get timestamp for windows",
-									stage);
-				continue;
-			}
-
-			/* Check if GDK window supports GDK_PROPERTY_CHANGE_MASK event
-			 * or application (or worst X server) will hang
-			 */
-			eventMask=gdk_window_get_events(window);
-			if(!(eventMask & GDK_PROPERTY_CHANGE_MASK))
-			{
-				XFDASHBOARD_DEBUG(_xfdashboard_window_tracker_singleton, WINDOWS,
-									"GDK window %p for stage %p does not support GDK_PROPERTY_CHANGE_MASK to get timestamp for windows",
-									window,
-									stage);
-				continue;
-			}
-
-			timestamp=gdk_x11_get_server_time(window);
-		}
+		return(iface->get_monitors_count(self));
 	}
-	g_slist_free(stages);
-
-	/* Return timestamp of last resort */
-	XFDASHBOARD_DEBUG(_xfdashboard_window_tracker_singleton, WINDOWS,
-						"Last resort timestamp for windows %s (%u)",
-						timestamp ? "found" : "not found",
-						timestamp);
-	return(timestamp);
-}
-
-/* Get list of all windows (if wanted in stack order) */
-GList* xfdashboard_window_tracker_get_windows(XfdashboardWindowTracker *self)
-{
-	XfdashboardWindowTrackerPrivate		*priv;
 
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
-
-	priv=self->priv;
-
-	/* Return list of window (should be in order as they were opened) */
-	return(wnck_screen_get_windows(priv->screen));
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_monitors_count");
+	return(0);
 }
 
-GList* xfdashboard_window_tracker_get_windows_stacked(XfdashboardWindowTracker *self)
+/* Get list of monitors */
+GList* xfdashboard_window_tracker_get_monitors(XfdashboardWindowTracker *self)
 {
-	XfdashboardWindowTrackerPrivate		*priv;
+	XfdashboardWindowTrackerInterface		*iface;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
 
-	priv=self->priv;
-
-	/* Return list of window in stack order */
-	return(wnck_screen_get_windows_stacked(priv->screen));
-}
-
-/* Get active window */
-XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_get_active_window(XfdashboardWindowTracker *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
-
-	return(self->priv->activeWindow);
-}
-
-/* Get number of workspaces */
-gint xfdashboard_window_tracker_get_workspaces_count(XfdashboardWindowTracker *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), 0);
-
-	/* Return number of workspaces */
-	return(wnck_screen_get_workspace_count(self->priv->screen));
-}
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-/* Get list of workspaces */
-GList* xfdashboard_window_tracker_get_workspaces(XfdashboardWindowTracker *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
+	/* Call virtual function */
+	if(iface->get_monitors)
+	{
+		return(iface->get_monitors(self));
+	}
 
-	/* Return list of workspaces */
-	return(wnck_screen_get_workspaces(self->priv->screen));
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_monitors");
+	return(NULL);
 }
 
-/* Get workspace by number */
-XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_get_workspace_by_number(XfdashboardWindowTracker *self,
-																						gint inNumber)
+/* Get primary monitor */
+XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_get_primary_monitor(XfdashboardWindowTracker *self)
 {
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
-	g_return_val_if_fail(inNumber>=0 && inNumber<wnck_screen_get_workspace_count(self->priv->screen), NULL);
+	XfdashboardWindowTrackerInterface		*iface;
 
-	/* Return list of workspaces */
-	return(wnck_screen_get_workspace(self->priv->screen, inNumber));
-}
-
-/* Get active workspace */
-XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_get_active_workspace(XfdashboardWindowTracker *self)
-{
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
 
-	return(self->priv->activeWorkspace);
-}
-
-/* Determine if multiple monitors are supported */
-gboolean xfdashboard_window_tracker_supports_multiple_monitors(XfdashboardWindowTracker *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), FALSE);
-
-	return(self->priv->supportsMultipleMonitors);
-}
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-/* Get number of monitors */
-gint xfdashboard_window_tracker_get_monitors_count(XfdashboardWindowTracker *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), 0);
-
-	/* Return number of monitors */
-	return(g_list_length(self->priv->monitors));
-}
-
-/* Get list of monitors */
-GList* xfdashboard_window_tracker_get_monitors(XfdashboardWindowTracker *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
+	/* Call virtual function */
+	if(iface->get_primary_monitor)
+	{
+		return(iface->get_primary_monitor(self));
+	}
 
-	/* Return list of workspaces */
-	return(self->priv->monitors);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_primary_monitor");
+	return(NULL);
 }
 
 /* Get monitor by number */
 XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_get_monitor_by_number(XfdashboardWindowTracker *self,
 																					gint inNumber)
 {
+	XfdashboardWindowTrackerInterface		*iface;
+
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
 	g_return_val_if_fail(inNumber>=0, NULL);
-	g_return_val_if_fail(((guint)inNumber)<g_list_length(self->priv->monitors), NULL);
+	g_return_val_if_fail(inNumber<xfdashboard_window_tracker_get_monitors_count(self), NULL);
 
-	/* Return monitor at index */
-	return(g_list_nth_data(self->priv->monitors, inNumber));
-}
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-/* Get primary monitor */
-XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_get_primary_monitor(XfdashboardWindowTracker *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
+	/* Call virtual function */
+	if(iface->get_monitor_by_number)
+	{
+		return(iface->get_monitor_by_number(self, inNumber));
+	}
 
-	return(self->priv->primaryMonitor);
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_monitor_by_number");
+	return(NULL);
 }
 
-/* Get monitor at requested position */
+/* Get monitor at position */
 XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_get_monitor_by_position(XfdashboardWindowTracker *self,
-																					gint inX,
-																					gint inY)
+																						gint inX,
+																						gint inY)
 {
-	XfdashboardWindowTrackerPrivate		*priv;
-	GList								*iter;
-	XfdashboardWindowTrackerMonitor		*monitor;
+	XfdashboardWindowTrackerInterface		*iface;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
 
-	priv=self->priv;
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-	/* Iterate through monitors and return the one containing the requested position */
-	for(iter=priv->monitors; iter; iter=g_list_next(iter))
+	/* Call virtual function */
+	if(iface->get_monitor_by_position)
 	{
-		/* Get monitor at iterator */
-		monitor=XFDASHBOARD_WINDOW_TRACKER_MONITOR(iter->data);
-		if(!monitor) continue;
-
-		/* Check if this monitor contains the requested position. If it does
-		 * then return it.
-		 */
-		if(xfdashboard_window_tracker_monitor_contains(monitor, inX, inY))
-		{
-			return(monitor);
-		}
+		return(iface->get_monitor_by_position(self, inX, inY));
 	}
 
-	/* If we get here none of the monitors contains the requested position,
-	 * so return NULL here.
-	 */
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_monitor_by_position");
 	return(NULL);
 }
 
-/* Get width of screen */
-gint xfdashboard_window_tracker_get_screen_width(XfdashboardWindowTracker *self)
+/* Get width and height of screen */
+void xfdashboard_window_tracker_get_screen_size(XfdashboardWindowTracker *self, gint *outWidth, gint *outHeight)
 {
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), 0);
+	XfdashboardWindowTrackerInterface		*iface;
+	gint									width, height;
 
-	return(gdk_screen_get_width(self->priv->gdkScreen));
-}
+	g_return_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self));
 
-/* Get width of screen */
-gint xfdashboard_window_tracker_get_screen_height(XfdashboardWindowTracker *self)
-{
-	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), 0);
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->get_screen_size)
+	{
+		/* Get screen size */
+		iface->get_screen_size(self, &width, &height);
 
-	return(gdk_screen_get_height(self->priv->gdkScreen));
+		/* Store result where possible */
+		if(outWidth) *outWidth=width;
+		if(outHeight) *outHeight=height;
+
+		return;
+	}
+
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_screen_width");
 }
 
 /* Get root (desktop) window */
 XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_get_root_window(XfdashboardWindowTracker *self)
 {
-	XfdashboardWindowTrackerPrivate		*priv;
-	gulong								backgroundWindowID;
-	GList								*windows;
+	XfdashboardWindowTrackerInterface		*iface;
 
 	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
 
-	priv=self->priv;
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
 
-	/* Find and return root window (the desktop) by known ID */
-	backgroundWindowID=wnck_screen_get_background_pixmap(priv->screen);
-	if(backgroundWindowID)
+	/* Call virtual function */
+	if(iface->get_root_window)
 	{
-		WnckWindow						*backgroundWindow;
-
-		backgroundWindow=wnck_window_get(backgroundWindowID);
-		if(backgroundWindow)
-		{
-			XFDASHBOARD_DEBUG(self, WINDOWS, "Found desktop window by known background pixmap ID");
-			return(XFDASHBOARD_WINDOW_TRACKER_WINDOW(backgroundWindow));
-		}
+		return(iface->get_root_window(self));
 	}
 
-	/* Either there was no known ID for the root window or the root window
-	 * could not be found (happened a lot when running in daemon mode).
-	 * So iterate through list of all known windows and lookup window of
-	 * type 'desktop'.
-	 */
-	for(windows=wnck_screen_get_windows(priv->screen); windows; windows=g_list_next(windows))
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_root_window");
+	return(NULL);
+}
+
+/* Get window of stage*/
+XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_get_stage_window(XfdashboardWindowTracker *self,
+																			ClutterStage *inStage)
+{
+	XfdashboardWindowTrackerInterface		*iface;
+
+	g_return_val_if_fail(XFDASHBOARD_IS_WINDOW_TRACKER(self), NULL);
+	g_return_val_if_fail(CLUTTER_IS_STAGE(inStage), NULL);
+
+	iface=XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(self);
+
+	/* Call virtual function */
+	if(iface->get_stage_window)
 	{
-		WnckWindow					*window;
-		WnckWindowType				windowType;
-
-		window=(WnckWindow*)windows->data;
-		windowType=wnck_window_get_window_type(window);
-		if(windowType==WNCK_WINDOW_DESKTOP)
-		{
-			XFDASHBOARD_DEBUG(self, WINDOWS, "Desktop window ID found while iterating through window list");
-				return(XFDASHBOARD_WINDOW_TRACKER_WINDOW(window));
-		}
+		return(iface->get_stage_window(self, inStage));
 	}
 
-	/* If we get here either desktop window does not exist or is not known
-	 * in window list. So return NULL here.
-	 */
-	XFDASHBOARD_DEBUG(self, WINDOWS, "Desktop window could not be found");
+	/* If we get here the virtual function was not overridden */
+	XFDASHBOARD_WINDOWS_TRACKER_WARN_NOT_IMPLEMENTED(self, "get_stage_window");
 	return(NULL);
 }
diff --git a/libxfdashboard/window-tracker.h b/libxfdashboard/window-tracker.h
index 2d4f7c8..ae79f3f 100644
--- a/libxfdashboard/window-tracker.h
+++ b/libxfdashboard/window-tracker.h
@@ -1,13 +1,8 @@
 /*
  * window-tracker: Tracks windows, workspaces, monitors and
- *                 listens for changes. It also bundles libwnck into one
- *                 class.
- *                 By wrapping libwnck objects we can use a virtual
- *                 stable API while the API in libwnck changes within versions.
- *                 We only need to use #ifdefs in window tracker object
- *                 and nowhere else in the code.
+ *                 listens for changes.
  * 
- * Copyright 2012-2017 Stephan Haller <nomad at froevel.de>
+ * Copyright 2012-2016 Stephan Haller <nomad at froevel.de>
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -45,32 +40,41 @@ G_BEGIN_DECLS
 #define XFDASHBOARD_TYPE_WINDOW_TRACKER				(xfdashboard_window_tracker_get_type())
 #define XFDASHBOARD_WINDOW_TRACKER(obj)				(G_TYPE_CHECK_INSTANCE_CAST((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER, XfdashboardWindowTracker))
 #define XFDASHBOARD_IS_WINDOW_TRACKER(obj)			(G_TYPE_CHECK_INSTANCE_TYPE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER))
-#define XFDASHBOARD_WINDOW_TRACKER_CLASS(klass)		(G_TYPE_CHECK_CLASS_CAST((klass), XFDASHBOARD_TYPE_WINDOW_TRACKER, XfdashboardWindowTrackerClass))
-#define XFDASHBOARD_IS_WINDOW_TRACKER_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), XFDASHBOARD_TYPE_WINDOW_TRACKER))
-#define XFDASHBOARD_WINDOW_TRACKER_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER, XfdashboardWindowTrackerClass))
+#define XFDASHBOARD_WINDOW_TRACKER_GET_IFACE(obj)	(G_TYPE_INSTANCE_GET_INTERFACE((obj), XFDASHBOARD_TYPE_WINDOW_TRACKER, XfdashboardWindowTrackerInterface))
 
 typedef struct _XfdashboardWindowTracker			XfdashboardWindowTracker;
-typedef struct _XfdashboardWindowTrackerClass		XfdashboardWindowTrackerClass;
-typedef struct _XfdashboardWindowTrackerPrivate		XfdashboardWindowTrackerPrivate;
+typedef struct _XfdashboardWindowTrackerInterface	XfdashboardWindowTrackerInterface;
 
-struct _XfdashboardWindowTracker
+struct _XfdashboardWindowTrackerInterface
 {
 	/*< private >*/
-	/* Parent instance */
-	GObject								parent_instance;
-
-	/* Private structure */
-	XfdashboardWindowTrackerPrivate		*priv;
-};
-
-struct _XfdashboardWindowTrackerClass
-{
-	/*< private >*/
-	/* Parent class */
-	GObjectClass						parent_class;
+	/* Parent interface */
+	GTypeInterface						parent_interface;
 
 	/*< public >*/
 	/* Virtual functions */
+	GList* (*get_windows)(XfdashboardWindowTracker *self);
+	GList* (*get_windows_stacked)(XfdashboardWindowTracker *self);
+	XfdashboardWindowTrackerWindow* (*get_active_window)(XfdashboardWindowTracker *self);
+
+	gint (*get_workspaces_count)(XfdashboardWindowTracker *self);
+	GList* (*get_workspaces)(XfdashboardWindowTracker *self);
+	XfdashboardWindowTrackerWorkspace* (*get_active_workspace)(XfdashboardWindowTracker *self);
+	XfdashboardWindowTrackerWorkspace* (*get_workspace_by_number)(XfdashboardWindowTracker *self, gint inNumber);
+
+	gboolean (*supports_multiple_monitors)(XfdashboardWindowTracker *self);
+	gint (*get_monitors_count)(XfdashboardWindowTracker *self);
+	GList* (*get_monitors)(XfdashboardWindowTracker *self);
+	XfdashboardWindowTrackerMonitor* (*get_primary_monitor)(XfdashboardWindowTracker *self);
+	XfdashboardWindowTrackerMonitor* (*get_monitor_by_number)(XfdashboardWindowTracker *self, gint inNumber);
+	XfdashboardWindowTrackerMonitor* (*get_monitor_by_position)(XfdashboardWindowTracker *self, gint inX, gint inY);
+
+	void (*get_screen_size)(XfdashboardWindowTracker *self, gint *outWidth, gint *outHeight);
+
+	XfdashboardWindowTrackerWindow* (*get_root_window)(XfdashboardWindowTracker *self);
+	XfdashboardWindowTrackerWindow* (*get_stage_window)(XfdashboardWindowTracker *self, ClutterStage *inStage);
+
+	/* Signals */
 	void (*window_stacking_changed)(XfdashboardWindowTracker *self);
 
 	void (*active_window_changed)(XfdashboardWindowTracker *self,
@@ -104,6 +108,7 @@ struct _XfdashboardWindowTrackerClass
 	void (*monitor_added)(XfdashboardWindowTracker *self, XfdashboardWindowTrackerMonitor *inMonitor);
 	void (*monitor_removed)(XfdashboardWindowTracker *self, XfdashboardWindowTrackerMonitor *inMonitor);
 	void (*monitor_geometry_changed)(XfdashboardWindowTracker *self, XfdashboardWindowTrackerMonitor *inMonitor);
+
 	void (*screen_size_changed)(XfdashboardWindowTracker *self, gint inWidth, gint inHeight);
 };
 
@@ -112,32 +117,33 @@ GType xfdashboard_window_tracker_get_type(void) G_GNUC_CONST;
 
 XfdashboardWindowTracker* xfdashboard_window_tracker_get_default(void);
 
-guint32 xfdashboard_window_tracker_get_time(void);
-
 GList* xfdashboard_window_tracker_get_windows(XfdashboardWindowTracker *self);
 GList* xfdashboard_window_tracker_get_windows_stacked(XfdashboardWindowTracker *self);
 XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_get_active_window(XfdashboardWindowTracker *self);
 
 gint xfdashboard_window_tracker_get_workspaces_count(XfdashboardWindowTracker *self);
 GList* xfdashboard_window_tracker_get_workspaces(XfdashboardWindowTracker *self);
+XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_get_active_workspace(XfdashboardWindowTracker *self);
 XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_get_workspace_by_number(XfdashboardWindowTracker *self,
 																						gint inNumber);
-XfdashboardWindowTrackerWorkspace* xfdashboard_window_tracker_get_active_workspace(XfdashboardWindowTracker *self);
 
 gboolean xfdashboard_window_tracker_supports_multiple_monitors(XfdashboardWindowTracker *self);
 gint xfdashboard_window_tracker_get_monitors_count(XfdashboardWindowTracker *self);
 GList* xfdashboard_window_tracker_get_monitors(XfdashboardWindowTracker *self);
+XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_get_primary_monitor(XfdashboardWindowTracker *self);
 XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_get_monitor_by_number(XfdashboardWindowTracker *self,
 																					gint inNumber);
-XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_get_primary_monitor(XfdashboardWindowTracker *self);
 XfdashboardWindowTrackerMonitor* xfdashboard_window_tracker_get_monitor_by_position(XfdashboardWindowTracker *self,
-																					gint inX,
-																					gint inY);
+																						gint inX,
+																						gint inY);
 
-gint xfdashboard_window_tracker_get_screen_width(XfdashboardWindowTracker *self);
-gint xfdashboard_window_tracker_get_screen_height(XfdashboardWindowTracker *self);
+void xfdashboard_window_tracker_get_screen_size(XfdashboardWindowTracker *self,
+													gint *outWidth,
+													gint *outHeight);
 
 XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_get_root_window(XfdashboardWindowTracker *self);
+XfdashboardWindowTrackerWindow* xfdashboard_window_tracker_get_stage_window(XfdashboardWindowTracker *self,
+																			ClutterStage *inStage);
 
 G_END_DECLS
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list