summaryrefslogtreecommitdiff
path: root/applets/brightness/brightness-applet.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2025-10-16 17:46:53 -0400
committerVictor Kareh <[email protected]>2025-10-16 17:52:07 -0400
commit2570151d8a88bca9eaf90043f81dd1112640f5dd (patch)
treee19aed82b6e014a3c8401be7aee35f53a6c9aaf7 /applets/brightness/brightness-applet.c
parent39724e8f88837acb16e3582d2a76474d9e2a937c (diff)
downloadmate-power-manager-power-profiles-applet.tar.bz2
mate-power-manager-power-profiles-applet.tar.xz
applets: Add support for building applets in-processpower-profiles-applet
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.
Diffstat (limited to 'applets/brightness/brightness-applet.c')
-rw-r--r--applets/brightness/brightness-applet.c16
1 files changed, 14 insertions, 2 deletions
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