diff options
author | mark.herbert <[email protected]> | 2025-07-18 11:42:38 +0300 |
---|---|---|
committer | lukefromdc <[email protected]> | 2025-09-04 10:12:14 -0400 |
commit | d68c23bd8e07612f305dcc7825f3a8ee448544f5 (patch) | |
tree | a0de3e3b98337639b75279a1d58ea52b276d82bb | |
parent | 7867d2d5888f48369bc34c1182d5171c4c224b13 (diff) | |
download | mate-panel-d68c23bd8e07612f305dcc7825f3a8ee448544f5.tar.bz2 mate-panel-d68c23bd8e07612f305dcc7825f3a8ee448544f5.tar.xz |
-rw-r--r-- | applets/Makefile.am | 4 | ||||
-rw-r--r-- | applets/clock/clock.c | 5 | ||||
-rw-r--r-- | applets/notification_area/Makefile.am | 28 | ||||
-rw-r--r-- | applets/notification_area/main.c | 5 | ||||
-rw-r--r-- | applets/notification_area/na-grid.c | 5 | ||||
-rw-r--r-- | applets/notification_area/na-grid.h | 5 | ||||
-rw-r--r-- | applets/wncklet/Makefile.am | 20 | ||||
-rw-r--r-- | applets/wncklet/showdesktop.c | 5 | ||||
-rw-r--r-- | applets/wncklet/window-list.c | 5 | ||||
-rw-r--r-- | applets/wncklet/window-menu.c | 4 | ||||
-rw-r--r-- | applets/wncklet/wncklet.c | 8 | ||||
-rw-r--r-- | libmate-panel-applet/mate-panel-applet.c | 4 | ||||
-rw-r--r-- | mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c | 2 | ||||
-rw-r--r-- | mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c | 3 | ||||
-rw-r--r-- | mate-panel/panel-action-button.c | 3 | ||||
-rw-r--r-- | mate-panel/panel-applet-frame.c | 3 | ||||
-rw-r--r-- | mate-panel/panel-background.c | 2 | ||||
-rw-r--r-- | mate-panel/panel-layout.c | 5 | ||||
-rw-r--r-- | mate-panel/panel-multimonitor.c | 5 | ||||
-rw-r--r-- | mate-panel/panel-profile.c | 5 | ||||
-rw-r--r-- | mate-panel/panel-toplevel.c | 3 |
21 files changed, 109 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")) diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c index 48e12622..897f1726 100644 --- a/libmate-panel-applet/mate-panel-applet.c +++ b/libmate-panel-applet/mate-panel-applet.c @@ -45,6 +45,10 @@ #include <X11/Xatom.h> #include "panel-plug-private.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 "mate-panel-applet.h" #include "panel-applet-private.h" diff --git a/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c b/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c index 99346221..a11d43f4 100644 --- a/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c +++ b/mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c @@ -245,6 +245,7 @@ mate_panel_applet_frame_dbus_change_background (MatePanelAppletFrame *frame, MatePanelAppletFrameDBusPrivate *priv = dbus_frame->priv; char *bg_str; +#ifdef HAVE_X11 bg_str = _mate_panel_applet_frame_get_background_string ( frame, PANEL_WIDGET (gtk_widget_get_parent (GTK_WIDGET (frame))), type); @@ -261,6 +262,7 @@ mate_panel_applet_frame_dbus_change_background (MatePanelAppletFrame *frame, g_free (bg_str); } +#endif } static void diff --git a/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c b/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c index b65fe4a7..d78742e3 100644 --- a/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c +++ b/mate-panel/libmate-panel-applet-private/panel-applets-manager-dbus.c @@ -38,6 +38,9 @@ #ifdef HAVE_WAYLAND #include <gdk/gdkwayland.h> #endif +#ifndef HAVE_X11 +#define GDK_IS_X11_DISPLAY(object) !(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_DISPLAY)) +#endif struct _MatePanelAppletsManagerDBusPrivate { diff --git a/mate-panel/panel-action-button.c b/mate-panel/panel-action-button.c index 25759d58..137399f5 100644 --- a/mate-panel/panel-action-button.c +++ b/mate-panel/panel-action-button.c @@ -65,6 +65,9 @@ #include <gdk/gdkwayland.h> #endif +#ifndef HAVE_X11 +#define GDK_IS_X11_DISPLAY(object) !(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_DISPLAY)) +#endif enum { PROP_0, diff --git a/mate-panel/panel-applet-frame.c b/mate-panel/panel-applet-frame.c index cadd81aa..f0b5bfa9 100644 --- a/mate-panel/panel-applet-frame.c +++ b/mate-panel/panel-applet-frame.c @@ -645,6 +645,7 @@ _mate_panel_applet_frame_update_size_hints (MatePanelAppletFrame *frame, n_elements); } +#ifdef HAVE_X11 char * _mate_panel_applet_frame_get_background_string (MatePanelAppletFrame *frame, PanelWidget *panel, @@ -679,6 +680,8 @@ _mate_panel_applet_frame_get_background_string (MatePanelAppletFrame *frame, return panel_background_make_string (&panel->toplevel->background, x, y); } +#endif + static void mate_panel_applet_frame_reload_response (GtkWidget *dialog, diff --git a/mate-panel/panel-background.c b/mate-panel/panel-background.c index b5c475d7..e9f3a6c2 100644 --- a/mate-panel/panel-background.c +++ b/mate-panel/panel-background.c @@ -763,6 +763,7 @@ panel_background_free (PanelBackground *background) background->default_pattern = NULL; } +#ifdef HAVE_X11 char * panel_background_make_string (PanelBackground *background, int x, @@ -799,6 +800,7 @@ panel_background_make_string (PanelBackground *background, return retval; } +#endif PanelBackgroundType panel_background_get_type (PanelBackground *background) diff --git a/mate-panel/panel-layout.c b/mate-panel/panel-layout.c index d1710f9e..d3bda7de 100644 --- a/mate-panel/panel-layout.c +++ b/mate-panel/panel-layout.c @@ -34,6 +34,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 <libmate-desktop/mate-dconf.h> #include <libmate-desktop/mate-gsettings.h> diff --git a/mate-panel/panel-multimonitor.c b/mate-panel/panel-multimonitor.c index c7ac14cc..ca392d6b 100644 --- a/mate-panel/panel-multimonitor.c +++ b/mate-panel/panel-multimonitor.c @@ -33,6 +33,11 @@ #include <gdk/gdkx.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 + #include "panel-multimonitor.h" #include <string.h> diff --git a/mate-panel/panel-profile.c b/mate-panel/panel-profile.c index ac08fc16..08174fe3 100644 --- a/mate-panel/panel-profile.c +++ b/mate-panel/panel-profile.c @@ -36,6 +36,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 <libpanel-util/panel-list.h> #include <libmate-desktop/mate-dconf.h> #include <libmate-desktop/mate-gsettings.h> diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c index 9279f500..bbe4980d 100644 --- a/mate-panel/panel-toplevel.c +++ b/mate-panel/panel-toplevel.c @@ -61,6 +61,9 @@ #ifdef HAVE_WAYLAND #include "wayland-backend.h" #endif +#ifndef HAVE_X11 +#define GDK_IS_X11_DISPLAY(object) !(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_DISPLAY)) +#endif #define DEFAULT_SIZE 48 #define DEFAULT_AUTO_HIDE_SIZE 1 |