When an app has a transient window, clicking on the app's button on panel brings forward only the transient. steps to reproduce: 1) launch thunar, maximize it 2) launch mousepad, open its preferences window (edit/preferences) 3) switch to thunar 4) try to switch back to mousepad using the window's button Only the preferences (i.e. the transient window) will be raised, the mousepad window itself will still be buried under the thunar window. Using latest version from git.
Looks like xfwm4 is the culprit. Old xfwm4 4.12 running with new tasklist (window buttons) works fine (raises transient -and- the corresponding transient parent window), whereas current xfwm4 from git does not raise the transient parent window.
Works fine here, I cannot reproduce that bug.
Also worth noting that raising a transient does not imply raising ita parent, that's on purpose. But raising the parent will raise all the transients. So if the window button raises only the transient window, it's normal that only the transient window ends up above, alone.
Of course, raising only a transient when clicking on transient itself is ok. But the window buttons works (should work) like "switch to" (alt-tab), which does raise both transient and its sibling.
Using the debug logs, you can tell which window id is sent through the "_NET_ACTIVE_WINDOW" client message, and determine if this is either a libwnck bug or xfwm4. https://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472702304
Created attachment 7552 bug-only-transient-gets-raised.mkv video demonstrating the bug - only the transient gets raised
(In reply to Olivier Fourdan from comment #5) > Using the debug logs, you can tell which window id is sent through the > "_NET_ACTIVE_WINDOW" client message, and determine if this is either a > libwnck bug or xfwm4. > > https://standards.freedesktop.org/wm-spec/wm-spec-latest. > html#idm140200472702304 The logs are really "heavy", I am unable to sift through all the data at the moment... Anyway, I tried runnning xfwm4 from git with the rest of xfce components from 4.12 (compiled just xfwm on an arch machine), and the bug persists in this case. On the other hand, as I have written, if I use xfwm4 4.12.4 with the rest of the components new (git versions), the problem goes away. Really as if xfwm4 was causing it.
Found it. The problem lies in xfwm4 in clientActivate function which has changed from 4.12.4. In 4.12.4 the important part was (lines 2597-2598) clientRaise (sibling, None); clientShow (sibling, TRUE); In current git, the part reads (linex 2609-2614) clientShow (sibling, TRUE); if (!screen_info->params->click_to_focus) { clientRaise (sibling, None); clientSetLastRaise (c); } If I add clientRaise (sibling, None); before the clientShow (without the if) switching immediately works fine.
introduced by commit 3877bf45d39928b2ec485945af1fba7a16645c7d
And yet, even without click to focus here, it works... Can you provide the output of “xfconf-query -vl -c xfwm4”?
Well, no surprise it works -without- click to focus. Without click to focus it works for me too. There is !screen_info->params->click_to_focus (there is negation). With click to focus (default setting, and my preferred setting) it does not work - and it should, in my opinion. The critical part is to raise the sibling - "clientRaise (sibling, None)". The program does not get there when click_to_focus==TRUE. The problem is there even with default config; will upload the xfconf-query momentarily.
Created attachment 7553 xfconf-query -vl -c xfwm4
Sorry I didn't make myself clear, it works in all cases here... Click to focus is also my default, so there must be something else coming into play...
Is there some other place where the sibling is raised? Strange you cannot reproduce. I encounter this with geany. Open find window to navigate around code, switch to maximized firefox to read something on web, switch to back and bummer - only the "find" window (transient) is brought to forward.
Oh, I think I know...
Olivier Fourdan referenced this bugreport in commit a33fc7afbcfdddf20f29e60207c3b59ade9396d2 stacking: Raise ancestor on activate if different from window https://git.xfce.org/xfce/xfwm4/commit?id=a33fc7afbcfdddf20f29e60207c3b59ade9396d2
Perfect, working now. Thank you very much! Closing as fixed.
Olivier Fourdan referenced this bugreport in commit 15a64b0f66856af40b324d9869fb2002abc40c42 stacking: Raise on activate w/out click-to-focus https://git.xfce.org/xfce/xfwm4/commit?id=15a64b0f66856af40b324d9869fb2002abc40c42