summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormu <[email protected]>2021-01-02 17:14:57 +0800
committerraveit65 <[email protected]>2021-06-10 15:01:07 +0200
commitfa34064bca31952549a2b2596cc7b67205a54fb1 (patch)
tree21dd0f45354c5e349d7bf3398e524d9fbf6e739f
parent85d1a47b1b475eb6c24d3ea481b9e614243fcf32 (diff)
downloadmate-panel-fa34064bca31952549a2b2596cc7b67205a54fb1.tar.bz2
mate-panel-fa34064bca31952549a2b2596cc7b67205a54fb1.tar.xz
workspace-switcher: support xmonad WM
-rw-r--r--applets/wncklet/workspace-switcher.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c
index 22b473bd..a58abce2 100644
--- a/applets/wncklet/workspace-switcher.c
+++ b/applets/wncklet/workspace-switcher.c
@@ -58,6 +58,7 @@ typedef enum {
PAGER_WM_METACITY,
PAGER_WM_COMPIZ,
PAGER_WM_I3,
+ PAGER_WM_XMONAD,
PAGER_WM_UNKNOWN
} PagerWM;
@@ -107,7 +108,8 @@ static void pager_update_wnck(PagerData* pager, WnckPager* wnck_pager)
if (pager->display_names && (
pager->wm == PAGER_WM_MARCO ||
pager->wm == PAGER_WM_METACITY ||
- pager->wm == PAGER_WM_I3))
+ pager->wm == PAGER_WM_I3 ||
+ pager->wm == PAGER_WM_XMONAD))
{
display_mode = WNCK_PAGER_DISPLAY_NAME;
}
@@ -171,6 +173,20 @@ static void update_properties_for_wm(PagerData* pager)
if (pager->cell)
g_object_set (pager->cell, "editable", FALSE, NULL);
break;
+ case PAGER_WM_XMONAD:
+ if (pager->workspaces_frame)
+ gtk_widget_show(pager->workspaces_frame);
+ if (pager->num_workspaces_spin)
+ gtk_widget_set_sensitive(pager->num_workspaces_spin, FALSE);
+ if (pager->workspace_names_label)
+ gtk_widget_hide(pager->workspace_names_label);
+ if (pager->workspace_names_scroll)
+ gtk_widget_hide(pager->workspace_names_scroll);
+ if (pager->display_workspaces_toggle)
+ gtk_widget_show(pager->display_workspaces_toggle);
+ if (pager->cell)
+ g_object_set (pager->cell, "editable", FALSE, NULL);
+ break;
case PAGER_WM_COMPIZ:
if (pager->workspaces_frame)
gtk_widget_show(pager->workspaces_frame);
@@ -216,6 +232,8 @@ static void window_manager_changed(WnckScreen* screen, PagerData* pager)
pager->wm = PAGER_WM_METACITY;
else if (strcmp(wm_name, "i3") == 0)
pager->wm = PAGER_WM_I3;
+ else if (strcmp(wm_name, "xmonad") == 0)
+ pager->wm = PAGER_WM_XMONAD;
else if (strcmp(wm_name, "Compiz") == 0)
pager->wm = PAGER_WM_COMPIZ;
else