summaryrefslogtreecommitdiff
path: root/applets/wncklet
diff options
context:
space:
mode:
Diffstat (limited to 'applets/wncklet')
-rw-r--r--applets/wncklet/Makefile.am20
-rw-r--r--applets/wncklet/showdesktop.c5
-rw-r--r--applets/wncklet/window-list.c5
-rw-r--r--applets/wncklet/window-menu.c4
-rw-r--r--applets/wncklet/wncklet.c8
5 files changed, 38 insertions, 4 deletions
diff --git a/applets/wncklet/Makefile.am b/applets/wncklet/Makefile.am
index 137e471b..a59b1192 100644
--- a/applets/wncklet/Makefile.am
+++ b/applets/wncklet/Makefile.am
@@ -19,12 +19,18 @@ WNCKLET_SOURCES = \
window-menu.h \
window-list.c \
window-list.h \
- workspace-switcher.c \
- workspace-switcher.h \
showdesktop.c \
showdesktop.h \
$(BUILT_SOURCES)
+if ENABLE_X11
+WNCKLET_SOURCES += \
+ workspace-switcher.c \
+ workspace-switcher.h
+endif
+
+
+
WNCKLET_LDADD = \
../../libmate-panel-applet/libmate-panel-applet-4.la \
$(WNCKLET_LIBS) \
@@ -93,10 +99,18 @@ ui_FILES = \
showdesktop-menu.xml \
window-list-menu.xml \
window-list.ui \
- window-menu-menu.xml \
+ window-menu-menu.xml
+
+if ENABLE_X11
+ui_FILES += \
workspace-switcher-menu.xml \
workspace-switcher.ui
+endif
+
+
+
+
wncklet-resources.c: wncklet.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/wncklet.gresource.xml)
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate --c-name wncklet $<
diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c
index 28a140b6..60142953 100644
--- a/applets/wncklet/showdesktop.c
+++ b/applets/wncklet/showdesktop.c
@@ -35,6 +35,11 @@
#include <libwnck/libwnck.h>
#endif
+#ifndef HAVE_X11
+#include <gdk/gdkwayland.h>
+#define GDK_IS_X11_DISPLAY(object) !(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_DISPLAY))
+#endif
+
#include "wncklet.h"
#include "showdesktop.h"
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index 3af47e64..c027e3f5 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -25,6 +25,11 @@
#include <libwnck/libwnck.h>
#endif /* HAVE_X11 */
+#ifndef HAVE_X11
+#include <gdk/gdkwayland.h>
+#define GDK_IS_X11_DISPLAY(object) !(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_DISPLAY))
+#endif
+
#ifdef HAVE_WAYLAND
#include <gdk/gdkwayland.h>
#include "wayland-backend.h"
diff --git a/applets/wncklet/window-menu.c b/applets/wncklet/window-menu.c
index e595dfdf..18f33f19 100644
--- a/applets/wncklet/window-menu.c
+++ b/applets/wncklet/window-menu.c
@@ -45,6 +45,10 @@
#include <gdk/gdkwayland.h>
#endif /* HAVE_WAYLAND */
+#ifndef HAVE_X11
+#define GDK_IS_X11_DISPLAY(object) !(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_DISPLAY))
+#endif
+
#include "wncklet.h"
#include "window-menu.h"
diff --git a/applets/wncklet/wncklet.c b/applets/wncklet/wncklet.c
index bede4705..1ced4507 100644
--- a/applets/wncklet/wncklet.c
+++ b/applets/wncklet/wncklet.c
@@ -35,11 +35,15 @@
#include <gdk/gdkx.h>
#define WNCK_I_KNOW_THIS_IS_UNSTABLE
#include <libwnck/libwnck.h>
+#include "workspace-switcher.h"
+#endif
+#ifndef HAVE_X11
+#include <gdk/gdkwayland.h>
+#define GDK_IS_X11_DISPLAY(object) !(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_DISPLAY))
#endif
#include "wncklet.h"
#include "window-menu.h"
-#include "workspace-switcher.h"
#include "window-list.h"
#include "showdesktop.h"
@@ -127,8 +131,10 @@ static gboolean wncklet_factory(MatePanelApplet* applet, const char* iid, gpoint
if (!strcmp(iid, "WindowMenuApplet"))
retval = window_menu_applet_fill(applet);
+#ifdef HAVE_X11
else if (!strcmp(iid, "WorkspaceSwitcherApplet") || !strcmp(iid, "PagerApplet"))
retval = workspace_switcher_applet_fill(applet);
+#endif
else if (!strcmp(iid, "WindowListApplet") || !strcmp(iid, "TasklistApplet"))
retval = window_list_applet_fill(applet);
else if (!strcmp(iid, "ShowDesktopApplet"))