This bug started in Slack 3.4.0 and affects Xubuntu 18.04.2 LTS too.
The problem happens because xfwm4 looks for any of the following:
"_NET_WM_WINDOW_TYPE_DESKTOP",
"_NET_WM_WINDOW_TYPE_DIALOG",
"_NET_WM_WINDOW_TYPE_DOCK",
"_NET_WM_WINDOW_TYPE_MENU",
"_NET_WM_WINDOW_TYPE_NORMAL",
"_NET_WM_WINDOW_TYPE_SPLASH",
"_NET_WM_WINDOW_TYPE_TOOLBAR",
"_NET_WM_WINDOW_TYPE_UTILITY",
But Slack doesn't set them.
I compiled xfwm4 from source, debugged remotely (it is nearly impossible to halt the window manager in the host machine...) and the problem boils down to:
1. clientCycleCreateList in cycle.c calls:
if (!clientSelectMask (c2, NULL, search_range, WINDOW_REGULAR_FOCUSABLE))
{
TRACE ("%s not in select mask", c2->name);
continue;
}
2. Inside clientSelectMask in focus.c, c2->type = 0; thus "return c2->type & mask" returns 0 regardless of the mask and thinks the window should not be alt-tabbed
3. I believe (not 100% sure) this happens because in clientWindowType in netwm.c, c->type_atom == None. I don't know whether this should be treated as a client bug or a window manager bug. I'm not an X11 expert so I don't know if it is possible to know if a window is the root one, but root windows should definitely be alt-tabbeable.
If I change the line to:
if (!clientSelectMask (c2, NULL, search_range, WINDOW_REGULAR_FOCUSABLE) && c2->type != UNSET)
Then Slack works with alt+tab and my computer hasn't blown up yet. I don't know if it's the proper fix though, but it may be
I fixed this problem by rebuilding xfwm4 with the attached patch:
mkdir tmp
cd tmp
sudo apt install devscripts build-essential fakeroot dpkg-dev
sudo apt-get build-dep xfwm4
apt-get source xfwm4
cd xfwm4-4.12.5
patch -i xfwm4_slack_fix.diff #Point it where the patch is located!!!
debuild -b -uc -us
sudo dpkg -i ../xfwm4_4.12.5-1ubuntu0.18.04.1_amd64.deb
This bug started in Slack 3.4.0 and affects Xubuntu 18.04.2 LTS too.
The problem happens because xfwm4 looks for any of the following: WINDOW_ TYPE_DESKTOP" , WINDOW_ TYPE_DIALOG" , WINDOW_ TYPE_DOCK" , WINDOW_ TYPE_MENU" , WINDOW_ TYPE_NORMAL" , WINDOW_ TYPE_SPLASH" , WINDOW_ TYPE_TOOLBAR" , WINDOW_ TYPE_UTILITY" ,
"_NET_WM_
"_NET_WM_
"_NET_WM_
"_NET_WM_
"_NET_WM_
"_NET_WM_
"_NET_WM_
"_NET_WM_
But Slack doesn't set them.
I compiled xfwm4 from source, debugged remotely (it is nearly impossible to halt the window manager in the host machine...) and the problem boils down to:
1. clientCycleCrea teList in cycle.c calls:
if (!clientSelectMask (c2, NULL, search_range, WINDOW_ REGULAR_ FOCUSABLE) )
{
TRACE ("%s not in select mask", c2->name);
continue;
}
2. Inside clientSelectMask in focus.c, c2->type = 0; thus "return c2->type & mask" returns 0 regardless of the mask and thinks the window should not be alt-tabbed
3. I believe (not 100% sure) this happens because in clientWindowType in netwm.c, c->type_atom == None. I don't know whether this should be treated as a client bug or a window manager bug. I'm not an X11 expert so I don't know if it is possible to know if a window is the root one, but root windows should definitely be alt-tabbeable.
If I change the line to:
if (!clientSelectMask (c2, NULL, search_range, WINDOW_ REGULAR_ FOCUSABLE) && c2->type != UNSET)
Then Slack works with alt+tab and my computer hasn't blown up yet. I don't know if it's the proper fix though, but it may be
I fixed this problem by rebuilding xfwm4 with the attached patch:
mkdir tmp fix.diff #Point it where the patch is located!!! 4.12.5- 1ubuntu0. 18.04.1_ amd64.deb
cd tmp
sudo apt install devscripts build-essential fakeroot dpkg-dev
sudo apt-get build-dep xfwm4
apt-get source xfwm4
cd xfwm4-4.12.5
patch -i xfwm4_slack_
debuild -b -uc -us
sudo dpkg -i ../xfwm4_