From 2570151d8a88bca9eaf90043f81dd1112640f5dd Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Thu, 16 Oct 2025 17:46:53 -0400 Subject: applets: Add support for building applets in-process This enables Wayland compatibility. Out-of-process applets use GtkPlug/GtkSocket which is X11-specific and doesn't work in Wayland sessions. The default build remains out-of-process for backwards compatibility. --- applets/brightness/brightness-applet.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'applets/brightness/brightness-applet.c') diff --git a/applets/brightness/brightness-applet.c b/applets/brightness/brightness-applet.c index ff8f1ef..73242bc 100644 --- a/applets/brightness/brightness-applet.c +++ b/applets/brightness/brightness-applet.c @@ -1105,12 +1105,24 @@ gpm_applet_cb (MatePanelApplet *_applet, const gchar *iid, gpointer data) /** * this generates a main with a applet factory **/ +#ifdef APPLETS_INPROCESS +MATE_PANEL_APPLET_IN_PROCESS_FACTORY + (/* the factory iid */ + GPM_BRIGHTNESS_APPLET_FACTORY_ID, + /* generates brightness applets instead of regular mate applets */ + GPM_TYPE_BRIGHTNESS_APPLET, + /* the applet name */ + "BrightnessApplet", + /* our callback (with no user data) */ + gpm_applet_cb, NULL) +#else MATE_PANEL_APPLET_OUT_PROCESS_FACTORY (/* the factory iid */ GPM_BRIGHTNESS_APPLET_FACTORY_ID, - /* generates brighness applets instead of regular mate applets */ + /* generates brightness applets instead of regular mate applets */ GPM_TYPE_BRIGHTNESS_APPLET, /* the applet name */ "BrightnessApplet", /* our callback (with no user data) */ - gpm_applet_cb, NULL); + gpm_applet_cb, NULL) +#endif -- cgit v1.2.1