diff options
| author | Victor Kareh <[email protected]> | 2025-10-16 17:46:53 -0400 |
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2025-10-16 17:52:07 -0400 |
| commit | 2570151d8a88bca9eaf90043f81dd1112640f5dd (patch) | |
| tree | e19aed82b6e014a3c8401be7aee35f53a6c9aaf7 /applets/inhibit/inhibit-applet.c | |
| parent | 39724e8f88837acb16e3582d2a76474d9e2a937c (diff) | |
| download | mate-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/inhibit/inhibit-applet.c')
| -rw-r--r-- | applets/inhibit/inhibit-applet.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/applets/inhibit/inhibit-applet.c b/applets/inhibit/inhibit-applet.c index 02f1862..74ddd6e 100644 --- a/applets/inhibit/inhibit-applet.c +++ b/applets/inhibit/inhibit-applet.c @@ -528,12 +528,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_INHIBIT_APPLET_FACTORY_ID, + /* generates inhibit applets instead of regular mate applets */ + GPM_TYPE_INHIBIT_APPLET, + /* the applet name */ + "InhibitApplet", + /* our callback (with no user data) */ + gpm_applet_cb, NULL) +#else MATE_PANEL_APPLET_OUT_PROCESS_FACTORY (/* the factory iid */ GPM_INHIBIT_APPLET_FACTORY_ID, - /* generates brighness applets instead of regular mate applets */ + /* generates inhibit applets instead of regular mate applets */ GPM_TYPE_INHIBIT_APPLET, /* the applet name */ "InhibitApplet", /* our callback (with no user data) */ gpm_applet_cb, NULL) +#endif |
