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

** Patch added: "Alt + Tab fix for xfwm4 and Slack"
   
https://bugs.launchpad.net/ubuntu/+source/xfwm4/+bug/1827302/+attachment/5261320/+files/xfwm4_slack_fix.diff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1827302

Title:
  18.10 → 19.04 Alt-Tab cycling no longer includes Slack window

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xfwm4/+bug/1827302/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to