summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authormark.herbert <[email protected]>2025-07-18 11:42:38 +0300
committerlukefromdc <[email protected]>2025-09-04 10:12:14 -0400
commitd68c23bd8e07612f305dcc7825f3a8ee448544f5 (patch)
treea0de3e3b98337639b75279a1d58ea52b276d82bb /applets
parent7867d2d5888f48369bc34c1182d5171c4c224b13 (diff)
downloadmate-panel-d68c23bd8e07612f305dcc7825f3a8ee448544f5.tar.bz2
mate-panel-d68c23bd8e07612f305dcc7825f3a8ee448544f5.tar.xz
Wayland-only-build attempt 3 - changes from other branch removed
Diffstat (limited to 'applets')
-rw-r--r--applets/Makefile.am4
-rw-r--r--applets/clock/clock.c5
-rw-r--r--applets/notification_area/Makefile.am28
-rw-r--r--applets/notification_area/main.c5
-rw-r--r--applets/notification_area/na-grid.c5
-rw-r--r--applets/notification_area/na-grid.h5
-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
11 files changed, 74 insertions, 20 deletions
diff --git a/applets/Makefile.am b/applets/Makefile.am
index 1f040ff9..9e6c33fc 100644
--- a/applets/Makefile.am
+++ b/applets/Makefile.am
@@ -1,7 +1,9 @@
SUBDIRS = \
clock \
fish \
- wncklet
+ wncklet \
+ notification_area
+
if ENABLE_X11
SUBDIRS += \
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 14080500..cc5ea999 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -60,6 +60,11 @@
#include <gdk/gdkx.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 <libmateweather/mateweather-prefs.h>
#include <libmateweather/location-entry.h>
#include <libmateweather/timezone-menu.h>
diff --git a/applets/notification_area/Makefile.am b/applets/notification_area/Makefile.am
index 8f6ec8d3..ff5442c6 100644
--- a/applets/notification_area/Makefile.am
+++ b/applets/notification_area/Makefile.am
@@ -1,10 +1,15 @@
SUBDIRS = \
libstatus-notifier-watcher \
- status-notifier \
- system-tray
+ status-notifier
+
+if ENABLE_X11
+SUBDIRS += \
+ system-tray
-noinst_LTLIBRARIES = libtray.la
noinst_PROGRAMS = testtray
+endif
+
+noinst_LTLIBRARIES = libtray.la
AM_CPPFLAGS = \
$(NOTIFICATION_AREA_CFLAGS) \
@@ -29,9 +34,18 @@ libtray_la_SOURCES = \
libtray_la_LIBADD = \
libstatus-notifier-watcher/libstatus-notifier-watcher.la \
- status-notifier/libstatus-notifier.la \
+ status-notifier/libstatus-notifier.la
+
+if ENABLE_X11
+libtray_la_LIBADD += \
system-tray/libsystem-tray.la
+testtray_SOURCES = testtray.c
+testtray_LDADD = \
+ libtray.la \
+ $(NOTIFICATION_AREA_LIBS)
+endif
+
NOTIFICATION_AREA_SOURCES = \
main.c \
main.h \
@@ -43,12 +57,6 @@ NOTIFICATION_AREA_LDADD = \
$(NOTIFICATION_AREA_LIBS) \
$(LIBMATE_PANEL_APPLET_LIBS)
-
-testtray_SOURCES = testtray.c
-testtray_LDADD = \
- libtray.la \
- $(NOTIFICATION_AREA_LIBS)
-
if NOTIFICATION_AREA_INPROCESS
APPLET_IN_PROCESS = true
APPLET_LOCATION = $(pkglibdir)/libnotification-area-applet.so
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 71221b65..20ef2b3c 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -23,10 +23,6 @@
#include <config.h>
-#ifndef HAVE_X11
-#error file should only be built when HAVE_X11 is enabled
-#endif
-
#include <string.h>
#include <mate-panel-applet.h>
@@ -302,7 +298,6 @@ static void
na_tray_applet_realize (GtkWidget *widget)
{
NaTrayApplet *applet = NA_TRAY_APPLET (widget);
-
if (parent_class_realize)
parent_class_realize (widget);
diff --git a/applets/notification_area/na-grid.c b/applets/notification_area/na-grid.c
index 9a4c45d9..0fa82494 100644
--- a/applets/notification_area/na-grid.c
+++ b/applets/notification_area/na-grid.c
@@ -29,7 +29,10 @@
#include "na-grid.h"
+#ifdef HAVE_X11
#include "system-tray/na-tray.h"
+#endif
+
#include "status-notifier/sn-host-v0.h"
#define MIN_ICON_SIZE_DEFAULT 24
@@ -324,6 +327,7 @@ na_grid_realize (GtkWidget *widget)
display = gdk_display_get_default ();
/* Instantiate the hosts now we have a screen */
screen = gtk_widget_get_screen (GTK_WIDGET (self));
+#ifdef HAVE_X11
if (GDK_IS_X11_DISPLAY (display))
{
GtkOrientation orientation;
@@ -337,6 +341,7 @@ na_grid_realize (GtkWidget *widget)
add_host (self, tray_host);
}
+#endif
settings = g_settings_new ("org.mate.panel");
if (g_settings_get_boolean (settings, "enable-sni-support"))
add_host (self, sn_host_v0_new ());
diff --git a/applets/notification_area/na-grid.h b/applets/notification_area/na-grid.h
index 9c8dd340..0506c3ec 100644
--- a/applets/notification_area/na-grid.h
+++ b/applets/notification_area/na-grid.h
@@ -31,6 +31,11 @@
#include <gdk/gdkx.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 <gtk/gtk.h>
G_BEGIN_DECLS
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"))